Fixing a problem with dh/dl 1-4 interactions
authorMichael Shirts <michael.shirts@virginia.edu>
Sat, 20 Apr 2013 15:57:55 +0000 (11:57 -0400)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 26 Apr 2013 16:46:51 +0000 (18:46 +0200)
In some cases, dh/dl interactions are added twice when the
couple-intermol keyword is not used.

These lines were originally removed in 7763fa8f while fixing thread
safety in free-energy calculations, but were erroneously re-introduced
in f40969c. Versions 4.6 and 4.6.1 were affected.

Fixes #1225

Change-Id: If24177833eb4a96a6c6ef0d1ecc9a23bf80a90b1

src/gmxlib/bondfree.c

index 8d001790031ef7a54aa2782e23c2d609d7588ce6..85eb7544db8799823a643bb722e7e987127c521e 100644 (file)
@@ -3730,9 +3730,6 @@ static real calc_one_bond(FILE *fplog, int thread,
             v = do_nonbonded_listed(ftype, nbn, iatoms+nb0, idef->iparams, (const rvec*)x, f, fshift,
                                     pbc, g, lambda, dvdl, md, fr, grpp, global_atom_index);
 
-            enerd->dvdl_nonlin[efptCOUL] += dvdl[efptCOUL];
-            enerd->dvdl_nonlin[efptVDW]  += dvdl[efptVDW];
-
             if (bPrintSepPot)
             {
                 fprintf(fplog, "  %-5s + %-15s #%4d                  dVdl %12.5e\n",