********> bugfix.35 Correction Author: Julian Tirado-Rives & David A. Pearlman Correction Date: 3/6/92 (Note: Julian Tirado-Rives at Yale discovered and tracked down this bug. All I did was flesh out the bug report form and determine the circumstances under which the bugs would be encountered. Thanks Julian! -- dap). Programs: GIBBS Severity: moderate Problem: An attempt to run a free energy simulation where the following conditions are met will produce erroneous free energy results: 1) The contributions from constraints to the free energy have been requested (NCORC = 1). 2) "Old style" electrostatic mixing rules have been explicitly requested (IOLEPS = 1). Note that if one leaves IOLEPS=0 (generally recommended, and suggested in the manual), this bug will not be encountered. Affects: The free energy reported will probably be very large. Enough so that it should be clear that some type of anomalous behavior is occurring. Cause: The bug is caused by a mistake in the code that calculates certain 1-4 electrostatic interactions, in the case where free energy contributions from constraints are being determined and IOLEPS=1. Fix: Make the following changes ***To routine NBNDCC in src/gibbs/machinedep.f *** OLD machinedep.f --- NEW machinedep.f *************** *** 2950,2956 E10 = (ALMU(1)*CHGL1 + ALMU(2)*CHGL0) * R6W(1) ELSE CGJP0 = CG(J+INDEL1)*ALMU(1)+CG(J+INDEL2)*ALMU(2) ! E10 = CGIP0*CGJP0*R6W(JN) END IF C G1W(1) = E10/SEE --- 2950,2956 ----- E10 = (ALMU(1)*CHGL1 + ALMU(2)*CHGL0) * R6W(1) ELSE CGJP0 = CG(J+INDEL1)*ALMU(1)+CG(J+INDEL2)*ALMU(2) ! E10 = CGIP0*CGJP0*R6W(1) END IF C G1W(1) = E10/SEE Temporary workarounds: Use IOLEPS=0. For almost all applications, this option is recommended. If you must use IOLEPS=1 and NCORC=1, you must install this fix. Routines affected: GIBBS Routine NBNDCC in file .../amber4/src/gibbs/machinedep.f