********> bugfix.40 Correction Author: David A. Pearlman Correction Date: 5/11/92 Programs: GIBBS Severity: slight Problem: The second value in the total range of lambda values printed in the summary section of the MICSTAT file might be incorrect in the case where statistics are being "dumped" to the MICSTAT file frequently. This is unlikely to occur if the default value of NDMPMC (0) has been used, as is typical. *In any case, the ONLY incorrect value in the MICSTAT file would be this single second value in the lambda range, i.e.* *SUMMARY* FREE ENERGIES # STEPS DATA COLLECTION AVE TOT AVE AVE TOTAL TOTAL WIND STEPS LAMBDA dLAMBDA NR EQ COLL FORWARD REVERSE 5 20 1.00-0.00 0.080000 0 2 2 -2.5793 3.2463 ^^^^ \ only this value would be affected. NO other values in the file would be incorrect. Affects: The value shown might be incorrect. A likely value would be 0.00 when the simulation did not end at lambda=0. All other lambda and free energy information in the file is correct. Cause: The summary print stage consists of dumping any remaining statistics, followed by printing the summary. The logic being used assumed that at least one window's worth of statistics would be printed before the summary print. If this was not the case, the incorrect lambda value noted above could result. Fix: Make the following changes (see 0README for a description of context diffs) ---To routine MICST in src/gibbs/micst.f------------------------------------- *** OLD micst.f --- NEW micst.f *************** *** 99,105 **** C DATA SMALL/1.0D-9/ DATA BLANK/' '/ ! SAVE IONCE,SMALL,BLANK,IWNDNO SAVE /MICST0/,/MICST1/ C IF (NDUMP.LT.0) RETURN --- 99,105 ---- C DATA SMALL/1.0D-9/ DATA BLANK/' '/ ! SAVE IONCE,SMALL,BLANK,IWNDNO,ALMLST SAVE /MICST0/,/MICST1/ C IF (NDUMP.LT.0) RETURN *************** *** 264,269 **** --- 264,270 ---- 1210 CONTINUE C NTOT(0) = NTOT(NCOUNT-1) + ALMLST = ALAM0(IEND) c NWIND = NWIND + NCOUNT-1 NWIND = IWNDNO NCOUNT = 1 *************** *** 282,288 **** IF (IWNDNO.EQ.0) IWNDNO = 1 RL = FLOAT(IWNDNO) WRITE(IOUT,1303) ! WRITE(IOUT,1304) IWNDNO,NTOT(IEND),ALM1,ALAM0(IEND),DLTOT/RL, * NRTOT,NINT(FLOAT(NEQTOT)/RL), * NINT(FLOAT(NCOTOT)/RL), * AFCTOT,ARCTOT --- 283,289 ---- IF (IWNDNO.EQ.0) IWNDNO = 1 RL = FLOAT(IWNDNO) WRITE(IOUT,1303) ! WRITE(IOUT,1304) IWNDNO,NTOT(IEND),ALM1,ALMLST,DLTOT/RL, * NRTOT,NINT(FLOAT(NEQTOT)/RL), * NINT(FLOAT(NCOTOT)/RL), * AFCTOT,ARCTOT ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Temporary workarounds: The error is trivial, and can easily be ignored. Routines affected: GIBBS Routine MICST in .../amber4/src/gibbs/micst.f