



      SUBROUTINE COOBMP


















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'SYMINC.INC'
      INCLUDE       'CNTINC.INC'
      INCLUDE       'RESULT.INC'
      INCLUDE       'PDBINC.INC'
      INTEGER       IAA, JAA, IAT, JAT, ISYM, JSYM, ICONT, SYMNEG
      REAL          TMP(3), ERROR, NUCDST
      LOGICAL       ISBUMP, ISHBO, WIFIRW, IS13, IS14







      CALL COO100 ('COOBMP','Van der Waals overlaps','ATOM2','?M4659')



      CALL ENVTOT



      CALL PDBC04B



      CALL HBO010



      DO 100 IAA=1,NUMAAT





         CALL FCONAA (IAA,2.0,.TRUE.)



         DO 95 ICONT=1,NUMCONIAA
            JAA=CONIAA(ICONT)
            IF (JAA.GT.NUMAAT) GOTO 95
            JSYM=CONSYMAA(ICONT)
            ISYM=SYMNEG(JSYM)




            IF (.NOT.WIFIRW(IAA).AND.JSYM.EQ.1.AND.IAA.EQ.JAA) GOTO 95



            DO 90 IAT=PNTAAS(IAA),PNTAAE(IAA)
               IF (.NOT.ISATOK(IAT)) GOTO 90
               TMP(1)=XCOORD(IAT)
               TMP(2)=YCOORD(IAT)
               TMP(3)=ZCOORD(IAT)
               IF (ISYM.GT.1) THEN
                  CALL GVSMPV (TMP,SYMMAT(1,1,ISYM),SYMVEC(1,ISYM))
               END IF
               DO 85 JAT=PNTAAS(JAA),PNTAAE(JAA)
                  IF (.NOT.ISATOK(JAT)) GOTO 85
                  IF (JAT.LE.IAT) GOTO 85
                  IF (ISYM.EQ.1.AND.JAT.EQ.IAT) GOTO 85



                  CALL PDBC04A (IAT,JAT,TMP,ISYM,JSYM,ERROR,NUCDST,
     +             ISBUMP,ISHBO,IS13,IS14)



                  IF (ISBUMP) THEN
                     CALL COO102 (IAT,JAT,ERROR)
                  END IF
   85          CONTINUE
   90       CONTINUE
   95    CONTINUE
  100 CONTINUE





      RETURN
      END
      SUBROUTINE COOAXA



















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INCLUDE       'SYMINC.INC'
      REAL          TMP(3),TRF(3), VECDIF, D
      INTEGER       IAT, IAA, ISYM, IERR
      LOGICAL       WIFITW







      IF (NUMSYM.LT.2) GOTO 998



      IF (.NOT.SYMHAS) THEN
         CALL PDBMES ('AXAMIS')
         GOTO 998
      END IF
      CALL SYMINI
      CALL SYMSPG (IERR)
      IF (IERR.NE.0) THEN
         CALL PDBMES ('AXAIMP')
         GOTO 998
      END IF



      CALL COO100 ('COOAXA','Symmetry axis bumps','ATOM2','?M4660')



      DO 100 IAA=1,NUMAAT
         DO 90 IAT=PNTAAS(IAA),PNTAAE(IAA)
            IF (.NOT.ISATOK(IAT)) GOTO 90
            IF (WEIGHT(IAT).LE.0.5) GOTO 90
            TMP(1)=XCOORD(IAT)
            TMP(2)=YCOORD(IAT)
            TMP(3)=ZCOORD(IAT)
            DO 80 ISYM=2,NUMSYM
               CALL GVSCPR (TRF,TMP,3)
               CALL GVSMPV (TRF,SYMMAT(1,1,ISYM),SYMVEC(1,ISYM))
               D=VECDIF(TMP, TRF)
               IF (D.LT.1.54) THEN
                  IF (D.GT.0.005.OR..NOT.WIFITW(IAT))
     +             CALL PDBC92 (IAA,IAT)
		   GOTO 90
               END IF
 80         CONTINUE
 90      CONTINUE
 100  CONTINUE
      CALL CDB012



  998 CONTINUE


      RETURN
      END
      SUBROUTINE COO100 (INTEXT1,INTEXT2,INTEXT3,INTEXT4)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       L, GVFLEN
      LOGICAL       GVFFOP
      CHARACTER*10  LOC1, DATESTR
      CHARACTER*13  VERSION, GETVERSION
      CHARACTER*(*) INTEXT1, INTEXT2, INTEXT3, INTEXT4 







      IF (.NOT.GVFFOP(59)) CALL CDB001 ('OLD')



      IF (GVFFOP(59)) THEN
         CALL GVSTTU (59,'?M3300')
         L=GVFLEN(FILNMS(62))
         CALL GVSFMT ('?FMT367')
         WRITE (59,FMT,ERR=999) FILNMS(91)(1:MAX(1,L))
         CALL GVSFMT ('?FMT368')
         WRITE (59,FMT,ERR=999) INTEXT1
         CALL GVSFMT ('?FMT369')
         WRITE (59,FMT,ERR=999)

            VERSION=WCVERSION



         CALL GVSFMT ('?FMT370')
         WRITE (59,FMT,ERR=999) VERSION
         CALL GVSSTX (LINE,INTEXT2)
         CALL GVSFMT ('?FMT371')
         WRITE (59,FMT,ERR=999) LINE
         CALL GVSFMT ('?FMT372')
         WRITE (59,FMT,ERR=999)

            LOC1=DATESTR()
            CALL GVSFMT ('?FMT373')
            WRITE (59,FMT,ERR=999) LOC1

         CALL GVSFMT ('?FMT374')
         WRITE (59,FMT,ERR=999) INTEXT3
         CALL SHOWTEXTU (59,INTEXT4)
      END IF
      GOTO 998



  999 CONTINUE
      CALL GVSEIW ('COO100')



  998 CONTINUE


      RETURN
      END   
      SUBROUTINE COO101 (IAT,TVAL)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       IAA, IAT, LMODNMB
      LOGICAL       GVFFOP, WIFIRW, WIFIRN
      REAL          TVAL
      CHARACTER*1   LCHANAM, LALTATM, LINSRTC
      CHARACTER*4   CHAR4, LONESA3, T4, LNUMNAM







      IF (.NOT.GVFFOP(59)) GOTO 998



      IAA=ATIAA(IAT)



      CALL GVSSTX (LONESA3,ONESA3(IAA))
      CALL GVSSTX (LNUMNAM,NUMNAM(IAA))
      LCHANAM=CHANAM(IAA)
      CHAR4=T4(ONESAT(IAT))
      LMODNMB=MODNMB(IAA)
      LALTATM=ALTATM(IAT)
      LINSRTC=INSRTC(IAA)



      IF (WIFIRN(IAA)) THEN
         CALL COMNUC (LONESA3)
      ELSE IF (WIFIRW(IAA)) THEN
         CALL GVSSTX (LNUMNAM,ORGNAM(IAT))
      END IF
      IF (LCHANAM.EQ.' ') LCHANAM='_'
      IF (LALTATM.EQ.' ') LALTATM='_'
      IF (LINSRTC.EQ.' ') LINSRTC='_'



      CALL GVSFMT ('?FMT1366')
      WRITE (59,FMT,ERR=999) LMODNMB,LCHANAM,LNUMNAM,LONESA3, 
     + LINSRTC,CHAR4,LALTATM
      CALL GVSFMT ('?FMT289')
      WRITE (59,FMT,ERR=999) TVAL



      GOTO 998



  999 CONTINUE
      CALL GVSTTB ('?M0197')



  998 CONTINUE


      RETURN
      END
      SUBROUTINE COO102 (IAT,JAT,TVAL)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       IAA, IAT, JAA, JAT, LMODNMB, MMODNMB
      LOGICAL       GVFFOP, WIFIRW, WIFIRN
      REAL          TVAL
      CHARACTER*1   LCHANAM, LALTATM, LINSRTC, MCHANAM, MALTATM, MINSRTC
      CHARACTER*4   CHAR4, CHAR5, LONESA3, T4, LNUMNAM, MONESA3, MNUMNAM







      IF (.NOT.GVFFOP(59)) GOTO 998



      IAA=ATIAA(IAT)
      JAA=ATIAA(JAT)



      CALL GVSSTX (LONESA3,ONESA3(IAA))
      CALL GVSSTX (MONESA3,ONESA3(JAA))
      CALL GVSSTX (LNUMNAM,NUMNAM(IAA))
      CALL GVSSTX (MNUMNAM,NUMNAM(JAA))
      LCHANAM=CHANAM(IAA)
      MCHANAM=CHANAM(JAA)
      CHAR4=T4(ONESAT(IAT))
      CHAR5=T4(ONESAT(JAT))
      LMODNMB=MODNMB(IAA)
      MMODNMB=MODNMB(JAA)
      LALTATM=ALTATM(IAT)
      MALTATM=ALTATM(JAT)
      LINSRTC=INSRTC(IAA)
      MINSRTC=INSRTC(JAA)



      IF (WIFIRN(IAA)) THEN
         CALL COMNUC (LONESA3)
      ELSE IF (WIFIRW(IAA)) THEN
         CALL GVSSTX (LNUMNAM,ORGNAM(IAT))
      END IF
      IF (WIFIRN(JAA)) THEN
         CALL COMNUC (MONESA3)
      ELSE IF (WIFIRW(JAA)) THEN
         CALL GVSSTX (MNUMNAM,ORGNAM(JAT))
      END IF
      IF (LCHANAM.EQ.' ') LCHANAM='_'
      IF (LALTATM.EQ.' ') LALTATM='_'
      IF (LINSRTC.EQ.' ') LINSRTC='_'
      IF (MCHANAM.EQ.' ') MCHANAM='_'
      IF (MALTATM.EQ.' ') MALTATM='_'
      IF (MINSRTC.EQ.' ') MINSRTC='_'



      WRITE (59,1000,ERR=999) LMODNMB,LCHANAM,LNUMNAM,LONESA3, 
     + LINSRTC,CHAR4,LALTATM,MMODNMB,MCHANAM,MNUMNAM,MONESA3, 
     + MINSRTC,CHAR5,MALTATM
      CALL GVSFMT ('?FMT289')
      WRITE (59,FMT,ERR=999) TVAL



      GOTO 998



  999 CONTINUE
      CALL GVSTTB ('?M0197')



  998 CONTINUE

      
 1000 FORMAT ('   Name   : ',I4,' ; ',A1,'    ; ',2(A4,' ; '),A1,
     + '    ; ',A4,' ; ',A1,'   <-> ',I4,' ; ',A1,'    ; ',2(A4,' ; '),
     + A1,'    ; ',A4,' ; ',A1)

      RETURN
      END
