********>Master Bugfix File - Amber 9 Bug fixes 1 to 20 Programs: AMBER 9 Description: This is the master bugfix file for Amber 9. It contains all of the bugfixes released to date in a single patch script. Usage: Save this file in your $AMBERHOME directory and then apply this patch file to your amber 9 distribution as follows: cd $AMBERHOME patch -p0 -N -r patch_rejects Bugfix 1: Author: Dave Case Date: 04/21/2006 Programs: ptraj Description: ptraj.c has a executable statement before declarations inside a block. This is not correct, but most compilers allow it. Fix: apply the following patch to amber9/src/ptraj/ptraj.c ------------------------------------------------------------------------------ *** src/ptraj/ptraj.c 3 Apr 2006 23:35:48 -0000 9.0 --- src/ptraj/ptraj.c 21 Apr 2006 15:08:09 -0000 *************** *** 4033,4044 **** * Do recursive calls as necessary for outputing LES trajectories */ if ( outInfo->les_action != LES_NONE && outInfo->les_status == LES_READY ) { - outInfo->les_status = LES_DONE; int natomCL = lesSize( atoms ); double* xrep = safe_malloc( sizeof( double ) * natomCL ); double* yrep = safe_malloc( sizeof( double ) * natomCL ); double* zrep = safe_malloc( sizeof( double ) * natomCL ); if ( outInfo->les_action == LES_SPLIT ) { int icopy=0; --- 4033,4045 ---- * Do recursive calls as necessary for outputing LES trajectories */ if ( outInfo->les_action != LES_NONE && outInfo->les_status == LES_READY ) { int natomCL = lesSize( atoms ); double* xrep = safe_malloc( sizeof( double ) * natomCL ); double* yrep = safe_malloc( sizeof( double ) * natomCL ); double* zrep = safe_malloc( sizeof( double ) * natomCL ); + + outInfo->les_status = LES_DONE; if ( outInfo->les_action == LES_SPLIT ) { int icopy=0; ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 2: Author: Ray Luo Date: 05/2/2006 Programs: pbsa, sander Description: sa_driver.f has a statement causing a negative number to be taken square root. This is not correct, but many compilers allow it. Fix: apply the following patch to amber9/src/pbsa/sa_driver.f, and to amber9/src/sander/sa_driver.f ------------------------------------------------------------------------------ *** src/pbsa/sa_driver.f Mon Apr 3 23:35:48 2006 --- src/pbsa/sa_driver.f Tue May 2 12:05:09 2006 *************** *** 991,997 **** dyij = acrd(2,jatm) - yi dzij = acrd(3,jatm) - zi d2 = dxij**2 + dyij**2 + dzij**2 ! if ( d2 >= (ri + rj)**2 ) cycle ! setting up indexes ... --- 991,997 ---- dyij = acrd(2,jatm) - yi dzij = acrd(3,jatm) - zi d2 = dxij**2 + dyij**2 + dzij**2 ! if ( d2 >= (ri + rj)**2 .or. d2 <= (ri - rj)**2 ) cycle ! setting up indexes ... *** src/sander/sa_driver.f Mon Apr 3 23:35:48 2006 --- src/sander/sa_driver.f Tue May 2 12:05:09 2006 *************** *** 991,997 **** dyij = acrd(2,jatm) - yi dzij = acrd(3,jatm) - zi d2 = dxij**2 + dyij**2 + dzij**2 ! if ( d2 >= (ri + rj)**2 ) cycle ! setting up indexes ... --- 991,997 ---- dyij = acrd(2,jatm) - yi dzij = acrd(3,jatm) - zi d2 = dxij**2 + dyij**2 + dzij**2 ! if ( d2 >= (ri + rj)**2 .or. d2 <= (ri - rj)**2 ) cycle ! setting up indexes ... ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 3: Author: Mengjuei Hsieh and Dave Case Date: 05/7/2006 Programs: LEaP Description: The configure script creates an XLIBS variable with a space that should not be there. Fix: apply the following patch to amber9/src/configure ------------------------------------------------------------------------------ *** src/configure 3 Apr 2006 23:34:24 -0000 9.0 --- src/configure 8 May 2006 00:06:38 -0000 *************** *** 203,209 **** use_lmod=LMOD_UNAVAILABLE fi xhome='/usr/X11R6' ! xlibs="-L $xhome/lib" machine=`uname -m` if [ "$machine" = "em64t" ] || [ "$machine" = "x86_64" ] || [ "$x86_64" = "yes" ]; then --- 203,209 ---- use_lmod=LMOD_UNAVAILABLE fi xhome='/usr/X11R6' ! xlibs="-L$xhome/lib" machine=`uname -m` if [ "$machine" = "em64t" ] || [ "$machine" = "x86_64" ] || [ "$x86_64" = "yes" ]; then *************** *** 710,717 **** fflags="-tp p7 -O1" foptflags="-tp p7 -Mscalarsse -Mvect=sse -Mflushz -fast -O3" - xlibs="-L $xhome/lib" - moduledir='-module $(EMPTY)' if [ $static = "yes" ]; then static_flag='-Bstatic' --- 710,715 ---- *************** *** 867,873 **** loadptraj="$load" xhome='/usr/lib32' ! xlibs="-L $xhome" ;; ####################### HP ############################ --- 865,871 ---- loadptraj="$load" xhome='/usr/lib32' ! xlibs="-L$xhome" ;; ####################### HP ############################ ------------------------------------------------------------------------------ Temporary workarounds: Manually edit config.h to remove the extra space. ********>Bugfix 4: Author: Junmei Wang (bug reported by Eric Pettersen) Date: 05/9/2006 Programs: Antechamber Description: The ring analysis routine can try to malloc 0 bytes, which can cause problems on some systems. Fix: apply the following patch to amber9/src/antechamber/ring.c ------------------------------------------------------------------------------ diff -c -r9.0 ring.c *** src/antechamber/ring.c 3 Apr 2006 23:34:26 -0000 9.0 --- src/antechamber/ring.c 9 May 2006 17:20:25 -0000 *************** *** 66,71 **** --- 66,72 ---- int tmpint; int index; + if( ringnum == 0 ) return; ringbak = (RING *) malloc(sizeof(RING) * ringnum ); if (ringbak == NULL) { fprintf(stderr, "memory allocation error for *ringbak\n"); ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 5: Author: Yong Duan Date: 06/02/2006 Programs: Anything using the ff03 force field Description: There is a bad line in frcmod.ff03 in Amber 9. Any prmtop files created using this will have to be re-made. Fix: apply the following patch to amber9/dat/leap/parm/frcmod.ff03 ------------------------------------------------------------------------------ diff -c -r9.0 frcmod.ff03 *** dat/leap/parm/frcmod.ff03 4 Apr 2006 01:05:51 -0000 9.0 --- dat/leap/parm/frcmod.ff03 2 Jun 2006 16:29:21 -0000 *************** *** 17,27 **** C -N -CT-C 1 0.2259 0.00 -3. C -N -CT-C 1 0.3451 180.00 -2. C -N -CT-C 1 1.0159 0.00 1. - CT-CT-N -C 1 0.0000 180.0 -4. - CT-CT-C -N 1 0.0560 0.00 -3. CT-CT-C -N 1 0.0000 0.0 -4. CT-CT-C -N 1 0.0657 180.00 -2. CT-CT-C -N 1 0.7784 180.00 1. C -N -CT-CT 1 0.2270 180.00 -3. C -N -CT-CT 1 0.8836 180.00 -2. C -N -CT-CT 1 0.3537 180.00 1. --- 17,27 ---- C -N -CT-C 1 0.2259 0.00 -3. C -N -CT-C 1 0.3451 180.00 -2. C -N -CT-C 1 1.0159 0.00 1. CT-CT-C -N 1 0.0000 0.0 -4. + CT-CT-C -N 1 0.0560 0.00 -3. CT-CT-C -N 1 0.0657 180.00 -2. CT-CT-C -N 1 0.7784 180.00 1. + C -N -CT-CT 1 0.0000 000.00 -4. C -N -CT-CT 1 0.2270 180.00 -3. C -N -CT-CT 1 0.8836 180.00 -2. C -N -CT-CT 1 0.3537 180.00 1. ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 6: Author: Istvan Kolosváry Date: 06/19/2006 Programs: lmod Description: The "make clean" command will remove some object files that should not be removed. Fix: apply the following patch to amber9/src/lmod/lmod/Makefile and to amber9/src/lmod/xmin/Makefile ------------------------------------------------------------------------------ *** src/lmod/lmod/Makefile 3 Apr 2006 23:35:29 -0000 9.0 --- src/lmod/lmod/Makefile 19 Jun 2006 06:38:50 -0000 *************** *** 16,20 **** $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f *.o _*.f --- 16,20 ---- $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f ieee.o _*.f *** src/lmod/xmin/Makefile 3 Apr 2006 23:35:29 -0000 9.0 --- src/lmod/xmin/Makefile 19 Jun 2006 06:38:50 -0000 *************** *** 16,20 **** $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f *.o _*.f --- 16,20 ---- $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f ieee.o _*.f ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 7: Author: Kateryna Miroshnychenko Date: 07/10/2006 Programs: ambmask Description: There is a bad conversion from input charges to internal charge units. Fix: apply the following patch to amber9/src/sander/ambmask.f ------------------------------------------------------------------------------ *** src/sander/ambmask.f 2006-04-04 02:35:54.000000000 +0300 --- src/sander/ambmask.f 2006-07-10 16:15:48.000000000 +0300 *************** *** 262,268 **** type = 'CHARGE' call nxtsec(nf, 6, 0,fmtin, type, fmt, iok) read(nf,fmt) (chg(i), i=1,natom) ! chg(1:i) = chg(1:i)*INV_AMBER_ELECTROSTATIC if( iok.eq.-1 ) then ! this is an old-style prmtop file ! old style prmtop has to be read sequentially, even though --- 262,268 ---- type = 'CHARGE' call nxtsec(nf, 6, 0,fmtin, type, fmt, iok) read(nf,fmt) (chg(i), i=1,natom) ! chg(1:natom) = chg(1:natom)*INV_AMBER_ELECTROSTATIC if( iok.eq.-1 ) then ! this is an old-style prmtop file ! old style prmtop has to be read sequentially, even though ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 8: Author: Bob Duke Date: 08/01/06 Programs: pmemd Description: The iwrap=1 option does not work correctly. Fix: apply the following patch to amber9/src/pmemd/src/pbc.fpp ------------------------------------------------------------------------------ *** src/pmemd/src/pbc.fpp 2006-04-03 19:35:48.000000000 -0400 --- src/pmemd/src/pbc.fpp 2006-08-02 11:07:19.000000000 -0400 *************** *** 769,774 **** --- 769,775 ---- crd(3, j) * recip(3, 3) end do + #if 0 f1 = f1/molsiz(i) f2 = f2/molsiz(i) f3 = f3/molsiz(i) *************** *** 784,789 **** --- 785,799 ---- g3 = f3 if (f3 .lt. 0.d0) g3 = f3 + 1.d0 if (f3 .ge. 1.d0) g3 = f3 - 1.d0 + #else + f1 = f1/molsiz(i) - 0.5d0 + f2 = f2/molsiz(i) - 0.5d0 + f3 = f3/molsiz(i) - 0.5d0 + + g1 = f1 - anint(f1) + g2 = f2 - anint(f2) + g3 = f3 - anint(f3) + #endif if (f1 .ne. g1 .or. f2 .ne. g2 .or. f3 .ne. g3) then tran(1) = (g1 - f1) * ucell(1, 1) + (g2 - f2) * ucell(1, 2) + & ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 9: Author: Dave Case, based on a report by Jan Fredin Date: 08/10/06 Programs: sander, pbsa Description: There is some IPS code in the pbsa routines that should never be executed. But if it is, a divide by zero error can occur. The patch removes the offending code. Fix: apply the following patch to amber9/src/sander/pb_direct.f *and* to amber9/src/pbsa/pb_direct.f ------------------------------------------------------------------------------ *** src/sander/pb_direct.f 3 Apr 2006 23:35:55 -0000 9.0 --- src/sander/pb_direct.f 11 Aug 2006 06:04:14 -0000 *************** *** 490,499 **** implicit none - ! Common variables - !WXW sgld and ips head file - # include "sgld.h" - ! Passed variables integer natom, iprshrt(*), iar1pb(6,0:natom) --- 490,495 ---- *************** *** 510,521 **** _REAL_ dx, dy, dz, d2inv, r6 _REAL_ df2, f2, f1, df, fw1, fw2, fw3 - !WXW - _REAL_ uips,uips2,uips6,twou,twou2,twou6,twou12,rinv - _REAL_ pipse,dpipse,eipse,dipse,PVC,PVCU,DVCU,PVA,PVAU,DVAU - !WXW - - ! initialization eel = ZERO; enb = ZERO --- 506,511 ---- *************** *** 528,536 **** jfirst1 = iar1pb(1, i) + 1; jlast1 = iar1pb(2, i) jfirst2 = iar1pb(2, i) + 1; jlast2 = iar1pb(4, i) - !WXW Get IPS NB count - IF(TEIPS.OR.TVIPS)NNBIPS=NNBIPS+(jlast2-jfirst1+1)*2 - ! loop over direct coulombic pairs do jp = jfirst1, jlast1 --- 518,523 ---- *************** *** 539,582 **** d2inv = ONE/(dx**2+dy**2+dz**2) df2 = cn3pb(jp)*sqrt(d2inv) eel = eel+df2 - !WXW IPS for electrostatic - IF(TEIPS)THEN - uips=1.0d0/rips/rinv - uips2=uips*uips - twou2=2.0d0-uips2 - twou=sqrt(twou2) - pipse=bipse0+uips2*(bipse1+uips2*(bipse2+uips2*bipse3)) - dpipse=2.0d0*bipse1+uips2*(4.0d0*bipse2+6.0d0*uips2*bipse3) - dipse=df2*uips*(dpipse+pipse/twou2)/twou*uips2 - eipse=df2*uips*(pipse/twou-pipsec) - eel=eel+eipse - df2=df2-dipse - ENDIF - !WXW r6 = d2inv**3 f2 = cn2pb(jp)*r6 f1 = cn1pb(jp)*(r6*r6) enb = enb + (f2-f1) df = (df2+SIX*((f2-f1)-f1))*d2inv - !WXW IPS for L-J - IF(TVIPS)THEN - ! L-J r6 term - UIPS2=1.0D0/(D2INV*RIPS2) - UIPS6=UIPS2*UIPS2*UIPS2 - TWOU2=2.0D0-UIPS2 - TWOU6=TWOU2*TWOU2*TWOU2 - TWOU12=TWOU6*TWOU6 - PVC=BIPSVC0+UIPS2*(BIPSVC1+UIPS2*(BIPSVC2+UIPS2*BIPSVC3)) - PVCU=2.0D0*BIPSVC1+UIPS2*(4.0D0*BIPSVC2+6.0D0*BIPSVC3*UIPS2) - DVCU=(PVCU+6.0D0*PVC/TWOU2)/TWOU6 - ! L-J r12 term - PVA=BIPSVA0+UIPS2*(BIPSVA1+UIPS2*(BIPSVA2+UIPS2*BIPSVA3)) - PVAU=2.0D0*BIPSVA1+UIPS2*(4.0D0*BIPSVA2+6.0D0*BIPSVA3*UIPS2) - DVAU=(PVAU+12.0D0*PVA/TWOU2)/TWOU12 - enb=enb-(f1*(PVA/TWOU12-PIPSVAC)*UIPS6-f2*(PVC/TWOU6-PIPSVCC))*UIPS6 - df=df-(f1*DVAU*uips6-f2*DVCU)*uips6/RIPS2 - ENDIF - !WXW fw1 = dx*df; fw2 = dy*df; fw3 = dz*df dumx = dumx + fw1 dumy = dumy + fw2 --- 526,536 ---- *************** *** 597,621 **** f1 = cn1pb(jp)*(r6*r6) enb = enb + (f2-f1) df = SIX*((f2-f1)-f1)*d2inv - !WXW IPS for L-J - IF(TVIPS)THEN - ! L-J r6 term - UIPS2=1.0D0/(D2INV*RIPS2) - UIPS6=UIPS2*UIPS2*UIPS2 - TWOU2=2.0D0-UIPS2 - TWOU6=TWOU2*TWOU2*TWOU2 - TWOU12=TWOU6*TWOU6 - PVC=BIPSVC0+UIPS2*(BIPSVC1+UIPS2*(BIPSVC2+UIPS2*BIPSVC3)) - PVCU=2.0D0*BIPSVC1+UIPS2*(4.0D0*BIPSVC2+6.0D0*BIPSVC3*UIPS2) - DVCU=(PVCU+6.0D0*PVC/TWOU2)/TWOU6 - ! L-J r12 term - PVA=BIPSVA0+UIPS2*(BIPSVA1+UIPS2*(BIPSVA2+UIPS2*BIPSVA3)) - PVAU=2.0D0*BIPSVA1+UIPS2*(4.0D0*BIPSVA2+6.0D0*BIPSVA3*UIPS2) - DVAU=(PVAU+12.0D0*PVA/TWOU2)/TWOU12 - enb=enb-(f1*(PVA/TWOU12-PIPSVAC)*UIPS6-f2*(PVC/TWOU6-PIPSVCC))*UIPS6 - df=df-(f1*DVAU*uips6-f2*DVCU)*uips6/RIPS2 - ENDIF - !WXW fw1 = dx*df; fw2 = dy*df; fw3 = dz*df dumx = dumx + fw1 dumy = dumy + fw2 --- 551,556 ---- *** src/pbsa/pb_direct.f 3 Apr 2006 23:35:55 -0000 9.0 --- src/pbsa/pb_direct.f 11 Aug 2006 06:04:14 -0000 *************** *** 490,499 **** implicit none - ! Common variables - !WXW sgld and ips head file - # include "sgld.h" - ! Passed variables integer natom, iprshrt(*), iar1pb(6,0:natom) --- 490,495 ---- *************** *** 510,521 **** _REAL_ dx, dy, dz, d2inv, r6 _REAL_ df2, f2, f1, df, fw1, fw2, fw3 - !WXW - _REAL_ uips,uips2,uips6,twou,twou2,twou6,twou12,rinv - _REAL_ pipse,dpipse,eipse,dipse,PVC,PVCU,DVCU,PVA,PVAU,DVAU - !WXW - - ! initialization eel = ZERO; enb = ZERO --- 506,511 ---- *************** *** 528,536 **** jfirst1 = iar1pb(1, i) + 1; jlast1 = iar1pb(2, i) jfirst2 = iar1pb(2, i) + 1; jlast2 = iar1pb(4, i) - !WXW Get IPS NB count - IF(TEIPS.OR.TVIPS)NNBIPS=NNBIPS+(jlast2-jfirst1+1)*2 - ! loop over direct coulombic pairs do jp = jfirst1, jlast1 --- 518,523 ---- *************** *** 539,582 **** d2inv = ONE/(dx**2+dy**2+dz**2) df2 = cn3pb(jp)*sqrt(d2inv) eel = eel+df2 - !WXW IPS for electrostatic - IF(TEIPS)THEN - uips=1.0d0/rips/rinv - uips2=uips*uips - twou2=2.0d0-uips2 - twou=sqrt(twou2) - pipse=bipse0+uips2*(bipse1+uips2*(bipse2+uips2*bipse3)) - dpipse=2.0d0*bipse1+uips2*(4.0d0*bipse2+6.0d0*uips2*bipse3) - dipse=df2*uips*(dpipse+pipse/twou2)/twou*uips2 - eipse=df2*uips*(pipse/twou-pipsec) - eel=eel+eipse - df2=df2-dipse - ENDIF - !WXW r6 = d2inv**3 f2 = cn2pb(jp)*r6 f1 = cn1pb(jp)*(r6*r6) enb = enb + (f2-f1) df = (df2+SIX*((f2-f1)-f1))*d2inv - !WXW IPS for L-J - IF(TVIPS)THEN - ! L-J r6 term - UIPS2=1.0D0/(D2INV*RIPS2) - UIPS6=UIPS2*UIPS2*UIPS2 - TWOU2=2.0D0-UIPS2 - TWOU6=TWOU2*TWOU2*TWOU2 - TWOU12=TWOU6*TWOU6 - PVC=BIPSVC0+UIPS2*(BIPSVC1+UIPS2*(BIPSVC2+UIPS2*BIPSVC3)) - PVCU=2.0D0*BIPSVC1+UIPS2*(4.0D0*BIPSVC2+6.0D0*BIPSVC3*UIPS2) - DVCU=(PVCU+6.0D0*PVC/TWOU2)/TWOU6 - ! L-J r12 term - PVA=BIPSVA0+UIPS2*(BIPSVA1+UIPS2*(BIPSVA2+UIPS2*BIPSVA3)) - PVAU=2.0D0*BIPSVA1+UIPS2*(4.0D0*BIPSVA2+6.0D0*BIPSVA3*UIPS2) - DVAU=(PVAU+12.0D0*PVA/TWOU2)/TWOU12 - enb=enb-(f1*(PVA/TWOU12-PIPSVAC)*UIPS6-f2*(PVC/TWOU6-PIPSVCC))*UIPS6 - df=df-(f1*DVAU*uips6-f2*DVCU)*uips6/RIPS2 - ENDIF - !WXW fw1 = dx*df; fw2 = dy*df; fw3 = dz*df dumx = dumx + fw1 dumy = dumy + fw2 --- 526,536 ---- *************** *** 597,621 **** f1 = cn1pb(jp)*(r6*r6) enb = enb + (f2-f1) df = SIX*((f2-f1)-f1)*d2inv - !WXW IPS for L-J - IF(TVIPS)THEN - ! L-J r6 term - UIPS2=1.0D0/(D2INV*RIPS2) - UIPS6=UIPS2*UIPS2*UIPS2 - TWOU2=2.0D0-UIPS2 - TWOU6=TWOU2*TWOU2*TWOU2 - TWOU12=TWOU6*TWOU6 - PVC=BIPSVC0+UIPS2*(BIPSVC1+UIPS2*(BIPSVC2+UIPS2*BIPSVC3)) - PVCU=2.0D0*BIPSVC1+UIPS2*(4.0D0*BIPSVC2+6.0D0*BIPSVC3*UIPS2) - DVCU=(PVCU+6.0D0*PVC/TWOU2)/TWOU6 - ! L-J r12 term - PVA=BIPSVA0+UIPS2*(BIPSVA1+UIPS2*(BIPSVA2+UIPS2*BIPSVA3)) - PVAU=2.0D0*BIPSVA1+UIPS2*(4.0D0*BIPSVA2+6.0D0*BIPSVA3*UIPS2) - DVAU=(PVAU+12.0D0*PVA/TWOU2)/TWOU12 - enb=enb-(f1*(PVA/TWOU12-PIPSVAC)*UIPS6-f2*(PVC/TWOU6-PIPSVCC))*UIPS6 - df=df-(f1*DVAU*uips6-f2*DVCU)*uips6/RIPS2 - ENDIF - !WXW fw1 = dx*df; fw2 = dy*df; fw3 = dz*df dumx = dumx + fw1 dumy = dumy + fw2 --- 551,556 ---- ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 10: Author: Dave Case, reported by Kazuo Ohta Date: 08/14/06 Programs: top2mol2 Description: The main() routine of this program does not include an explicit "return 0;" statement at the end. This is perfectly legal C code, but it seems that in some circumstances (MacOS/gcc4 has been reported) it generates an error. Fix: apply the following patch to amber9/src/antechamber/top2mol2.c ------------------------------------------------------------------------------ *** src/antechamber/top2mol2.c 3 Apr 2006 23:34:26 -0000 9.0 --- src/antechamber/top2mol2.c 14 Aug 2006 17:20:20 -0000 *************** *** 818,822 **** --- 818,823 ---- } write(); fclose(fpout); + return 0; } ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 11: Author: Dave Case, reported by Jan Fredin Date: 08/17/06 Programs: sander Description: The minimization initialization in sander can attept a divide by zero. No use is made of the returned value, so this is generally innocuous, but it can cause problems if a fatal exception is raised as a result. Fix: apply the following patch to amber9/src/sander/runmin.f ------------------------------------------------------------------------------ *** src/sander/runmin.f 3 Apr 2006 23:35:55 -0000 9.0 --- src/sander/runmin.f 17 Aug 2006 22:36:33 -0000 *************** *** 128,133 **** --- 128,134 ---- fold = 0.0d0 dxst = dx0 linmin = 0 + gmin = 1.d0 if (iscale > 0) n = n + iscale ! ----- PARTITION THE WORKING ARRAY ----- ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 12: Author: Scott Brozell Date: 08/17/06 Programs: Antechamber Description: Files of type prepi or prepc with a length greater than 139 lines cause antechamber programs to fail. The -o output file contains garbage. The standard output usually contains: Info: the atom number exceeds the MAXATOM, reallocate memory automatically Unrecognized atomic name , exit Fix: apply the following patch to amber9/src/antechamber/prep.c *and* to amber9/src/antechamber/parmchk.c ------------------------------------------------------------------------------ *** src/antechamber/prep.c 3 Apr 2006 23:34:26 -0000 9.0 --- src/antechamber/prep.c 18 Aug 2006 05:02:19 -0000 *************** *** 38,48 **** if (fgets(line, 150, fpin) == NULL) break; i++; - if (i > (*cinfo).maxatom + 11) { - printf - ("\nInfo: the atom number exceeds the MAXATOM, reallocate memory automatically"); - overflow_flag = 1; - } if (i == 5) { sscanf(line, "%s", tmpchar); (*minfo).resname[0] = tmpchar[0]; --- 38,43 ---- *************** *** 61,70 **** if (strlen(line) == 1 && readindex == 3) readindex = 4; if (readindex == 1) { sscanf(line, "%d%s%s%s%d%d%d%lf%lf%lf%lf", &tmpint1, tmpchar1, tmpchar2, tmpchar3, &tmpint2, &tmpint3, &tmpint4, ! &tmpfloat1, &tmpfloat2, &tmpfloat3, &atm[i - 8].charge); ! number++; if (i == 8) { atm[0].x = 0.0; atm[0].y = 0.0; --- 56,74 ---- if (strlen(line) == 1 && readindex == 3) readindex = 4; if (readindex == 1) { + number++; + if (number - 3 > (*cinfo).maxatom ) { + printf("\nInfo: the atom number exceeds the MAXATOM," + " reallocate memory automatically"); + overflow_flag = 1; + } + double tmpcharge; sscanf(line, "%d%s%s%s%d%d%d%lf%lf%lf%lf", &tmpint1, tmpchar1, tmpchar2, tmpchar3, &tmpint2, &tmpint3, &tmpint4, ! &tmpfloat1, &tmpfloat2, &tmpfloat3, &tmpcharge); ! if (overflow_flag == 0) { ! atm[i - 8].charge = tmpcharge; ! } if (i == 8) { atm[0].x = 0.0; atm[0].y = 0.0; *************** *** 165,175 **** if (fgets(line, 150, fpin) == NULL) break; i++; - if (i > (*cinfo).maxatom + 11) { - printf - ("\nInfo: the atom number exceeds the MAXATOM, reallocate memory automatically"); - overflow_flag = 1; - } if (i == 5) { sscanf(line, "%s", tmpchar); (*minfo).resname[0] = tmpchar[0]; --- 169,174 ---- *************** *** 189,194 **** --- 188,198 ---- readindex = 4; if (readindex == 1) { number++; + if (number - 3 > (*cinfo).maxatom) { + printf("\nInfo: the atom number exceeds the MAXATOM," + " reallocate memory automatically"); + overflow_flag = 1; + } if (overflow_flag == 0) { sscanf(line, "%d%s%s%s%lf%lf%lf%lf", &tmpint1, tmpchar1, tmpchar2, tmpchar3, &tmpfloat1, &tmpfloat2, *** src/antechamber/parmchk.c 3 Apr 2006 23:34:26 -0000 9.0 --- src/antechamber/parmchk.c 18 Aug 2006 05:17:59 -0000 *************** *** 3773,3780 **** rmol2(ifilename, &atomnum, atom, &bondnum, bond_array, &cinfo, &minfo, 1); if (overflow_flag) { ! cinfo.maxatom = atomnum + 10; ! cinfo.maxbond = bondnum + 10; free(atom); free(bond_array); atom = (ATOM *) malloc(sizeof(ATOM) * cinfo.maxatom); --- 3773,3782 ---- rmol2(ifilename, &atomnum, atom, &bondnum, bond_array, &cinfo, &minfo, 1); if (overflow_flag) { ! cinfo.maxatom = (atomnum > cinfo.maxatom) ? atomnum : cinfo.maxatom; ! cinfo.maxbond = (bondnum > cinfo.maxbond) ? bondnum : cinfo.maxbond; ! cinfo.maxatom += 10; /* add some fudge */ ! cinfo.maxbond += 10; /* add some fudge */ free(atom); free(bond_array); atom = (ATOM *) malloc(sizeof(ATOM) * cinfo.maxatom); ------------------------------------------------------------------------------ Temporary workarounds: use antechamber programs from Amber 8. ********>Bugfix 13: Author: Junmei Wang, reported by Kazua Ohta Date: 08/18/06 Programs: Antechamber Description: The memory allocations for ind_valence and ind_bondnum with malloc have problems. The size should be atomnum not bondnum. This bug may cause problems for molecules that have a greater number of atoms than number of bonds. Fix: apply the following patch to amber9/src/antechamber/bondtype.C ------------------------------------------------------------------------------ *** src/antechamber/bondtype.C 3 Apr 2006 23:34:26 -0000 9.0 --- src/antechamber/bondtype.C 18 Aug 2006 21:38:57 -0000 *************** *** 1278,1289 **** fprintf(stderr, "memory allocation error for *con_num\n"); exit(0); } ! ind_bondnum = (int *) malloc(sizeof(int) * bondnum); if (ind_bondnum == NULL) { fprintf(stderr, "memory allocation error for *ind_bondnum\n"); exit(0); } ! ind_valence = (int *) malloc(sizeof(int) * bondnum); if (ind_valence == NULL) { fprintf(stderr, "memory allocation error for *ind_valence\n"); exit(0); --- 1278,1289 ---- fprintf(stderr, "memory allocation error for *con_num\n"); exit(0); } ! ind_bondnum = (int *) malloc(sizeof(int) * atomnum); if (ind_bondnum == NULL) { fprintf(stderr, "memory allocation error for *ind_bondnum\n"); exit(0); } ! ind_valence = (int *) malloc(sizeof(int) * atomnum); if (ind_valence == NULL) { fprintf(stderr, "memory allocation error for *ind_valence\n"); exit(0); ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 14: Author: Scott Brozell, reported by Myunggi Yi Date: 08/24/06 Programs: Antechamber Description: This is a correction to bugfix 12. prep.c when patched by bugfix 12 has a declaration after executable statements inside a block. This is not correct, but most compilers allow it. Fix: apply the following patch to amber9/src/antechamber/prep.c ------------------------------------------------------------------------------ *** src/antechamber/prep.c 18 Aug 2006 05:02:19 -0000 --- src/antechamber/prep.c 24 Aug 2006 21:36:35 -0700 *************** *** 56,68 **** if (strlen(line) == 1 && readindex == 3) readindex = 4; if (readindex == 1) { number++; if (number - 3 > (*cinfo).maxatom ) { printf("\nInfo: the atom number exceeds the MAXATOM," " reallocate memory automatically"); overflow_flag = 1; } - double tmpcharge; sscanf(line, "%d%s%s%s%d%d%d%lf%lf%lf%lf", &tmpint1, tmpchar1, tmpchar2, tmpchar3, &tmpint2, &tmpint3, &tmpint4, &tmpfloat1, &tmpfloat2, &tmpfloat3, &tmpcharge); --- 56,68 ---- if (strlen(line) == 1 && readindex == 3) readindex = 4; if (readindex == 1) { + double tmpcharge; number++; if (number - 3 > (*cinfo).maxatom ) { printf("\nInfo: the atom number exceeds the MAXATOM," " reallocate memory automatically"); overflow_flag = 1; } sscanf(line, "%d%s%s%s%d%d%d%lf%lf%lf%lf", &tmpint1, tmpchar1, tmpchar2, tmpchar3, &tmpint2, &tmpint3, &tmpint4, &tmpfloat1, &tmpfloat2, &tmpfloat3, &tmpcharge); ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 15 Author: Scott Brozell, reported by Myunggi Yi Date: 08/24/2006 Programs: ptraj Description: actions.h has a trailing comma inside an enum declaration. This is nonstandard, but most compilers allow it. Fix: apply the following patch to src/ptraj/actions.h ------------------------------------------------------------------------------ *** src/ptraj/actions.h 3 Apr 2006 23:35:48 -0000 9.0 --- src/ptraj/actions.h 25 Aug 2006 05:06:50 -0000 *************** *** 206,212 **** typedef enum _transformContactsType { CONTACTS_NULL = 0, CONTACTS_FIRST, ! CONTACTS_REFERENCE, } transformContactsType; typedef struct _transformContactsInfo { --- 206,212 ---- typedef enum _transformContactsType { CONTACTS_NULL = 0, CONTACTS_FIRST, ! CONTACTS_REFERENCE } transformContactsType; typedef struct _transformContactsInfo { ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 16 Author: Dave Case Date: 08/25/2006 Programs: sander Description: the lmod.f file in sander won't compile with gfortran, because the length of a parameter string is not considered constant. Here we just hard-code the required lengths. Better solutions will be pursued for the next release Fix: apply the following patch to src/sander/lmod.f ------------------------------------------------------------------------------ *** src/sander/lmod.f 3 Apr 2006 23:35:55 -0000 9.0 --- src/sander/lmod.f 18 Aug 2006 17:39:09 -0000 9.1 *************** *** 179,185 **** integer, parameter :: MVPM_CENTRAL_CODE = 2 character(len=*), parameter :: MVPM_FORWARD = 'forward' integer, parameter :: MVPM_FORWARD_CODE = 1 ! character(len=len(MVPM_FORWARD)) :: matrix_vector_product_method=MVPM_FORWARD integer :: mvpm_code = MVPM_FORWARD_CODE namelist /lmod/ matrix_vector_product_method --- 179,186 ---- integer, parameter :: MVPM_CENTRAL_CODE = 2 character(len=*), parameter :: MVPM_FORWARD = 'forward' integer, parameter :: MVPM_FORWARD_CODE = 1 ! !character(len=len(MVPM_FORWARD))::matrix_vector_product_method=MVPM_FORWARD ! character(len=7) :: matrix_vector_product_method=MVPM_FORWARD ! gfortran hack integer :: mvpm_code = MVPM_FORWARD_CODE namelist /lmod/ matrix_vector_product_method *************** *** 191,198 **** integer, parameter :: MC_METHOD_TOTAL_QUENCH_CODE = 2 character(len=*), parameter :: MC_METHOD_QUICK_QUENCH = 'Quick_Quench' integer, parameter :: MC_METHOD_QUICK_QUENCH_CODE = 3 ! character(len=len(MC_METHOD_QUICK_QUENCH)) :: Monte_Carlo_method & ! = MC_METHOD_METROPOLIS integer :: Monte_Carlo_method_code = MC_METHOD_METROPOLIS_CODE namelist /lmod/ Monte_Carlo_method --- 192,200 ---- integer, parameter :: MC_METHOD_TOTAL_QUENCH_CODE = 2 character(len=*), parameter :: MC_METHOD_QUICK_QUENCH = 'Quick_Quench' integer, parameter :: MC_METHOD_QUICK_QUENCH_CODE = 3 ! !character(len=len(MC_METHOD_QUICK_QUENCH)) :: Monte_Carlo_method & ! ! = MC_METHOD_METROPOLIS ! character(len=12) :: Monte_Carlo_method = MC_METHOD_METROPOLIS integer :: Monte_Carlo_method_code = MC_METHOD_METROPOLIS_CODE namelist /lmod/ Monte_Carlo_method *************** *** 254,260 **** integer, parameter :: XMIN_METHOD_PRCG_CODE = 1 character(len=*), parameter :: XMIN_METHOD_TNCG = 'TNCG' integer, parameter :: XMIN_METHOD_TNCG_CODE = 3 ! character(len=len(XMIN_METHOD_LBFGS)) :: xmin_method = XMIN_METHOD_LBFGS integer :: xmin_method_code = XMIN_METHOD_LBFGS_CODE namelist /lmod/ xmin_method --- 256,263 ---- integer, parameter :: XMIN_METHOD_PRCG_CODE = 1 character(len=*), parameter :: XMIN_METHOD_TNCG = 'TNCG' integer, parameter :: XMIN_METHOD_TNCG_CODE = 3 ! !character(len=len(XMIN_METHOD_LBFGS)) :: xmin_method = XMIN_METHOD_LBFGS ! character(len=5) :: xmin_method = XMIN_METHOD_LBFGS integer :: xmin_method_code = XMIN_METHOD_LBFGS_CODE namelist /lmod/ xmin_method ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 17 Author: Istvan Kolossvary, applied by Dave Case Date: 08/25/2006 Programs: build procedure Description: We are still trying to get the "clean" target in src/lmod to do the right thing in all circumstances. This is an update to bugfix.6 Fix: apply the following patches to src/lmod/lmod/Makefile, and to src/lmod/xmin/Makefile ------------------------------------------------------------------------------ For amber9/src/lmod/lmod/Makefile: *** src/lmod/lmod/Makefile 3 Apr 2006 23:35:29 -0000 9.0 --- src/lmod/lmod/Makefile 25 Aug 2006 16:54:17 -0000 *************** *** 16,20 **** $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f ieee.o _*.f --- 16,20 ---- $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f ieee.o lmod.o _*.f For amber9/src/lmod/xmin/Makefile: *** src/lmod/xmin/Makefile 3 Apr 2006 23:35:29 -0000 9.0 --- src/lmod/xmin/Makefile 25 Aug 2006 16:54:17 -0000 *************** *** 16,20 **** $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f ieee.o _*.f --- 16,20 ---- $(CC) -c $(CFLAGS) $(CPPFLAGS) -O0 -o $@ $< clean: ! -/bin/rm -f ieee.o xmin.o _*.f ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 18 Author: Ross Walker Date: 09/29/2006 Programs: sander Description: QMMM Calculations in which adjust_q>0 and qmcharge>0 can print an incorrect value for the QM+MM total charge after correction. This is simply an error in the informational message and does not affect the calculation results. Internally the code is applying the correction properly it is just the message that is wrong and could potentially lead to confusion. This bugfix corrects the code so that the message is consistent with what the code is actually doing. Fix: apply the following patch to src/sander/qm_zero_charges.f ------------------------------------------------------------------------------ *** src/sander/qm_zero_charges.f 2006-09-28 16:48:14.000000000 -0700 --- src/sander/qm_zero_charges.f 2006-09-28 16:48:44.000000000 -0700 *************** *** 147,153 **** charge(closest_id) = charge(closest_id) + correction end do if (master) then ! final_q_sum = qmcharge do i = 1, natom if ((.not. atom_mask(i)) .and. (.not. mm_link_mask(i))) final_q_sum = final_q_sum + charge(i) end do --- 147,153 ---- charge(closest_id) = charge(closest_id) + correction end do if (master) then ! final_q_sum = qmcharge * AMBER_ELECTROSTATIC do i = 1, natom if ((.not. atom_mask(i)) .and. (.not. mm_link_mask(i))) final_q_sum = final_q_sum + charge(i) end do *************** *** 167,173 **** correction = q_correction / dble(natom-nquant_nlink) !Should never divide by zero here as code !returns above if nquant==natom. - i.e. pure QM run. ! final_q_sum = zero do i = 1, natom !Go through each atom adding correction to it's charge if it !is not a QM or MM Link atom. --- 167,173 ---- correction = q_correction / dble(natom-nquant_nlink) !Should never divide by zero here as code !returns above if nquant==natom. - i.e. pure QM run. ! final_q_sum = qmcharge * AMBER_ELECTROSTATIC do i = 1, natom !Go through each atom adding correction to it's charge if it !is not a QM or MM Link atom. ------------------------------------------------------------------------------ Temporary workarounds: Just ignore the message and assume the code is doing things correctly. ********>Bugfix 19 Author: Dave Case Date: 09/30/2006 Programs: LEaP Description: The code for reading PDB files requires there to be a space after the letters "TER" in order for such cards to be recoginized as separator cards. This patch removes that restriction, although it is arguably a part of the PDB specification. This patch also adds a space in writing pdb files, to at least give some amount of backwards compatibility. (Users having problems with other programs can also try to recompile leap with "-DELABORATE_PDB_TER".) Fix: apply the following patch to src/leap/src/leap/pdb_read.c and to /src/leap/src/leap/pdb_write.c ------------------------------------------------------------------------------ *** src/leap/src/leap/pdb_read.c 3 Apr 2006 23:35:29 -0000 9.0 --- src/leap/src/leap/pdb_read.c 30 Sep 2006 15:37:53 -0000 *************** *** 199,205 **** r.record_type = PDB_TURN; else if (STREQN(buffer + 1, "vec", 3)) r.record_type = PDB_TVECT; ! else if (STREQN(buffer + 1, "er ", 3)) r.record_type = PDB_TER; break; --- 199,205 ---- r.record_type = PDB_TURN; else if (STREQN(buffer + 1, "vec", 3)) r.record_type = PDB_TVECT; ! else if (STREQN(buffer + 1, "er", 2)) r.record_type = PDB_TER; break; *** src/leap/src/leap/pdb_write.c 3 Apr 2006 23:35:29 -0000 9.0 --- src/leap/src/leap/pdb_write.c 30 Sep 2006 15:59:06 -0000 *************** *** 326,332 **** r->pdb.ter.residue.seq_num, r->pdb.ter.residue.insert_code); #else ! fmt = "TER"; pdb_sprintf(buffer, fmt ); #endif break; --- 326,332 ---- r->pdb.ter.residue.seq_num, r->pdb.ter.residue.insert_code); #else ! fmt = "TER "; pdb_sprintf(buffer, fmt ); #endif break; ------------------------------------------------------------------------------ Temporary workarounds: Add a space in your input PDB files ********>Bugfix 20 Author: Dave Case, based on a report and patch from Camron Abrams Date: 10/01/2006 Programs: ptraj Description: The code that reads in the eigenvectors won't work when there are more than 9999 elements. Fix: apply the following patch to src/ptraj/evec.c ------------------------------------------------------------------------------ *** src/ptraj/evec.c 3 Apr 2006 23:35:48 -0000 9.0 --- src/ptraj/evec.c 1 Oct 2006 18:59:17 -0000 *************** *** 112,126 **** "WARNING in ptraj(), readEvecFile: sscanf on coords failed\n"); return 1; } ! tmpbuf = buffer + 5; ! if (sscanf(tmpbuf, "%i", &(modinfo->nvectelem)) != 1) { ! /* ! * For compatibility with quasih and nmode output ! */ ! fprintf(stderr, ! "FYI: No value for nvectelem found in %s, assuming it is navgelem\n", modinfo->name); ! modinfo->nvectelem = modinfo->navgelem; ! } /* * Allocate memory for avg, freq, evec --- 112,128 ---- "WARNING in ptraj(), readEvecFile: sscanf on coords failed\n"); return 1; } ! switch (sscanf(buffer,"%i %i", &(modinfo->navgelem), &(modinfo->nvectelem))) { ! case 0: ! fprintf(stderr, ! "WARNING in ptraj(), readEvecFile: sscanf on coords failed\n"); ! return 1; ! case 1: /* assume the first was read in */ ! fprintf(stderr, ! "FYI: No value for nvectelem found in %s, assuming it is navgelem\n", modinfo->name); ! modinfo->nvectelem = modinfo->navgelem; ! break; ! } /* * Allocate memory for avg, freq, evec ------------------------------------------------------------------------------ Temporary workarounds: none ********>Bugfix 21 Author: Ross Walker Date: 10/20/2006 Programs: sander (idc>0) and divcon Description: This is a workaround for a bug identified in the Intel 9.1 fortran compiler. The Intel compiler generates incorrect machine code (that leads to segfaults at runtime) for loops of the form: do i=1,imax array(i) = 0.0D0 if(do_extra) array2(i) = 0.0d0 enddo Fix: This patch fixes multiple files so copy it to $AMBERHOME and then apply it with patch -p0