********> bugfix.48 Correction Author: David A. Pearlman Correction Date: 10/12/95 Programs: Sander Severity: moderate Problem: Attempts to change the relative weights of non-bonded (van der Waals) interactions in a system using the VDW, NB or ALL weight change cards do not work correctly. On some systems this could cause a crash due to an attempt to use an undefined variable. On other systems, results would simply not be as expected. This bug is new to Amber 4.1. This bug does not exist in Amber 4.0. Affects: The non-bonded interactions will not be scaled as expected. Cause: A statement assigning the number of non-bonded parameters was incorrectly placed in a routine above that which performs the weight changes. As a result, the non-bonded parameters were not all changed correctly. Fix: Make the following changes to force.f and forcemp.f. The correction amounts to moving a single line defining the variable NTTYP to an 'earlier' position. -------------------------------------------------------------------- Changes to force.f in amber41/src/sander: -------------------------------------------------------------------- *** OLD force.f --- NEW force.f *************** *** 151,156 BELLY = IBELLY.GT.0 NOCRST = .false. KBOND = NBONA-MBONA #ifdef MPI if (mpi_orig) then c =========================== AMBER/MPI =========================== --- 151,157 ----- BELLY = IBELLY.GT.0 NOCRST = .false. KBOND = NBONA-MBONA + NTTYP = NTYPES*(NTYPES+1)/2 #ifdef MPI if (mpi_orig) then c =========================== AMBER/MPI =========================== *************** *** 371,377 end if END IF C - NTTYP = NTYPES*(NTYPES+1)/2 emtot = 0.0d0 C C ---------------------------------------------------------------- --- 372,377 ----- end if END IF C emtot = 0.0d0 C C ---------------------------------------------------------------- -------------------------------------------------------------------- Changes to forcemp.f in amber41/src/sander: -------------------------------------------------------------------- *** OLD forcemp.f --- NEW forcemp.f *************** *** 150,155 BELLY = IBELLY.GT.0 NOCRST = .false. KBOND = NBONA-MBONA #ifdef MPI c =========================== AMBER/MPI =========================== c --- 150,156 ----- BELLY = IBELLY.GT.0 NOCRST = .false. KBOND = NBONA-MBONA + NTTYP = NTYPES*(NTYPES+1)/2 #ifdef MPI c =========================== AMBER/MPI =========================== c *************** *** 413,419 end if END IF C - NTTYP = NTYPES*(NTYPES+1)/2 emtot = 0.0d0 C C ---------------------------------------------------------------- --- 414,419 ----- end if END IF C emtot = 0.0d0 C C ---------------------------------------------------------------- ------------------------------------------------------------------------------ Temporary workarounds: None. Routines affected: SANDER files ...amber4/src/sander/force.f ...amber4/src/sander/forcemp.f --