diff --git src/sander/remd.f src/sander/remd.f index 8aba77a..1ac7da8 100644 --- src/sander/remd.f +++ src/sander/remd.f @@ -1227,7 +1227,7 @@ subroutine hybrid_remd_ene( & ! # of atoms (natom). The coords will be imaged. if (sanderrank==0) write(6,'(a)') "HYBRID REMD: Stripping waters" call stripwat(natom,hybrid_coord,ix(i02),ih(m02),x(lmass), & - ix(i70),nspm,nres,numwatkeep) + ix(i70),nspm,nres,numwatkeep,x(lcrdr)) if (sanderrank==0) then write(6,'(a,i8)') "HYBRID REMD: New natom= ",natom !write (6,*) "Post-strip coordinates: " @@ -1354,7 +1354,7 @@ end subroutine hybrid_remd_ene ! ! 9. Return. !===================================================================== -subroutine stripwat(nrp,x,ipres,lbres,amass,nsp,nspm,nres,numwatkeep) +subroutine stripwat(nrp,x,ipres,lbres,amass,nsp,nspm,nres,numwatkeep,xr) implicit none # include "parallel.h" @@ -1364,7 +1364,7 @@ subroutine stripwat(nrp,x,ipres,lbres,amass,nsp,nspm,nres,numwatkeep) integer, parameter :: size=10000 integer nrp, ipres(*), nsp(*), nspm, nres, numwatkeep - _REAL_ x(*), amass(*) + _REAL_ x(*), amass(*), xr(*) character(len=4) lbres(*) _REAL_ x2(size), closedist(size), xcm(3) @@ -1429,6 +1429,9 @@ subroutine stripwat(nrp,x,ipres,lbres,amass,nsp,nspm,nres,numwatkeep) x(3*i-2) = x(3*i-2)-xcm(1) x(3*i-1) = x(3*i-1)-xcm(2) x(3*i) = x(3*i)-xcm(3) + xr(3*i-2) = xr(3*i-2)-xcm(1) + xr(3*i-1) = xr(3*i-1)-xcm(2) + xr(3*i) = xr(3*i)-xcm(3) enddo ! now re-image the box