Changeset bd2278d for enylun.f


Ignore:
Timestamp:
09/05/08 11:49:42 (16 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
fafe4d6
Parents:
2ebb8b6
Message:

Reformatting comments and continuation marks.

Fortran 90 and higher use ! to mark comments no matter where they are in the
code. The only valid continuation marker is &.
I also added the SMMP.kdevelop.filelist to the repository to make it easier
to use kdevelop.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@12 26dc1dd8-5c4e-0410-9ffe-d298b4865968

File:
1 edited

Legend:

Unmodified
Added
Removed
  • enylun.f

    r2ebb8b6 rbd2278d  
    1 c *******************************************************************
    2 c SMMP version of Anders Irback's force field, to be called the Lund
    3 c force field. This file contains the function enylun, which in turn
    4 c calls all the terms in the energy function. The terms Bias (ebias),
    5 c Hydrogen bonds (ehbmm and ehbms), Hydrophobicity (ehp) and the
    6 c Excluded volume (eexvol and eloexv) are also implemented in this
    7 c file.
    8 c
    9 c Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
    10 c                      Jan H. Meinke, Sandipan Mohanty
    11 c
     1! *******************************************************************
     2! SMMP version of Anders Irback's force field, to be called the Lund
     3! force field. This file contains the function enylun, which in turn
     4! calls all the terms in the energy function. The terms Bias (ebias),
     5! Hydrogen bonds (ehbmm and ehbms), Hydrophobicity (ehp) and the
     6! Excluded volume (eexvol and eloexv) are also implemented in this
     7! file.
     8!
     9! Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
     10!                      Jan H. Meinke, Sandipan Mohanty
     11!
    1212      subroutine init_lundff
    1313      include 'INCL.H'
     
    1717
    1818      print *,'initializing Lund forcefield'
    19 c     Some parameters in the Lund force field.
    20 c     The correspondence between internal energy scale and kcal/mol
     19!     Some parameters in the Lund force field.
     20!     The correspondence between internal energy scale and kcal/mol
    2121      eunit=1.3315
    22 c     Bias
     22!     Bias
    2323      kbias=100.0*eunit
    24 c      print *,'Bias'
    25 c     Hydrogen bonds
     24!      print *,'Bias'
     25!     Hydrogen bonds
    2626      epshb1=3.1*eunit
    2727      epshb2=2.0*eunit
     
    3737      cacc=(1.0/1.23)**powb
    3838      csacc=(1.0/1.25)**powb
    39 c      print *,'Hydrogen bonds'
    40 c     Hydrophobicity
    41 c      print *,'Hydrophobicity with nhptyp = ',nhptyp
     39!      print *,'Hydrogen bonds'
     40!     Hydrophobicity
     41!      print *,'Hydrophobicity with nhptyp = ',nhptyp
    4242
    4343      hpstrg(1)=0.0*eunit
     
    6161         call tolost(mynm)
    6262         if ((mynm.eq.'pro').or.(mynm.eq.'cpro')
    63      #           .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
    64      #           .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
     63     &           .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
     64     &           .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
    6565            prlvr=.true.        ! residue i is a proline variant
    6666         else
     
    125125         endif
    126126      enddo
    127 c      print *,'Hydrophobicity'
    128 
    129 c     Excluded volume and local pair excluded volume terms
     127!      print *,'Hydrophobicity'
     128
     129!     Excluded volume and local pair excluded volume terms
    130130      exvk=0.1*eunit
    131131      exvcut=4.3
     
    158158         enddo
    159159      enddo
    160 c      print *,'Local pair excluded volume constants'
     160!      print *,'Local pair excluded volume constants'
    161161
    162162      exvlam=0.75
     
    171171         enddo
    172172      enddo
    173 c      print *,'General excluded volume constants'
    174 
    175 c     Initialization of the connections matrix matcon(i,j). The index
    176 c     i runs from -mxconr to +mxconr, and j from 1 to mxat.
    177 c     matcon(i2-i1,i1) = 0, if the distance between atoms i1 and i2 is fixed
    178 c                      = 2, if atoms i1 and i2 are separated by 3 covalent
    179 c                           bonds and their distance can change
    180 c                      = 1, for all other pairs
    181 c     if abs(i2-i1) > mxconr, the atoms are assumed to be separated by
    182 c     many bonds, and with no restriction on their distances. On a protein
    183 c     molecule made of natural amino acids, atoms with indices separated
    184 c     by more than 35 can not be connected by three covalent bonds.
     173!      print *,'General excluded volume constants'
     174
     175!     Initialization of the connections matrix matcon(i,j). The index
     176!     i runs from -mxconr to +mxconr, and j from 1 to mxat.
     177!     matcon(i2-i1,i1) = 0, if the distance between atoms i1 and i2 is fixed
     178!                      = 2, if atoms i1 and i2 are separated by 3 covalent
     179!                           bonds and their distance can change
     180!                      = 1, for all other pairs
     181!     if abs(i2-i1) > mxconr, the atoms are assumed to be separated by
     182!     many bonds, and with no restriction on their distances. On a protein
     183!     molecule made of natural amino acids, atoms with indices separated
     184!     by more than 35 can not be connected by three covalent bonds.
    185185
    186186      do i=1,mxat
     
    190190         matcon(0,i)=0
    191191      enddo
    192 c     continued...
     192!     continued...
    193193      do iml=1,ntlml
    194194         do iat1=iatrs1(irsml1(iml)),iatrs2(irsml2(iml))
     
    224224         enddo
    225225
    226 c         print *,'going to initialize connections for first residue'
    227 c         print *,'iN,iCa,iC =',iN(irsml1(iml)),
    228 c     #        iCa(irsml1(iml)),iC(irsml1(iml))
     226!         print *,'going to initialize connections for first residue'
     227!         print *,'iN,iCa,iC =',iN(irsml1(iml)),
     228!     #        iCa(irsml1(iml)),iC(irsml1(iml))
    229229         do iat1=iN(irsml1(iml))+1,iCa(irsml1(iml))-1
    230 c            print *,'connections for iat1 = ',iat1
     230!            print *,'connections for iat1 = ',iat1
    231231            matcon(iat1-iN(irsml1(iml)),iN(irsml1(iml)))=0
    232232            matcon(iN(irsml1(iml))-iat1,iat1)=0
     
    242242         enddo
    243243
    244 c     Below: for certain residues, some atoms separated by 3 or more bonds
    245 c     do not change distance. So, the connection matrix term for such pairs
    246 c     should be zero.
     244!     Below: for certain residues, some atoms separated by 3 or more bonds
     245!     do not change distance. So, the connection matrix term for such pairs
     246!     should be zero.
    247247
    248248         do irs=irsml1(iml),irsml2(iml)
     
    260260            call tolost(mynm)
    261261            if ((mynm.eq.'pro').or.(mynm.eq.'cpro')
    262      #              .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
    263      #              .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
     262     &              .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
     263     &              .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
    264264               prlvr=.true.     ! residue i is a proline variant
    265265            else
     
    275275               enddo
    276276            else if ((mynm.eq.'his').or.(mynm.eq.'hise')
    277      #              .or.(mynm.eq.'hisd').or.(mynm.eq.'his+')) then
     277     &              .or.(mynm.eq.'hisd').or.(mynm.eq.'his+')) then
    278278               do iat1=iatoff+iatrs1(irs)+7,iatrs2(irs)-2-iatmrg
    279279                  do iat2=iat1+1,iatrs2(irs)-2-iatmrg
     
    306306               enddo
    307307            else if (prlvr) then
    308 c           Proline. Many more distances are fixed because of the fixed
    309 c           phi angle
     308!           Proline. Many more distances are fixed because of the fixed
     309!           phi angle
    310310               do iat1=iatoff+iatrs1(irs),iatrs2(irs)-2-iatmrg
    311311                  do iat2=iat1+1,iatrs2(irs)-2-iatmrg
     
    314314                  enddo
    315315               enddo
    316 c           distances to the C' atom of the previous residue are also fixed
     316!           distances to the C' atom of the previous residue are also fixed
    317317               if (irs.ne.irsml1(iml)) then
    318318                  iat1=iowat(iatrs1(irs))
     
    325325         enddo
    326326      enddo
    327 c     finished initializing matrix conmat
    328 c      print *,'Connections matrix'
    329 
    330 c     Local pair excluded volume
     327!     finished initializing matrix conmat
     328!      print *,'Connections matrix'
     329
     330!     Local pair excluded volume
    331331      do i=1,mxml
    332332         ilpst(i)=1
     
    342342            do iat2=iat1+1,iatrs2(irsml2(iml))
    343343               if ((iat2-iat1.le.mxconr).and.
    344      #                 matcon(iat2-iat1,iat1).eq.2) then
     344     &                 matcon(iat2-iat1,iat1).eq.2) then
    345345                  ilp=ilp+1
    346346                  lcp1(ilp)=iat1
     
    354354            ilpst(iml+1)=ilp+1
    355355         endif
    356 c         print *,'molecule ',iml,' lc pair range ',ilpst(iml),ilpnd(iml)
    357 c         print *,'local pair list'
     356!         print *,'molecule ',iml,' lc pair range ',ilpst(iml),ilpnd(iml)
     357!         print *,'local pair list'
    358358         do lci=ilpst(iml),ilpnd(iml)
    359359            iat1=lcp1(lci)
    360360            iat2=lcp2(lci)
    361 c            print *,lci,iat1,iat2,matcon(iat2-iat1,iat1)
     361!            print *,lci,iat1,iat2,matcon(iat2-iat1,iat1)
    362362         enddo
    363363      enddo
     
    375375         ityp=1
    376376      else if ((mynm.eq.'val').or.(mynm.eq.'leu').or.(mynm.eq.'ile')
    377      #        .or.(mynm.eq.'met').or.(mynm.eq.'pro').or.(mynm.eq.'cpro')
    378      #        .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
    379      #        .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
     377     &        .or.(mynm.eq.'met').or.(mynm.eq.'pro').or.(mynm.eq.'cpro')
     378     &        .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
     379     &        .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
    380380         ityp=2
    381381      else if ((mynm.eq.'phe').or.(mynm.eq.'tyr').or.(mynm.eq.'trp'))
    382      #        then
     382     &        then
    383383         ityp=3
    384384      endif
     
    408408      return
    409409      end
    410 c     Evaluates backbone backbone hydrogen bond strength for residues
    411 c     i and j, taking the donor from residue i and acceptor from residue j
     410!     Evaluates backbone backbone hydrogen bond strength for residues
     411!     i and j, taking the donor from residue i and acceptor from residue j
    412412      real*8 function ehbmmrs(i,j)
    413413      include 'INCL.H'
     
    424424      r2=dx*dx+dy*dy+dz*dz
    425425      if (r2.gt.cthb2) then
    426 c         print *,'hbmm = 0 ',cthb2,r2,a1,a2,d1,d2
    427 c         print *,'a1,a2,d1,d2,r2 = ',a1,a2,d1,d2,r2,sighb2,cthb
     426!         print *,'hbmm = 0 ',cthb2,r2,a1,a2,d1,d2
     427!         print *,'a1,a2,d1,d2,r2 = ',a1,a2,d1,d2,r2,sighb2,cthb
    428428         ehbmmrs=0
    429429         return
     
    432432      cb=(xat(a2)-xat(a1))*dx+(yat(a2)-yat(a1))*dy+(zat(a2)-zat(a1))*dz
    433433      if (powa.gt.0.and.ca.le.0) then
    434 c         print *,'hbmm, returning 0 because of angle a'
     434!         print *,'hbmm, returning 0 because of angle a'
    435435         ehbmmrs=0
    436436         return
    437437      endif
    438438      if (powb.gt.0.and.cb.le.0) then
    439 c         print *,'hbmm, returning 0 because of angle b'
     439!         print *,'hbmm, returning 0 because of angle b'
    440440         ehbmmrs=0
    441441         return
     
    446446      evlu=((ca*ca/r2)**(0.5*powa))*((cb*cb/r2)**(0.5*powb))
    447447      evlu=evlu*(r6*(5*r6-6*r4)+alhb+blhb*r2)
    448 c      print *,'found hbmm contribution ',evlu
     448!      print *,'found hbmm contribution ',evlu
    449449      ehbmmrs=epshb1*evlu
    450450      return
    451451      end
    452452      real*8 function enylun(nml)
    453 c     nml = 1 .. ntlml. No provision exists to handle out of range values
    454 c     for nml inside this function.
     453!     nml = 1 .. ntlml. No provision exists to handle out of range values
     454!     for nml inside this function.
    455455      include 'INCL.H'
    456456      include 'incl_lund.h'
     
    462462      eyvr=0.0   ! Local pair excluded volume, in a sense a variable potential
    463463      eyvw=0.0   ! atom-atom repulsion, excluded volume
    464 c     atom-atom repulsion is calculated on a system wide basis, instead of
    465 c     molecule by molecule for efficiency. Look into function exvlun.
     464!     atom-atom repulsion is calculated on a system wide basis, instead of
     465!     molecule by molecule for efficiency. Look into function exvlun.
    466466
    467467      istres=irsml1(nml)
    468468      indres=irsml2(nml)
    469469
    470 c     First, all terms that can be calculated on a residue by residue basis
     470!     First, all terms that can be calculated on a residue by residue basis
    471471      do i=istres,indres
    472472         mynm=seq(i)
    473473         call tolost(mynm)
    474474         if ((mynm.eq.'pro').or.(mynm.eq.'cpro')
    475      #           .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
    476      #           .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
     475     &           .or.(mynm.eq.'cpru').or.(mynm.eq.'prou')
     476     &           .or.(mynm.eq.'pron').or.(mynm.eq.'pro+')) then
    477477            prlvr=.true.        ! residue i is a proline variant
    478478         else
     
    480480         endif
    481481
    482 c     Bias, or local electrostatic term. Excluded from the list are
    483 c     residues at the ends of the chain, glycine and all proline variants
     482!     Bias, or local electrostatic term. Excluded from the list are
     483!     residues at the ends of the chain, glycine and all proline variants
    484484         if ((i.ne.istres).and.(i.ne.indres).and.
    485      #           .not.prlvr.and.mynm.ne.'gly') then
     485     &           .not.prlvr.and.mynm.ne.'gly') then
    486486            eyel=eyel+ebiasrs(i)
    487487         endif
    488 c     Backbone--backbone hydrogen bonds
     488!     Backbone--backbone hydrogen bonds
    489489         shbm1=1.0
    490490         shbm2=1.0
    491491         if ((i.eq.istres).or.(i.eq.indres)) shbm1=0.5
    492 c     Residue i contributes the donor, and j, the acceptor, so both i and
    493 c     j run over the whole set of amino acids.
    494 c     No terms for residue i, if it is a proline variant.
     492!     Residue i contributes the donor, and j, the acceptor, so both i and
     493!     j run over the whole set of amino acids.
     494!     No terms for residue i, if it is a proline variant.
    495495         if (.not.prlvr) then 
    496496            do j=istres,indres
     
    500500            enddo
    501501         endif
    502 c     Hydrophobicity, only if residue i is hydrophobic to start with
     502!     Hydrophobicity, only if residue i is hydrophobic to start with
    503503         ihpi=ihptype(i)
    504504         if (ihpi.ge.0) then
    505 c        Unlike hydrogen bonds, the hydrophobicity potential is symmetric
    506 c        in i and j. So, the loop for j runs from i+1 to the end.
     505!        Unlike hydrogen bonds, the hydrophobicity potential is symmetric
     506!        in i and j. So, the loop for j runs from i+1 to the end.
    507507
    508508            do j=i+1,indres
     
    518518      enddo
    519519
    520 c     Terms that are not calculated residue by residue ...
    521 
    522 c     Local pair or third-neighbour excluded volume
    523 c     Numerically this is normally the term with largest positive
    524 c     contribution to the energy in an equilibrated stystem.
     520!     Terms that are not calculated residue by residue ...
     521
     522!     Local pair or third-neighbour excluded volume
     523!     Numerically this is normally the term with largest positive
     524!     contribution to the energy in an equilibrated stystem.
    525525
    526526      i1=ilpst(nml)
     
    546546            etmp=etmp+etmp1
    547547         endif
    548 c         print *,'pair : ',iat1,iat2,' contribution ',etmp1
    549 c         print *,exvcut2,r2
     548!         print *,'pair : ',iat1,iat2,' contribution ',etmp1
     549!         print *,exvcut2,r2
    550550      enddo
    551551      eyvr=exvk*etmp
     
    569569      b2=20.25
    570570      a2=12.25
    571 c      ihp1=ihptype(i1)
    572 c      ihp2=ihptype(i2)
     571!      ihp1=ihptype(i1)
     572!      ihp2=ihptype(i2)
    573573      if ((ihp1.le.0).or.(ihp2.le.0)) then
    574574         ehp=0.0
     
    609609      include 'INCL.H'
    610610      include 'incl_lund.h'
    611 c     For multi-chain systems it makes little sense to split the calculation
    612 c     of this term into an 'interaction part' and a contribution from
    613 c     individual molecules. So, normally this should always be called with
    614 c     argument nml=0. Only for diagnostic reasons, you might want to find
    615 c     the contribution from one molecule in a multi-chain system assuming
    616 c     there was no other molecule.
     611!     For multi-chain systems it makes little sense to split the calculation
     612!     of this term into an 'interaction part' and a contribution from
     613!     individual molecules. So, normally this should always be called with
     614!     argument nml=0. Only for diagnostic reasons, you might want to find
     615!     the contribution from one molecule in a multi-chain system assuming
     616!     there was no other molecule.
    617617      dimension isort(mxat),ngbr(mxat),locccl(mxat),incell(mxcell)
    618618      dimension icell(mxat)
     
    626626
    627627      eyvw=0.0
    628 c     The beginning part of this implementation is very similar to the
    629 c     assignment of cells to the atoms during calculation of solvent
    630 c     accessible surface area. So, much of that part is similar. But
    631 c     unlike the accessible surface calculations, this term is symmetric
    632 c     in any two participating atoms. So, the part after the assignment
    633 c     of cells differs even in the structure of the code.
     628!     The beginning part of this implementation is very similar to the
     629!     assignment of cells to the atoms during calculation of solvent
     630!     accessible surface area. So, much of that part is similar. But
     631!     unlike the accessible surface calculations, this term is symmetric
     632!     in any two participating atoms. So, the part after the assignment
     633!     of cells differs even in the structure of the code.
    634634
    635635      do i=1,mxcell
    636636         incell(i)=0
    637637      enddo
    638 c      print *,'evaluating general excluded volume :',istat,',',indat
    639 c     Find minimal containing box
     638!      print *,'evaluating general excluded volume :',istat,',',indat
     639!     Find minimal containing box
    640640      xmin=xat(istat)
    641641      ymin=yat(istat)
     
    666666      sizey=ymax-ymin
    667667      sizez=zmax-zmin
    668 c     Number of cells along each directions that fit into the box.
     668!     Number of cells along each directions that fit into the box.
    669669      ndx=int(sizex/exvcutg)+1
    670670      ndy=int(sizey/exvcutg)+1
     
    673673      nxy=ndx*ndy
    674674      ncell=nxy*ndz
    675 c      print *,'Number of cells along x,y,z = ',ndx,',',ndy,',',ndz
     675!      print *,'Number of cells along x,y,z = ',ndx,',',ndy,',',ndz
    676676      if (ncell.ge.mxcell) then
    677677         print *,'exvlun> required number of cells',ncell,
    678      #        ' exceeded the limit ',mxcell
     678     &        ' exceeded the limit ',mxcell
    679679         print *,'recompile with a higher mxcell.'
    680680         stop
    681681      endif
    682 c     Expand box to contain an integral number of cells along each direction
     682!     Expand box to contain an integral number of cells along each direction
    683683      shiftx=(dble(ndx)*exvcutg-sizex)/2.0
    684684      shifty=(dble(ndy)*exvcutg-sizey)/2.0
     
    691691      zmax=zmax+shiftz
    692692
    693 c     Set occupied cells to zero. Note that the maximum number of occupied
    694 c     cells is the number of atoms in the system.
     693!     Set occupied cells to zero. Note that the maximum number of occupied
     694!     cells is the number of atoms in the system.
    695695      nocccl=0
    696696      do i=1,mxat
     
    698698      enddo
    699699
    700 c     Put atoms in cells
     700!     Put atoms in cells
    701701      do j=istat,indat
    702702         mx=min(int(max((xat(j)-xmin)/exvcutg,0.0d0)),ndx-1)
     
    710710         else
    711711            if (incell(icellj).eq.0) then
    712 c           previously unoccupied cell
     712!           previously unoccupied cell
    713713               nocccl=nocccl+1
    714714               locccl(nocccl)=icellj
     
    717717         endif
    718718      enddo
    719 c      print *,'finished assigning cells. nocccl = ',nocccl
    720 c     Cummulative occupancy of i'th cell
     719!      print *,'finished assigning cells. nocccl = ',nocccl
     720!     Cummulative occupancy of i'th cell
    721721      do i=1,ncell
    722722         incell(i+1)=incell(i+1)+incell(i)
    723723      enddo
    724 c      print *,'finished making cumulative cell sums'
    725 c     Sorting atoms by their cell index
     724!      print *,'finished making cumulative cell sums'
     725!     Sorting atoms by their cell index
    726726      do i=istat,indat
    727727         j=icell(i)
     
    730730         incell(j)=jj-1
    731731      enddo
    732 c      print *,'sorted atoms by cell index'
     732!      print *,'sorted atoms by cell index'
    733733      etmp=0.0
    734734      do icl=1,nocccl
    735 c     loop through occupied cells
     735!     loop through occupied cells
    736736         lcell=locccl(icl)
    737737         ix=mod(lcell-1,ndx)
    738738         iy=(mod(lcell-1,nxy)-ix)/ndx
    739739         iz=(lcell-1-ix-ndx*iy)/nxy
    740 c         print *,'icl=',icl,'absolute index of cell = ',lcell
    741 c         print *,'iz,iy,ix = ',iz,iy,ix
    742 c     find all atoms in current cell and all its forward-going neighbours
     740!         print *,'icl=',icl,'absolute index of cell = ',lcell
     741!         print *,'iz,iy,ix = ',iz,iy,ix
     742!     find all atoms in current cell and all its forward-going neighbours
    743743         nex=min(ix+1,ndx-1)
    744744         ney=min(iy+1,ndy-1)
     
    751751                  jcl=jx+ndx*jy+nxy*jz+1
    752752                  do ii=incell(jcl)+1,incell(jcl+1)
    753 c                    count the total number of neighbours
     753!                    count the total number of neighbours
    754754                     nngbr=nngbr+1
    755755                     if (jx.eq.ix.and.jy.eq.iy.and.jz.eq.iz) then
    756 c                    count how many neighbours are from the same cell
     756!                    count how many neighbours are from the same cell
    757757                        nsame=nsame+1
    758758                     endif
     
    762762            enddo
    763763         enddo
    764 c     A few more cells need to be searched, so that we cover 13 of the 26
    765 c     neighbouring cells.
    766 c        1
     764!     A few more cells need to be searched, so that we cover 13 of the 26
     765!     neighbouring cells.
     766!        1
    767767         jx=ix+1
    768768         jy=iy
     
    773773            ngbr(nngbr)=isort(ii)
    774774         enddo
    775 c        2
     775!        2
    776776         jx=ix
    777777         jy=iy-1
     
    782782            ngbr(nngbr)=isort(ii)
    783783         enddo
    784 c        3
     784!        3
    785785         jx=ix-1
    786786         jy=iy+1
     
    791791            ngbr(nngbr)=isort(ii)
    792792         enddo
    793 c        4
     793!        4
    794794         jx=ix+1
    795795         jy=iy+1
     
    800800            ngbr(nngbr)=isort(ii)
    801801         enddo
    802 c        5
     802!        5
    803803         jx=ix+1
    804804         jy=iy-1
     
    809809            ngbr(nngbr)=isort(ii)
    810810         enddo
    811 c        6
     811!        6
    812812         jx=ix+1
    813813         jy=iy-1
     
    819819         enddo
    820820
    821 c         print *,'atoms in same cell ',nsame
    822 c         print *,'atoms in neighbouring cells ',nngbr
     821!         print *,'atoms in same cell ',nsame
     822!         print *,'atoms in neighbouring cells ',nngbr
    823823         do i1=1,nsame
    824 c        Over all atoms from the original cell
     824!        Over all atoms from the original cell
    825825            iat1=ngbr(i1)
    826826            do i2=i1,nngbr
    827 c           Over all atoms in the original+neighbouring cells
     827!           Over all atoms in the original+neighbouring cells
    828828               iat2=ngbr(i2)
    829829               xij=xat(iat1)-xat(iat2)
     
    834834               if (r2.le.exvcutg2) then
    835835                  if (abs(iat2-iat1).gt.mxconr.or.
    836      #                 matcon(iat2-iat1,iat1).eq.1) then
     836     &                 matcon(iat2-iat1,iat1).eq.1) then
    837837                     iatt1=ityat(iat1)
    838838                     iatt2=ityat(iat2)
     
    840840                     r6=r6*r6*r6
    841841                     etmp1=r6*r6+asaexv(iatt1,iatt2)
    842      #                    +bsaexv(iatt1,iatt2)*r2
     842     &                    +bsaexv(iatt1,iatt2)*r2
    843843                     etmp=etmp+etmp1
    844 c                     if (etmp1.ge.2000) then
    845 c                        print *,'contribution ',iat1,iat2,etmp1
    846 c                        call outpdb(1,'EXAMPLES/clash.pdb')
    847 c                        stop
    848 c                     endif
     844!                     if (etmp1.ge.2000) then
     845!                        print *,'contribution ',iat1,iat2,etmp1
     846!                        call outpdb(1,'EXAMPLES/clash.pdb')
     847!                        stop
     848!                     endif
    849849                  endif
    850850               endif
     
    852852         enddo
    853853      enddo
    854 c      irs=1
    855 c      do iat=iatrs1(irs),iatrs2(irs)
    856 c         do j=-mxconr,mxconr
    857 c            print *,iat,j,':',matcon(j,iat)
    858 c         enddo
    859 c      enddo
    860 c      irs=irsml2(1)
    861 c      do iat=iatrs1(irs),iatrs2(irs)
    862 c         do j=-mxconr,mxconr
    863 c            print *,iat,j,':',matcon(j,iat)
    864 c         enddo
    865 c      enddo
     854!      irs=1
     855!      do iat=iatrs1(irs),iatrs2(irs)
     856!         do j=-mxconr,mxconr
     857!            print *,iat,j,':',matcon(j,iat)
     858!         enddo
     859!      enddo
     860!      irs=irsml2(1)
     861!      do iat=iatrs1(irs),iatrs2(irs)
     862!         do j=-mxconr,mxconr
     863!            print *,iat,j,':',matcon(j,iat)
     864!         enddo
     865!      enddo
    866866
    867867      eyvw=exvk*etmp
     
    871871
    872872      real*8 function exvbrfc()
    873 c     Brute force excluded volume evaluation
     873!     Brute force excluded volume evaluation
    874874      include 'INCL.H'
    875875      include 'incl_lund.h'
     
    887887            if (r2.le.exvcutg2) then
    888888               if (abs(iat2-iat1).gt.mxconr.or.
    889      #                 matcon(iat2-iat1,iat1).eq.1) then
     889     &                 matcon(iat2-iat1,iat1).eq.1) then
    890890                  iatt1=ityat(iat1)
    891891                  iatt2=ityat(iat2)
     
    893893                  r6=r6*r6*r6
    894894                  etmp1=r6*r6+asaexv(iatt1,iatt2)
    895      #                 +bsaexv(iatt1,iatt2)*r2
     895     &                 +bsaexv(iatt1,iatt2)*r2
    896896                  etmp=etmp+etmp1
    897897                  if (iat1.eq.43.and.iat2.eq.785) then
     
    903903                     print *,'bsa = ',bsaexv(iatt1,iatt2)
    904904
    905 c     call outpdb(1,'EXAMPLES/clash.pdb')
    906 c     stop
     905!     call outpdb(1,'EXAMPLES/clash.pdb')
     906!     stop
    907907                  endif
    908908               else
    909 c                  print *,'atoms ', iat1,' and ',iat2,' were close',
    910 c     #                 'but matcon is ',matcon(iat2-iat1,iat1)
     909!                  print *,'atoms ', iat1,' and ',iat2,' were close',
     910!     #                 'but matcon is ',matcon(iat2-iat1,iat1)
    911911               endif
    912912            endif
Note: See TracChangeset for help on using the changeset viewer.