********> bugfix.60 Correction Author: David A. Pearlman Correction Date: 02/24/94 Programs: GIBBS Severity: Moderate Problem: An attempt to run a belly simulation with Gibbs can give erroneous results. This will only occur when one or more of the following conditions have been met: 1) The number of bonds removed from the system (non-moving parts of the system) is less than the number of bonds in the "peturbed" group. 2) The number of angles removed from the system (non-moving parts of the system) is less than the number of angles in the "peturbed" group. 3) The number of torsions removed from the system (non-moving parts of the system) is less than the number of torsions in the "peturbed" group. This bug only affects simulations run with a "belly". Affects: In all likelihood, the program would crash with a SHAKE/TORCON error (if constraints were being used), or the temperature behavior would be indicative of a problem. Cause: A very longstanding (since program creation) bug whereby the resetting of internal coordinate pointers due to the "belly" was being incorrectly performed. The result is that the (lambda=1) parameter pointers for internal coordinates in the perturbed group could be incorrectly reset. Fix: Make the following changes to routine SETVAR ---To routine SETVAR in file giba.f ----------------------------------------- *** OLD giba.f --- NEW giba.f *************** *** 5349,5356 **** IX(I12+NBONH+NBONA+I-1) = IX(I18+LBONA+I-1) IX(I14+NBONH+NBONA+I-1) = IX(I20+LBONA+I-1) IX(I16+NBONH+NBONA+I-1) = IX(I22+LBONA+I-1) - IX(I16+NBONH+NBONA+NBPER+I-1) = IX(I22+LBONA+NBPER+I-1) 120 CONTINUE 140 CONTINUE I18 = I12+NBONH I20 = I14+NBONH --- 5349,5362 ---- IX(I12+NBONH+NBONA+I-1) = IX(I18+LBONA+I-1) IX(I14+NBONH+NBONA+I-1) = IX(I20+LBONA+I-1) IX(I16+NBONH+NBONA+I-1) = IX(I22+LBONA+I-1) 120 CONTINUE + C + C Bugfix #60 (2/94) + C + DO 121 I = 1,NBPER + IX(I16+NBONH+NBONA+NBPER+I-1) = IX(I22+LBONA+NBPER+I-1) + 121 CONTINUE + 140 CONTINUE I18 = I12+NBONH I20 = I14+NBONH *************** *** 5379,5386 **** IX(I26+NTHETH+NTHETA+I-1) = IX(I34+LTHETA+I-1) IX(I28+NTHETH+NTHETA+I-1) = IX(I36+LTHETA+I-1) IX(I30+NTHETH+NTHETA+I-1) = IX(I38+LTHETA+I-1) - IX(I30+NTHETH+NTHETA+NGPER+I-1) = IX(I38+LTHETA+NGPER+I-1) 220 CONTINUE 240 CONTINUE I32 = I24+NTHETH I34 = I26+NTHETH --- 5385,5398 ---- IX(I26+NTHETH+NTHETA+I-1) = IX(I34+LTHETA+I-1) IX(I28+NTHETH+NTHETA+I-1) = IX(I36+LTHETA+I-1) IX(I30+NTHETH+NTHETA+I-1) = IX(I38+LTHETA+I-1) 220 CONTINUE + C + C Bugfix #60 (2/94) + C + DO 221 I = 1,NGPER + IX(I30+NTHETH+NTHETA+NGPER+I-1) = IX(I38+LTHETA+NGPER+I-1) + 221 CONTINUE + 240 CONTINUE I32 = I24+NTHETH I34 = I26+NTHETH *************** *** 5412,5419 **** IX(I44+NPHIH+NPHIA+I-1) = IX(I54+LPHIA+I-1) IX(I46+NPHIH+NPHIA+I-1) = IX(I56+LPHIA+I-1) IX(I48+NPHIH+NPHIA+I-1) = IX(I58+LPHIA+I-1) - IX(I48+NPHIH+NPHIA+NDPER+I-1) = IX(I58+LPHIA+NDPER+I-1) 320 CONTINUE 340 CONTINUE I50 = I40+NPHIH I52 = I42+NPHIH --- 5424,5437 ---- IX(I44+NPHIH+NPHIA+I-1) = IX(I54+LPHIA+I-1) IX(I46+NPHIH+NPHIA+I-1) = IX(I56+LPHIA+I-1) IX(I48+NPHIH+NPHIA+I-1) = IX(I58+LPHIA+I-1) 320 CONTINUE + C + C Bugfix #60 (2/94) + C + DO 321 I = 1,NDPER + IX(I48+NPHIH+NPHIA+NDPER+I-1) = IX(I58+LPHIA+NDPER+I-1) + 321 CONTINUE + 340 CONTINUE I50 = I40+NPHIH I52 = I42+NPHIH ------------------------------------------------------------------------------ Temporary workarounds: None. Routines affected: GIBBS Routine SETVAR in file ...amber4/src/gibbs/giba.f --