Changeset bd2278d for enyshe.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
  • enyshe.f

    r2ebb8b6 rbd2278d  
    1 c **************************************************************
    2 c
    3 c This file contains the subroutines: enyshe
    4 c
    5 c Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
    6 c                      Shura Hayryan, Chin-Ku
    7 c Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
    8 c                      Jan H. Meinke, Sandipan Mohanty
    9 c
    10 c **************************************************************
     1! **************************************************************
     2!
     3! This file contains the subroutines: enyshe
     4!
     5! Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
     6!                      Shura Hayryan, Chin-Ku
     7! Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
     8!                      Jan H. Meinke, Sandipan Mohanty
     9!
     10! **************************************************************
    1111
    1212
    1313      real*8 function enyshe(nml)
    1414
    15 c ............................................................................
    16 c
    17 c PURPOSE: Calculate internal energy of molecule 'nml' with ECEPP parameters
    18 c
    19 c CALLS: none
    20 c
    21 c The function loops over all moving sets within the molecule. Within
    22 c this loop it loops over the van-der-Waals domains of each atom in the
    23 c moving set and finally over the atoms that belong to the 1-4 interaction
    24 c set.
    25 c ............................................................................
     15! ............................................................................
     16!
     17! PURPOSE: Calculate internal energy of molecule 'nml' with ECEPP parameters
     18!
     19! CALLS: none
     20!
     21! The function loops over all moving sets within the molecule. Within
     22! this loop it loops over the van-der-Waals domains of each atom in the
     23! moving set and finally over the atoms that belong to the 1-4 interaction
     24! set.
     25! ............................................................................
    2626
    2727      include 'INCL.H'
    2828
    29 c If nml == 0 calculate the interaction between all pairs.
     29! If nml == 0 calculate the interaction between all pairs.
    3030      if (nml.eq.0) then
    3131          ntlvr = nvr
     
    3636      if (ntlvr.eq.0) then
    3737        write (*,'(a,i4)')
    38      #           ' enyshe> No variables defined in molecule #',nml
     38     &           ' enyshe> No variables defined in molecule #',nml
    3939        return
    4040      endif
     
    4949        i1s = imsml1(ntlml) + nmsml(ntlml)
    5050      else
    51 c Index of first variable in molecule.
     51! Index of first variable in molecule.
    5252        ifivr=ivrml1(nml)
    53 c Index of last moving set in molecule
     53! Index of last moving set in molecule
    5454        i1s=imsml1(nml)+nmsml(nml)
    5555      endif
    56 c Loop over moving sets/variables in reverse order     
     56! Loop over moving sets/variables in reverse order     
    5757      do io=ifivr+ntlvr-1,ifivr,-1 
    58 c The array iorvr contains the variables in an "apropriate" order.
     58! The array iorvr contains the variables in an "apropriate" order.
    5959        iv=iorvr(io)       
    60 c Index of the primary moving atom for the variable with index iv
     60! Index of the primary moving atom for the variable with index iv
    6161        ia=iatvr(iv)       
    62 c Get the type of variable iv (valence length, valence angle, dihedral angle)
     62! Get the type of variable iv (valence length, valence angle, dihedral angle)
    6363        it=ityvr(iv)       
    64 c Class of variable iv's potential  (Q: What are they)
     64! Class of variable iv's potential  (Q: What are they)
    6565        ic=iclvr(iv)       
    66 c If iv is a dihedral angle ...
     66! If iv is a dihedral angle ...
    6767        if (it.eq.3) then     
    68 c Barrier height * 1/2 of the potential of iv.
     68! Barrier height * 1/2 of the potential of iv.
    6969          e0=e0to(ic)
    70 c Calculate the periodic potential term. sgto is the sign of the barrier, rnto is
    71 c the periodicity and toat is torsion angle(?) associate with atom ia.
     70! Calculate the periodic potential term. sgto is the sign of the barrier, rnto is
     71! the periodicity and toat is torsion angle(?) associate with atom ia.
    7272          if (e0.ne.0.)
    73      #         eyvr=eyvr+e0*(1.0+sgto(ic)*cos(toat(ia)*rnto(ic)))
    74 c else if iv is a valence angle ...
     73     &         eyvr=eyvr+e0*(1.0+sgto(ic)*cos(toat(ia)*rnto(ic)))
     74! else if iv is a valence angle ...
    7575        elseif (it.eq.2) then 
    76 c vr is the valence angle of ia
     76! vr is the valence angle of ia
    7777          vr=baat(ia)
    78 c else if iv is a valence length...
     78! else if iv is a valence length...
    7979        elseif (it.eq.1) then 
    80 c vr is the length of the valence bond
     80! vr is the length of the valence bond
    8181          vr=blat(ia)
    8282        endif
    8383
    84 c ============================================ Energies & Atomic forces
    85 c index of next to last moving set
     84! ============================================ Energies & Atomic forces
     85! index of next to last moving set
    8686        i2s=i1s-1
    87 c index of first moving set associated with iv
     87! index of first moving set associated with iv
    8888        i1s=imsvr1(iv)
    89 c Loop over all moving sets starting from the one associated with vr to the end.
     89! Loop over all moving sets starting from the one associated with vr to the end.
    9090        do ims=i1s,i2s 
    91 c First atom of the current moving set
     91! First atom of the current moving set
    9292          i1=latms1(ims)
    93 c Last atom of the current moving set
     93! Last atom of the current moving set
    9494          i2=latms2(ims)
    95 c Loop over all atoms of the current moving set.
     95! Loop over all atoms of the current moving set.
    9696          do i=i1,i2 
    97 c Atom class of current atom
     97! Atom class of current atom
    9898            ity=ityat(i)
    99 c Point charge at current atom
     99! Point charge at current atom
    100100            cqi=conv*cgat(i)
    101 c Cartesian coordinates of current atom
     101! Cartesian coordinates of current atom
    102102            xi=xat(i)
    103103            yi=yat(i)
    104104            zi=zat(i)
    105 c Loop over the atoms of the van der Waals domain belonging to atom i
     105! Loop over the atoms of the van der Waals domain belonging to atom i
    106106            do ivw=ivwat1(i),ivwat2(i) 
    107 c Loop over the atoms of the van der Waals domain of the atoms of the
    108 c van der Waals domain of atom i
    109 c Q: Which atoms are in these domains?
     107! Loop over the atoms of the van der Waals domain of the atoms of the
     108! van der Waals domain of atom i
     109! Q: Which atoms are in these domains?
    110110              do j=lvwat1(ivw),lvwat2(ivw) 
    111 c Atom type of partner
     111! Atom type of partner
    112112                jty=ityat(j)
    113 c Differences in cartesian coordinates
     113! Differences in cartesian coordinates
    114114                xij=xat(j)-xi
    115115                yij=yat(j)-yi
    116116                zij=zat(j)-zi
    117 c Cartesian distance and higher powers
     117! Cartesian distance and higher powers
    118118                rij2=xij*xij+yij*yij+zij*zij
    119119                rij4=rij2*rij2
    120120                rij6=rij4*rij2
    121121                rij=sqrt(rij2)
    122 c Are we using a distance dependent dielectric constant?
     122! Are we using a distance dependent dielectric constant?
    123123                if(epsd) then
    124124                 sr=slp*rij
     
    127127                 ep = 1.0d0
    128128                end if
    129 c Coulomb interaction
     129! Coulomb interaction
    130130                eyel=eyel+cqi*cgat(j)/(rij*ep)
    131 c If the two atoms cannot form a hydrogen bond use 6-12 Lennard-Jones potential
     131! If the two atoms cannot form a hydrogen bond use 6-12 Lennard-Jones potential
    132132                if (ihbty(ity,jty).eq.0) then
    133133                  eyvw=eyvw+aij(ity,jty)/(rij6*rij6)
    134      #                     -cij(ity,jty)/rij6
     134     &                     -cij(ity,jty)/rij6
    135135                else
    136 c For hydrogen bonding use 10-12 Lennard-Jones potential
     136! For hydrogen bonding use 10-12 Lennard-Jones potential
    137137                  eyhb=eyhb+ahb(ity,jty)/(rij6*rij6)
    138      #                     -chb(ity,jty)/(rij6*rij4)
     138     &                     -chb(ity,jty)/(rij6*rij4)
    139139                endif
    140140
     
    142142            enddo 
    143143           
    144 c Loop over 1-4 interaction partners
    145 c The interactions between atoms that are three bonds apart in the protein are
    146 c dominated by quantum mechanical effects. They are treated separately.
     144! Loop over 1-4 interaction partners
     145! The interactions between atoms that are three bonds apart in the protein are
     146! dominated by quantum mechanical effects. They are treated separately.
    147147            do i14=i14at1(i),i14at2(i)   
    148148              j=l14at(i14)
     
    157157              rij6=rij4*rij2
    158158              rij = sqrt(rij2)
    159 c Are we using a distance dependent dielectric constant?
     159! Are we using a distance dependent dielectric constant?
    160160              if(epsd) then
    161161               sr=slp*rij
     
    166166
    167167              eyel=eyel+cqi*cgat(j)/(rij*ep)
    168 c If hydrogen bonding is not possible use 6-12 Lennard-Jones potential.
     168! If hydrogen bonding is not possible use 6-12 Lennard-Jones potential.
    169169              if (ihbty(ity,jty).eq.0) then
    170170                eyvw=eyvw+a14(ity,jty)/(rij6*rij6)
    171      #                   -cij(ity,jty)/rij6
     171     &                   -cij(ity,jty)/rij6
    172172              else
    173 c Use 10-12 Lennard-Jones potential for hydrogen bonds.
     173! Use 10-12 Lennard-Jones potential for hydrogen bonds.
    174174                eyhb=eyhb+ahb(ity,jty)/(rij6*rij6)
    175      #                   -chb(ity,jty)/(rij6*rij4)
     175     &                   -chb(ity,jty)/(rij6*rij4)
    176176              endif
    177177
Note: See TracChangeset for help on using the changeset viewer.