********> bugfix.33 Correction Author: David A. Pearlman Correction Date: 3/6/92 Programs: MINMD,SANDER,GIBBS Severity: moderate Problem: The total energy reported when valence angle or torsional restraints have been defined in the PARM program does not equal the sum of the standard energy + the reported restraint energy. In fact, Etotal = Estandard + 2*(Eangle-restraints+Etorsion-restraints). The actual trajectory is correct and does not reflect the factor of 2. The factor of two does not occur for distance restraints defined in PARM. This problem will only arise under the following conditions: Restraints have been defined in the PARM file. The above problems DO NOT occur if restraints are defined in the input for SANDER. Affects: The total energy reported when PARM-added angle and torsional restraints are used will not equal the sum of the standard energy and the reported "CONSTRAINTS" energy. The trajectory will be correct, however. Causes: Accumulators that keep track of the energies due to PARM-added valence angle and torsion angle restraint energies are incorrectly being summed into the total energy accumulator, after these energies are already accounted for in the total. Fix: Make the following changes ***To routine FORCE in src/lib/force.f --old lines: ENE(6) = ENE(8)+ENE(9)+ENE(18) ENE(7) = ENE(10)+ENE(13)+ENE(19) ENE(8) = ENE(11)+ENE(14) ENE(9) = ENE(12)+ENE(15) c dac change 1/90: add in nmr energies to constraints: c ENE(10) = ENE(17)+ENE(18)+ENE(19)+ENE(20) ENE(10) = ENE(17)+ENE(18)+ENE(19)+ENE(20)+eshf+enoe+ * enmr(1)+enmr(2)+enmr(3) ENE(1) = ENE(1)+ENE(10) --new lines: ENE(6) = ENE(8)+ENE(9)-ENE(18) ENE(7) = ENE(10)+ENE(13)-ENE(19) ENE(8) = ENE(11)+ENE(14) ENE(9) = ENE(12)+ENE(15) c dac change 1/90: add in nmr energies to constraints: c ENE(10) = ENE(17)+ENE(18)+ENE(19)+ENE(20) ENE(10) = ENE(17)+ENE(18)+ENE(19)+ENE(20)+eshf+enoe+ * enmr(1)+enmr(2)+enmr(3) ENE(1) = ENE(1)+ENE(10)-ENE(18)-ENE(19) ***To routine FORCE in src/gibbs/gibb.f --old lines: ENE(6) = ENE(8)+ENE(9)+ENE(22) ENE(7) = ENE(10)+ENE(13)+ENE(23) ENE(8) = ENE(11)+ENE(14)+ENE(24) ENE(9) = ENE(12)+ENE(15)+ENE(25) ENE(10) = ENE(17)+ENE(18)+ENE(19)+ENE(20) ENE(1) = ENE(1)+ENE(10) --new lines: ENE(6) = ENE(8)+ENE(9)-ENE(18)+ENE(22) ENE(7) = ENE(10)+ENE(13)-ENE(19)+ENE(23) ENE(8) = ENE(11)+ENE(14)+ENE(24) ENE(9) = ENE(12)+ENE(15)+ENE(25) ENE(10) = ENE(17)+ENE(18)+ENE(19)+ENE(20) ENE(1) = ENE(1)+ENE(10)-ENE(18)-ENE(19) Temporary workarounds: Bugs of the type described above (incorrect total energy reported) can be avoided by defining all added restraints as input to SANDER. Routines affected: MINMD/ SANDER Routine FORCE in file .../amber4/src/lib/force.f GIBBS Routine FORCE in file .../amber4/src/gibbs/gibb.f