Changeset 32289cd for energy.f


Ignore:
Timestamp:
11/19/09 11:29:41 (14 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
38d77eb
Parents:
6650a56
Message:

Explicitly declare variables.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • energy.f

    r6650a56 r32289cd  
    44!
    55! Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
    6 !                      Shura Hayryan, Chin-Ku 
     6!                      Shura Hayryan, Chin-Ku
    77! Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
    88!                      Jan H. Meinke, Sandipan Mohanty
     
    2222
    2323      include 'INCL.H'
     24      double precision esm, teysl, enyshe, enyflx, enylun, enyreg
     25      double precision enysol, esolan, exvlun, eyabgn, eninteract
     26
     27      integer i
     28
    2429      double precision teysm, teyel, teyvw, teyhb, teyvr
    25 !      print *,'energy function with ientyp  = ',ientyp   
     30!      print *,'energy function with ientyp  = ',ientyp
    2631      esm = 0.d0
    2732      teysm = 0.d0
     
    3237      teysl = 0.d0
    3338
    34       do i = 1,ntlml 
     39      do i = 1,ntlml
    3540         eysm=0
    3641         eyel=0
     
    4449        if (ientyp.eq.0.or.ientyp.eq.3) then
    4550          esm=esm+enyshe(i)
    46         else if (ientyp.eq.1) then 
     51        else if (ientyp.eq.1) then
    4752          esm=esm+enyflx(i)
    4853        else if (ientyp.eq.2) then
     
    5762!     The Lund term stores the hydrophobicity energy in eysl
    5863           teysl = teysl + eysl
    59         else 
     64        else
    6065!     .. and the excluded volume term in eyvw, which is calculated once.
    6166           teyvw = teyvw + eyvw
    6267        endif
    6368
    64         if (ireg.eq.1)  eyrg=enyreg(i)       
     69        if (ireg.eq.1)  eyrg=enyreg(i)
    6570
    6671      enddo
    6772
    68       if (ientyp.ne.2) then 
    69 !     Don't touch eysl if using Lund potential, as enylun stores 
     73      if (ientyp.ne.2) then
     74!     Don't touch eysl if using Lund potential, as enylun stores
    7075!     its hydrophobicity term there.
    7176         if (itysol.gt.0) then
     
    7984            eysl=0.d0
    8085         endif
    81       else 
     86      else
    8287!     Add excluded volume term and save it in eyvw
    8388         esm=esm+exvlun(0)
     
    8590      endif
    8691
    87 ! The Abagyan entropic corrections depend on the area exposed to the 
     92! The Abagyan entropic corrections depend on the area exposed to the
    8893! solvent for each residue. So, this term has to be evaluated after the
    8994! solvent term.
    9095      eyab=0.0
    9196      if (ientyp.eq.3) then
    92          do i = 1,ntlml 
     97         do i = 1,ntlml
    9398            eyab=eyab+eyabgn(i)
    9499         enddo
     
    103108      eyvr = teyvr
    104109      eysl = teysl
    105      
     110
    106111      if (ientyp.ne.2) then
    107112!     This is temporary. eninteract() does not yet know how to calculate
     
    116121!c Calculates the internal energy for a single molecule.
    117122!  All the partial energies are thus set to their values for molecule
    118 !  nml. 
     123!  nml.
    119124!
    120125!  @param nml the ID of the molecule
     
    125130
    126131!f2py intent(in) nml
    127      
     132
    128133      include 'INCL.H'
     134      double precision esm, enyshe, enyflx, enylun, enyreg, enysol
     135      double precision esolan, exvlun, eyabgn
     136
     137      integer nml, i
     138
    129139      esm = 0.d0
    130140
    131       call setvar(nml,vlvr) 
     141      call setvar(nml,vlvr)
    132142
    133143      if (ientyp.eq.0.or.ientyp.eq.3) then
     
    149159            eysl=0.d0
    150160         endif
    151       else 
     161      else
    152162         esm=esm+exvlun(nml)
    153163      endif
    154 ! The Abagyan entropic corrections depend on the area exposed to the 
     164! The Abagyan entropic corrections depend on the area exposed to the
    155165! solvent for each residue. So, this term has to be evaluated after the
    156166! solvent term.
Note: See TracChangeset for help on using the changeset viewer.