********> bugfix.51 Author: Carlos Simmerling Date: 10/24/95 Programs: Sander Severity: Moderate Problem: When NTT<0, the random number generator is being reset every time velocities are reassigned, leading to fixed velocities and system blowup when resetting results from temperature difference from the reference exceeding DTEMP. Cause: Random number seeding was done in the velocity setting routine instead of at the beginning of program; this was ok until the NTT<0 options were added in 4.1. Fix: Make the following changes to dynlib.f and sander.f: ------------------------------------------------------------------------ *** OLD dynlib.f --- NEW dynlib.f *************** *** 857,864 c sets up initial velocities. c Mods for Rev A by gls: c - c - added call to generic random number initializer. previous - c incarnations of Amber simply ignored the seed on most systems. c - cpp selectable single/double prec. c - changed to DP constants #ifdef DPREC --- 857,862 ----- c sets up initial velocities. c Mods for Rev A by gls: c c - cpp selectable single/double prec. c - changed to DP constants #ifdef DPREC *************** *** 867,873 DIMENSION X(*),V(*),WINV(*),F(*) C NR3 = 3*NR - ISEED = IG IF(NTU.NE.2 ) GOTO 131 CRX = 0.1d0 DO 110 I = 1,NR3+iscale --- 865,870 ----- DIMENSION X(*),V(*),WINV(*),F(*) C NR3 = 3*NR IF(NTU.NE.2 ) GOTO 131 CRX = 0.1d0 DO 110 I = 1,NR3+iscale *************** *** 892,901 C WHEN REQUIRED ----- C 141 IF(TEMPI.LT.1.d-6) GOTO 171 - c - c --- seed the random number generator --- - c - call amrset(iseed) BOLTZ = 8.31441d-3 IF(NTU.EQ.1) BOLTZ = BOLTZ/4.184d0 BOLTZ = BOLTZ*TEMPI --- 889,894 ----- C WHEN REQUIRED ----- C 141 IF(TEMPI.LT.1.d-6) GOTO 171 BOLTZ = 8.31441d-3 IF(NTU.EQ.1) BOLTZ = BOLTZ/4.184d0 BOLTZ = BOLTZ*TEMPI ------------------------------------------------------------------------ *** OLD sander.f --- NEW sander.f *************** *** 379,384 NR3 = 3*NR BELLY = IBELLY.GT.0 c if (nbit .lt. 32 .and. nr .gt. 32767) then write(6, *) ' Too many atoms for 16 bit pairlist -' write(6, *) ' Recompile without ISTAR2' --- 379,388 ----- NR3 = 3*NR BELLY = IBELLY.GT.0 c + c --- seed the random number generator --- + c + call amrset(ig) + c if (nbit .lt. 32 .and. nr .gt. 32767) then write(6, *) ' Too many atoms for 16 bit pairlist -' write(6, *) ' Recompile without ISTAR2' ------------------------------------------------------------------------ Temporary workarounds: None. --