- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
enyshe.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: enyshe4 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: 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 ! ************************************************************** 11 11 12 12 13 13 real*8 function enyshe(nml) 14 14 15 c............................................................................16 c 17 cPURPOSE: Calculate internal energy of molecule 'nml' with ECEPP parameters18 c 19 cCALLS: none20 c 21 cThe function loops over all moving sets within the molecule. Within22 cthis loop it loops over the van-der-Waals domains of each atom in the23 cmoving set and finally over the atoms that belong to the 1-4 interaction24 cset.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 ! ............................................................................ 26 26 27 27 include 'INCL.H' 28 28 29 cIf nml == 0 calculate the interaction between all pairs.29 ! If nml == 0 calculate the interaction between all pairs. 30 30 if (nml.eq.0) then 31 31 ntlvr = nvr … … 36 36 if (ntlvr.eq.0) then 37 37 write (*,'(a,i4)') 38 #' enyshe> No variables defined in molecule #',nml38 & ' enyshe> No variables defined in molecule #',nml 39 39 return 40 40 endif … … 49 49 i1s = imsml1(ntlml) + nmsml(ntlml) 50 50 else 51 cIndex of first variable in molecule.51 ! Index of first variable in molecule. 52 52 ifivr=ivrml1(nml) 53 cIndex of last moving set in molecule53 ! Index of last moving set in molecule 54 54 i1s=imsml1(nml)+nmsml(nml) 55 55 endif 56 cLoop over moving sets/variables in reverse order56 ! Loop over moving sets/variables in reverse order 57 57 do io=ifivr+ntlvr-1,ifivr,-1 58 cThe array iorvr contains the variables in an "apropriate" order.58 ! The array iorvr contains the variables in an "apropriate" order. 59 59 iv=iorvr(io) 60 cIndex of the primary moving atom for the variable with index iv60 ! Index of the primary moving atom for the variable with index iv 61 61 ia=iatvr(iv) 62 cGet the type of variable iv (valence length, valence angle, dihedral angle)62 ! Get the type of variable iv (valence length, valence angle, dihedral angle) 63 63 it=ityvr(iv) 64 cClass of variable iv's potential (Q: What are they)64 ! Class of variable iv's potential (Q: What are they) 65 65 ic=iclvr(iv) 66 cIf iv is a dihedral angle ...66 ! If iv is a dihedral angle ... 67 67 if (it.eq.3) then 68 cBarrier height * 1/2 of the potential of iv.68 ! Barrier height * 1/2 of the potential of iv. 69 69 e0=e0to(ic) 70 cCalculate the periodic potential term. sgto is the sign of the barrier, rnto is71 cthe 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. 72 72 if (e0.ne.0.) 73 #eyvr=eyvr+e0*(1.0+sgto(ic)*cos(toat(ia)*rnto(ic)))74 celse 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 ... 75 75 elseif (it.eq.2) then 76 cvr is the valence angle of ia76 ! vr is the valence angle of ia 77 77 vr=baat(ia) 78 celse if iv is a valence length...78 ! else if iv is a valence length... 79 79 elseif (it.eq.1) then 80 cvr is the length of the valence bond80 ! vr is the length of the valence bond 81 81 vr=blat(ia) 82 82 endif 83 83 84 c============================================ Energies & Atomic forces85 cindex of next to last moving set84 ! ============================================ Energies & Atomic forces 85 ! index of next to last moving set 86 86 i2s=i1s-1 87 cindex of first moving set associated with iv87 ! index of first moving set associated with iv 88 88 i1s=imsvr1(iv) 89 cLoop 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. 90 90 do ims=i1s,i2s 91 cFirst atom of the current moving set91 ! First atom of the current moving set 92 92 i1=latms1(ims) 93 cLast atom of the current moving set93 ! Last atom of the current moving set 94 94 i2=latms2(ims) 95 cLoop over all atoms of the current moving set.95 ! Loop over all atoms of the current moving set. 96 96 do i=i1,i2 97 cAtom class of current atom97 ! Atom class of current atom 98 98 ity=ityat(i) 99 cPoint charge at current atom99 ! Point charge at current atom 100 100 cqi=conv*cgat(i) 101 cCartesian coordinates of current atom101 ! Cartesian coordinates of current atom 102 102 xi=xat(i) 103 103 yi=yat(i) 104 104 zi=zat(i) 105 cLoop over the atoms of the van der Waals domain belonging to atom i105 ! Loop over the atoms of the van der Waals domain belonging to atom i 106 106 do ivw=ivwat1(i),ivwat2(i) 107 cLoop over the atoms of the van der Waals domain of the atoms of the108 cvan der Waals domain of atom i109 cQ: 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? 110 110 do j=lvwat1(ivw),lvwat2(ivw) 111 cAtom type of partner111 ! Atom type of partner 112 112 jty=ityat(j) 113 cDifferences in cartesian coordinates113 ! Differences in cartesian coordinates 114 114 xij=xat(j)-xi 115 115 yij=yat(j)-yi 116 116 zij=zat(j)-zi 117 cCartesian distance and higher powers117 ! Cartesian distance and higher powers 118 118 rij2=xij*xij+yij*yij+zij*zij 119 119 rij4=rij2*rij2 120 120 rij6=rij4*rij2 121 121 rij=sqrt(rij2) 122 cAre we using a distance dependent dielectric constant?122 ! Are we using a distance dependent dielectric constant? 123 123 if(epsd) then 124 124 sr=slp*rij … … 127 127 ep = 1.0d0 128 128 end if 129 cCoulomb interaction129 ! Coulomb interaction 130 130 eyel=eyel+cqi*cgat(j)/(rij*ep) 131 cIf the two atoms cannot form a hydrogen bond use 6-12 Lennard-Jones potential131 ! If the two atoms cannot form a hydrogen bond use 6-12 Lennard-Jones potential 132 132 if (ihbty(ity,jty).eq.0) then 133 133 eyvw=eyvw+aij(ity,jty)/(rij6*rij6) 134 #-cij(ity,jty)/rij6134 & -cij(ity,jty)/rij6 135 135 else 136 cFor hydrogen bonding use 10-12 Lennard-Jones potential136 ! For hydrogen bonding use 10-12 Lennard-Jones potential 137 137 eyhb=eyhb+ahb(ity,jty)/(rij6*rij6) 138 #-chb(ity,jty)/(rij6*rij4)138 & -chb(ity,jty)/(rij6*rij4) 139 139 endif 140 140 … … 142 142 enddo 143 143 144 cLoop over 1-4 interaction partners145 cThe interactions between atoms that are three bonds apart in the protein are146 cdominated 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. 147 147 do i14=i14at1(i),i14at2(i) 148 148 j=l14at(i14) … … 157 157 rij6=rij4*rij2 158 158 rij = sqrt(rij2) 159 cAre we using a distance dependent dielectric constant?159 ! Are we using a distance dependent dielectric constant? 160 160 if(epsd) then 161 161 sr=slp*rij … … 166 166 167 167 eyel=eyel+cqi*cgat(j)/(rij*ep) 168 cIf hydrogen bonding is not possible use 6-12 Lennard-Jones potential.168 ! If hydrogen bonding is not possible use 6-12 Lennard-Jones potential. 169 169 if (ihbty(ity,jty).eq.0) then 170 170 eyvw=eyvw+a14(ity,jty)/(rij6*rij6) 171 #-cij(ity,jty)/rij6171 & -cij(ity,jty)/rij6 172 172 else 173 cUse 10-12 Lennard-Jones potential for hydrogen bonds.173 ! Use 10-12 Lennard-Jones potential for hydrogen bonds. 174 174 eyhb=eyhb+ahb(ity,jty)/(rij6*rij6) 175 #-chb(ity,jty)/(rij6*rij4)175 & -chb(ity,jty)/(rij6*rij4) 176 176 endif 177 177
Note:
See TracChangeset
for help on using the changeset viewer.