********> bugfix.79 Correction Author: David A. Pearlman Correction Date: 10/15/96 Programs: SANDER, GIBBS Severity: Moderate Problem: The following message is displayed: WARNING: Bond lengths params not found in PARM file for fast water model; using TIP3P defaults. This is a bug when the bond lengths are indeed in the PARM file, as should be the case. The message can happen when: 1) One is using a belly (IBELLY = 1) 2) The first water atom in the system is NOT part of the moving belly 3) One is allowing usage of the "fast SHAKE" routines. That is JFASTW.NE.4. If using TIP3P water (the normal case), it is only annoying. But if one is attempting to use a water model OTHER than TIP3P (with different bond lengths), it means that the wrong parameters will be used. Affects: The desired water model may be incorrectly implemented. Cause: When a belly simulation is requested, any bonds for which both atoms are part of the non-moving part of the system are removed from the bonds list for computational efficiency. The routine that determines the equilibrium bond length parameters for "fast SHAKE" does so by matching up the bonds for the FIRST water molecule in the system with its associated bonds in the list. Obviously, if these bonds have been removed from the list because that water is not part of the moving belly, the search will fail and the program will default to TIP3P values. The fix is to do the distance check against the first *moving* water molecule in a belly simulation. Fix: Make the following changes to routine GETWDS in both the SANDER and GIBBS directories, plus the necessary changes to sander.f and gib.f, respectively. ------------------------------------------------------------------------------ *** OLD sander/fastwt.f --- NEW sander/fastwt.f *************** *** 863,869 **** SUBROUTINE GETWDS(IGRAPH ,NRES ,IPRES ,LBRES , 2 NBONH ,NBONA ,NBPER ,IB ,JB , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,ICB , ! 4 REQ ,WINV ,RBTARG ,IOUT) C C Subroutine GET Water DiStances C --- 863,870 ---- SUBROUTINE GETWDS(IGRAPH ,NRES ,IPRES ,LBRES , 2 NBONH ,NBONA ,NBPER ,IB ,JB , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,ICB , ! 4 REQ ,WINV ,RBTARG ,IBELLY ,IGRP , ! 5 IOUT) C C Subroutine GET Water DiStances C *************** *** 913,918 **** --- 914,920 ---- #endif DIMENSION IGRAPH(*),IPRES(*),LBRES(*),IB(*),JB(*) DIMENSION IHWTNM(*),ICB(*),REQ(*),RBTARG(*),WINV(*) + DIMENSION IGRP(*) C SAVE SMALL DATA SMALL/1.0D-4/ *************** *** 931,936 **** --- 933,945 ---- IHF2 = 0 DO 20 J = 1,3 IAT = IPRES(I)+J-1 + C + C -- any waters not part of moving belly (IGRP(I)=0) + C will have had their bond parameters removed from + C list already and these must be skipped here + C + IF (IBELLY.GT.0 .AND. IGRP(IAT).LE.0) GO TO 10 + C IF (IGRAPH(IAT).EQ.IOWTNM) THEN IOF = 3*(IAT-1) RBTARG(6) = 1.0D0/WINV(IAT) ------------------------------------------------------------------------------ *** OLD gibbs/fastwt.f --- NEW gibbs/fastwt.f *************** *** 762,768 **** SUBROUTINE GETWDS(IGRAPH ,NRES ,IPRES ,LBRES , 2 NBONH ,NBONA ,NBPER ,IB ,JB , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,ICB , ! 4 REQ ,WINV ,RBTARG ,IOUT) C C Subroutine GET Water DiStances C --- 762,769 ---- SUBROUTINE GETWDS(IGRAPH ,NRES ,IPRES ,LBRES , 2 NBONH ,NBONA ,NBPER ,IB ,JB , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,ICB , ! 4 REQ ,WINV ,RBTARG ,IBELLY ,IGRP , ! 5 IOUT) C C Subroutine GET Water DiStances C *************** *** 810,815 **** --- 811,817 ---- IMPLICIT DOUBLE PRECISION (A-H,O-Z) DIMENSION IGRAPH(*),IPRES(*),LBRES(*),IB(*),JB(*) DIMENSION IHWTNM(*),ICB(*),REQ(*),RBTARG(*),WINV(*) + DIMENSION IGRP(*) C SAVE SMALL DATA SMALL/1.0D-4/ *************** *** 828,833 **** --- 830,842 ---- IHF2 = 0 DO 20 J = 1,3 IAT = IPRES(I)+J-1 + C + C -- any waters not part of moving belly (IGRP(I)=0) + C will have had their bond parameters removed from + C list already and these must be skipped here + C + IF (IBELLY.GT.0 .AND. IGRP(IAT).LE.0) GO TO 10 + C IF (IGRAPH(IAT).EQ.IOWTNM) THEN IOF = 3*(IAT-1) RBTARG(6) = 1.0D0/WINV(IAT) ------------------------------------------------------------------------------ *** OLD sander/sander.f --- NEW sander/sander.f *************** *** 500,506 **** CALL GETWDS(IH(M04) ,NRES ,IX(I02) ,IH(M02) , 2 NBONH ,NBONA ,0 ,IX(I12) ,IX(I14) , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,IX(I16) , ! 4 REQ ,X(L20) ,RBTARG ,6) C CALL FSWIND(IBGWAT ,IENWAT ,JFASTW ,IORWAT , * IWATPR ,NRES ,NTB ,0 ,ISFTRP , --- 500,507 ---- CALL GETWDS(IH(M04) ,NRES ,IX(I02) ,IH(M02) , 2 NBONH ,NBONA ,0 ,IX(I12) ,IX(I14) , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,IX(I16) , ! 4 REQ ,X(L20) ,RBTARG ,IBELLY ,IX(I62) , ! 5 6) C CALL FSWIND(IBGWAT ,IENWAT ,JFASTW ,IORWAT , * IWATPR ,NRES ,NTB ,0 ,ISFTRP , ------------------------------------------------------------------------------ *** OLD gibbs/gib.f --- NEW gibbs/gib.f *************** *** 656,662 **** CALL GETWDS(LH(LH10) ,NRES ,IX(I02) ,LH(LH05) , 2 NBONH ,NBONA ,NBPER ,IX(I12) ,IX(I14) , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,IX(I16) , ! 4 REQ ,X(L20) ,RBTARG ,6) C CALL FSWIND(IBGWAT ,IENWAT ,JFASTW ,IORWAT , * IWATPR ,NRES ,NTB ,0 ,ISFTRP , --- 656,663 ---- CALL GETWDS(LH(LH10) ,NRES ,IX(I02) ,LH(LH05) , 2 NBONH ,NBONA ,NBPER ,IX(I12) ,IX(I14) , 3 IWTNM ,IOWTNM ,IHWTNM ,JFASTW ,IX(I16) , ! 4 REQ ,X(L20) ,RBTARG ,IBELLY ,IX(I62) , ! 5 6) C CALL FSWIND(IBGWAT ,IENWAT ,JFASTW ,IORWAT , * IWATPR ,NRES ,NTB ,0 ,ISFTRP , ------------------------------------------------------------------------------ Temporary workarounds: You can set JFASTW = 4, which will bypass using the fast SHAKE routine. The standard SHAKE routine will use the correct (user-specified) equilibrium bond lengths. You can also rearrange the order of the waters in the system to ensure that the first water in the system is part of the moving belly. --