********> bugfix.46 Correction Author: Eric Billings, U. Connecticut Additional Credit: Terry Lybrand, Todd Ewing and Eric Swanson at U. Washington for independent discovery. Correction Date: 8/7/92 Programs: PARM Severity: serious Problem: When parm matches dihedral parameters in the parm file to atom types, if no dihedral matches all four atoms (either directly or using wild card(s)), a dihedral having the two central atoms matching will be substituted if one exists. Affects: Particularly people who define their own residues or modify the force field file. Wrong dihedral parameters may be applied. Cause: Presumably an old programming decision or incompleted effort. Fix: substitute the following for file pointp.f ----------------------------------- c----------------------------------------------------------------------- SUBROUTINE POINTP(IP,JP,KP,LP,ICP,ISYMBL,IGRAPH,NPHI,NOGO) C C************************************************************************ C AMBER ** C ** C Copyright (c) 1986, 1991 Regents of the University of California ** C All Rights Reserved. ** C ** C This software provided pursuant to a license agreement containing ** C restrictions on its disclosure, duplication, and use. This software ** C contains confidential and proprietary information, and may not be ** C extracted or distributed, in whole or in part, for any purpose ** C whatsoever, without the express written permission of the authors. ** C This notice, and the associated author list, must be attached to ** C all copies, or extracts, of this software. Any additional ** C restrictions set forth in the license agreement also apply to this ** C software. ** C************************************************************************ C C C ----- GENERATE THE BOND PARAMTER POINTER ----- C parameter (MAXBPT=1700) parameter (MAXAPT=700) parameter (MAXDPT=600) parameter (MAXIPT=200) parameter (MAXNBT=60) COMMON/PASPAR/NUMBND,NUMANG,NUMPHI,NUMPHN,IZ3,IBT(MAXBPT), + JBT(MAXBPT),ITT(MAXAPT),JTT(MAXAPT),KTT(MAXAPT), + IPT(MAXDPT),JPT(MAXDPT),KPT(MAXDPT),LPT(MAXDPT), + IIPT(MAXIPT),JJPT(MAXIPT),KKPT(MAXIPT), + LLPT(MAXIPT),IPNTR(MAXDPT),NO(MAXNBT,MAXNBT) COMMON/IOFILE/IN,IOUT,IOUTB,IWI,IWN,IWA,IWO,INPO,IWP C DIMENSION IP(*),JP(*),KP(*),LP(*),ICP(*),ISYMBL(*),IGRAPH(*) C DATA ITYPX /2HX / C DO 1 I = 1,NPHI IP1 = IP(I) JP1 = JP(I) KM = KP(I) LM = LP(I) C C ----- MUST REVERSE DIHEDRAL OR WILL LOSE - SIGN INFO C I.E. 0 BECOMES -0 IF ATOM NUMBER = 1 AND IT SHOULD BE - ---- C IF(KM.EQ.-1.OR.LM.EQ.-1) CALL REVDIH(IP1,JP1,KM,LM) C KN = KM LN = LM KP1 = IABS(KN) LP1 = IABS(LN) IS1 = ISYMBL(IP1) JS1 = ISYMBL(JP1) KS1 = ISYMBL(KP1) LS1 = ISYMBL(LP1) IP(I) = 3*IP1-3 JP(I) = 3*JP1-3 KP(I) = 3*KP1-3 LP(I) = 3*LP1-3 IF(KN.LT.0) KP(I) = -KP(I) IF(LN.LT.0) LP(I) = -LP(I) MTEMP = 0 IF(LN.LT.0) GO TO 6 C C ----- FIRST LOOKS FOR SPECIFIC DIHEDRAL ANGLE TYPE C CHECKS TO SEE IF DIHEDRAL WITH ALL 4 ATOMS SPECIFIED C IS PRESENT ----- C DO 2 J = 1,NUMPHI CALL FNDDI2(IS1,JS1,KS1,LS1,IPT(J),JPT(J),KPT(J),LPT(J), + MATCH) IF(MATCH.EQ.0) + CALL FNDDI2(IS1,JS1,KS1,LS1,LPT(J),KPT(J),JPT(J),IPT(J), + MATCH) IF(MATCH.EQ.1) GO TO 5 2 CONTINUE C C ----- NO SPECIFIC DIHEDRAL MATCH, FIND GENERAL DIHEDRAL TYPE ----- C DO 4 J = 1,NUMPHI IF(ITYPX.EQ.IPT(J).AND.JS1.EQ.JPT(J).AND.KS1.EQ.KPT(J) + .AND.ITYPX.EQ.LPT(J)) GO TO 5 IF(ITYPX.EQ.IPT(J).AND.KS1.EQ.JPT(J).AND.JS1.EQ.KPT(J) + .AND.ITYPX.EQ.LPT(J)) GO TO 5 4 CONTINUE C C ----- NO APPROPRIATE DIHEDRAL TYPE IS PRESENT ----- C GO TO 30 5 MTEMP = J GO TO 30 C C ----- CHECK FOR IMPROPER DIHEDRALS ----- C 6 IF(NUMPHN.EQ.0) GO TO 30 IT1 = IGRAPH(IP1) JT1 = IGRAPH(JP1) KT1 = IGRAPH(KP1) LT1 = IGRAPH(LP1) DO 8 K = 1,NUMPHN CALL FNDDIH(IS1,JS1,KS1,LS1,IIPT(K),JJPT(K),KKPT(K),LLPT(K), + MATCH) IF(MATCH.EQ.0) + CALL FNDDIH(IS1,JS1,KS1,LS1,LLPT(K),KKPT(K),JJPT(K),IIPT(K), + MATCH) C C ----- USE first MATCH FOR DIHEDRAL ----- C IF(MATCH.EQ.1) then MTEMP = K+NUMPHI go to 30 end if 8 CONTINUE 30 CONTINUE IF(MTEMP.NE.0) then ICP(I) = IPNTR(MTEMP) else WRITE(IOUT,95) IS1,JS1,KS1,LS1,IP1,JP1,KP1,LP1 IF(LN.LT.0) WRITE(IOUT,76) NOGO = NOGO+1 endif 1 CONTINUE RETURN c * 100 FORMAT(1H ,3X,'ANGLE',I5,2X,'WITH ATOMS',4I5,2X,3(A4,'-'), * + A4,2X,'IS SPECIFIC DIHEDRAL = ',I4) * 101 FORMAT(1H ,3X,'ANGLE',I5,2X,'WITH ATOMS',4I5,2X, * + 3(A4,'-'),A4,2X,'IS IMPROPER DIHEDRAL = ',I5) c 76 FORMAT(4x,'This is an improper torsion angle',/) 95 format(4x,'Missing dihedral parameter: ' + ,a2,'-',a2,'-',a2, '-',a2, + ' (atoms ',i5,'-',i5,'-',i5,'-',i5,')') END ----------------------------------- Temporary workarounds: Make sure all dihedrals have values in the force field file. --