cd $AMBERHOME/src/sander patch -p0 -N -r patch_rejects < sander.FixEVB.patch Author: Daniel R. Roe Date: 2010-04-01 Description: Fixes bug in the code that caused certain EVB tests to segfault: cd evb/malon_dbonds_umb_dg_UFF_3DG_qi_full_2D-PMF && ./Run.evb cd evb/malon_dbonds_umb_dg_UFF_3DG_qi_full_corrF && ./Run.evb The array dmdlm in pimd_force.f:pimd_part_spring_force() was being accessed even when itimass was 0 and dmdlm was NULL, resulting in the segfault. Also rolls back a change to evb_umb.f:evb_umb(). The fharm array is being set to zero inside loops, which was causing inconsistent output in the malon_dbonds_umb_dg_UFF_3DG_qi_full_2D-PMF test case. fharm is now set to zero outside loops as before, restoring the behavior. ----------------------------------------------------------------------------- --- pimd_force.f 2010-03-27 10:01:44.000000000 -0400 +++ pimd_force.f 2010-04-01 16:57:59.000000000 -0400 @@ -145,7 +145,7 @@ #ifdef MPI #ifdef LES - if( i_qi > 0 ) then + if( i_qi > 0 .and. itimass > 0) then dlnCdd_dl = dvdl --- evb_umb.f 2010-03-27 10:01:44.000000000 -0400 +++ evb_umb.f 2010-04-01 17:31:55.000000000 -0400 @@ -99,11 +99,11 @@ case( "dbonds_umb", "qi_dbonds_pmf", "qi_dbonds_dyn" ) -! fharm(:) = 0.0d0 + fharm(:) = 0.0d0 do n = 1, nbias - fharm(:) = 0.0d0 +! fharm(:) = 0.0d0 idx = ( dbonds_RC(n)%iatom - 1 ) * 3 jdx = ( dbonds_RC(n)%jatom - 1 ) * 3 @@ -188,11 +188,11 @@ case( "bond_umb", "qi_bond_pmf", "qi_bond_dyn" ) -! fharm(:) = 0.0d0 + fharm(:) = 0.0d0 do n = 1, nbias - fharm(:) = 0.0d0 +! fharm(:) = 0.0d0 idx = ( bond_RC(n)%iatom - 1 ) * 3 jdx = ( bond_RC(n)%jatom - 1 ) * 3