********>bugfix.47: Author: Jason Swails Date: 8/31/2009 Programs: sander Description: Constant pH with closely interacting residues can misbehave due to an incorrectly formed tpair array. Further problems occur in parallel simulations since the tpair array is only updated on the master node in runmd.f Apply the following patch to $AMBERHOME/src/sander/constantph.f $AMBERHOME/src/sander/runmd.f ------------------------------------------------------------------------------ --- constantph.f 2009-08-31 19:23:15.000000000 -0400 +++ constantph.f 2009-08-31 19:25:23.000000000 -0400 @@ -52,7 +52,7 @@ integer :: i, j, pi, ti, tj _REAL_ :: xij, yij, zij - pi = trescnt !Start dynamic list after header + pi = trescnt + 1 !Start dynamic list after header do i = 0, trescnt - 1 tpair(i) = pi !Start index into list for current residue --- runmd.f 2009-08-31 19:15:05.000000000 -0400 +++ runmd.f 2009-08-31 19:32:57.000000000 -0400 @@ -798,10 +798,15 @@ end if ! Constant pH setup - if ((icnstph /= 0) .and. (mod(irespa,ntcnstph) == 0)) then - call cnstphbeginstep(ix(icpstinf),ix(icpresst), & - ix(icptrsct), & - xx(lcpene),xx(lcpcrg),xx(l190),icpselres,icpselstat, cnstph_rand_gen,ix(icptpair)) + if (icnstph /= 0) then + if (ntnb.eq.1) then + call cnstphupdatepairs(x,ix(icptrsct),ix(icphidx),ix(icptpair)) + end if + if (mod(irespa,ntcnstph) == 0) then + call cnstphbeginstep(ix(icpstinf),ix(icpresst), & + ix(icptrsct), & + xx(lcpene),xx(lcpcrg),xx(l190),icpselres,icpselstat, cnstph_rand_gen,ix(icptpair)) + end if end if !-------------------------------------------------------------- @@ -2053,7 +2058,6 @@ if (icnstph /= 0) then call cnstphwriterestart(ix(icpstinf),ix(icpresst),ix(icpptcnt), & ix(icptrsct), xx(lcpene),xx(lcpcrg)) - call cnstphupdatepairs(x,ix(icptrsct),ix(icphidx),ix(icptpair)) end if end if ! (ixdump) ------------------------------------------------------------------------------ Temporary workarounds: None