------------------------------------------------------------------------------ Temporary workarounds: none ********>amber9.remdrestart.bugfix: Author: Daniel R. Roe Date: 09/22/2008 Programs: sander.MPI Description: Fixes problem where restarting REMD run resulted in wrong input coordinate file being read on exchange 1. Affected files: multisander.f Fix: Run this patch in the $AMBERHOME directory, with: $ patch -p0 -N -r patch_rejects < amber9.remdrestart.bugfix ------------------------------------------------------------------------------ --- src/sander/multisander.f 2006-04-03 19:35:55.000000000 -0400 +++ src/sander/multisander.f 2008-09-22 13:42:39.000000000 -0400 @@ -99,6 +99,10 @@ character (len=80) origrestrt +! REMD: Save original input coordinate file name in case of restarting a REMD +! run, since the call to mdfil will change it. + character (len=80) originpcrd + integer ierror, masterid, i character ext*3 @@ -277,6 +281,10 @@ origrestrt = restrt + ! save the original input coordinates in case we are restarting a REMD run - + ! this has the coordinates at the correct temperature for exchange 1 + originpcrd = inpcrd + end if i = i + 1 end if @@ -664,6 +672,11 @@ restrt = origrestrt + ! If this run is being restarted, the current input + ! coordinates will need to be read after call to + ! mdfil(). + inpcrd = originpcrd + if (debugremd) write (41+worldrank,*) "called mdfil to change file names" ! mdfil sets facc to W for REM, set it back to append @@ -679,7 +692,13 @@ if (currx > 1) then inpcrd = restrt if (debugremd) write (41+worldrank,*) "copying restrt to inpcrd" - endif + elseif ( currx==1 .and. irest==1 ) then + ! If this is the first exchange and we are restarting the run, + ! restore input coordinate file name since this has the correct + ! temperature. + if (debugremd) write (41+worldrank,*) "REMD restart - restoring original inpcrd" + inpcrd = originpcrd + endif if (debugremd) then