- Timestamp:
- 06/22/08 14:33:26 (16 years ago)
- Branches:
- master
- Children:
- b477fe8
- Parents:
- 621e10f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
energy.f
r621e10f r078aff3 1 c**************************************************************2 c 3 cThis file contains the subroutines: energy, enyinternal4 c 5 cCopyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,6 cShura Hayryan, Chin-Ku7 cCopyright 2007 Frank Eisenmenger, U.H.E. Hansmann,8 cJan H. Meinke, Sandipan Mohanty9 c 10 c**************************************************************1 ! ************************************************************** 2 ! 3 ! This file contains the subroutines: energy, enyinternal 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 ! ************************************************************** 11 11 12 12 real*8 function energy() 13 c------------------------------------------14 cPURPOSE: calculate the *total* energy of the system15 c 16 cientyp = 0 for ECEPP3, 1 for FLEX, 2 for Lund17 c3 for ECEPP3 with Abagyan corrections18 c 19 cCALLS: enyflx,enyreg,enyshe,enysol,esolan,setvar, eninteract20 c 21 c-------------------------------------------------13 ! ------------------------------------------ 14 ! PURPOSE: calculate the *total* energy of the system 15 ! 16 ! ientyp = 0 for ECEPP3, 1 for FLEX, 2 for Lund 17 ! 3 for ECEPP3 with Abagyan corrections 18 ! 19 ! CALLS: enyflx,enyreg,enyshe,enysol,esolan,setvar, eninteract 20 ! 21 ! ------------------------------------------------- 22 22 23 23 include 'INCL.H' 24 24 double precision teysm, teyel, teyvw, teyhb, teyvr 25 cprint *,'energy function with ientyp = ',ientyp25 ! print *,'energy function with ientyp = ',ientyp 26 26 esm = 0.d0 27 27 teysm = 0.d0 … … 55 55 teyvr = teyvr + eyvr 56 56 if (ientyp.eq.2) then 57 cThe Lund term stores the hydrophobicity energy in eysl57 ! The Lund term stores the hydrophobicity energy in eysl 58 58 teysl = teysl + eysl 59 59 else 60 c.. and the excluded volume term in eyvw, which is calculated once.60 ! .. and the excluded volume term in eyvw, which is calculated once. 61 61 teyvw = teyvw + eyvw 62 62 endif … … 67 67 68 68 if (ientyp.ne.2) then 69 cDon't touch eysl if using Lund potential, as enylun stores70 cits hydrophobicity term there.69 ! Don't touch eysl if using Lund potential, as enylun stores 70 ! its hydrophobicity term there. 71 71 if (itysol.gt.0) then 72 72 esm=esm+enysol(0) 73 73 teysl = teysl+eysl 74 !elseif (itysol.lt.0) then75 !esm=esm+esolan(0)74 elseif (itysol.lt.0) then 75 esm=esm+esolan(0) 76 76 else 77 77 eysl=0.d0 78 78 endif 79 79 else 80 cAdd excluded volume term and save it in eyvw80 ! Add excluded volume term and save it in eyvw 81 81 esm=esm+exvlun(0) 82 82 teyvw = teyvw+eyvw 83 83 endif 84 84 85 cThe Abagyan entropic corrections depend on the area exposed to the86 csolvent for each residue. So, this term has to be evaluated after the87 csolvent term.85 ! The Abagyan entropic corrections depend on the area exposed to the 86 ! solvent for each residue. So, this term has to be evaluated after the 87 ! solvent term. 88 88 eyab=0.0 89 89 if (ientyp.eq.3) then … … 93 93 endif 94 94 esm=esm+eyab 95 cPartial energies for the entire system. If you need the partial96 cenergies for a single molecule call enyinternal.95 ! Partial energies for the entire system. If you need the partial 96 ! energies for a single molecule call enyinternal. 97 97 eysm = teysm 98 98 eyel = teyel … … 103 103 104 104 if (ientyp.ne.2) then 105 cThis is temporary. eninteract() does not yet know how to calculate106 cinteractions using the Lund potential.105 ! This is temporary. eninteract() does not yet know how to calculate 106 ! interactions using the Lund potential. 107 107 energy = esm + eninteract() 108 108 return … … 112 112 end 113 113 114 cc Calculates the internal energy for a single molecule.115 cAll the partial energies are thus set to their values for molecule116 cnml.117 c 118 c@param nml the ID of the molecule119 c@return internal energy of a single molecule120 c 121 c@author Jan H. Meinke <j.meinke@fz-juelich.de>114 !c Calculates the internal energy for a single molecule. 115 ! All the partial energies are thus set to their values for molecule 116 ! nml. 117 ! 118 ! @param nml the ID of the molecule 119 ! @return internal energy of a single molecule 120 ! 121 ! @author Jan H. Meinke <j.meinke@fz-juelich.de> 122 122 real*8 function enyinternal(nml) 123 123 124 cf2py intent(in) nml124 !f2py intent(in) nml 125 125 126 126 include 'INCL.H' … … 142 142 if (itysol.gt.0) then 143 143 esm=esm+enysol(nml) 144 !elseif (itysol.lt.0) then145 !esm=esm+esolan(nml)144 elseif (itysol.lt.0) then 145 esm=esm+esolan(nml) 146 146 else 147 147 eysl=0.d0 … … 150 150 esm=esm+exvlun(nml) 151 151 endif 152 cThe Abagyan entropic corrections depend on the area exposed to the153 csolvent for each residue. So, this term has to be evaluated after the154 csolvent term.152 ! The Abagyan entropic corrections depend on the area exposed to the 153 ! solvent for each residue. So, this term has to be evaluated after the 154 ! solvent term. 155 155 eyab=0.0 156 156 if (ientyp.eq.3) then
Note:
See TracChangeset
for help on using the changeset viewer.