- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
hbond.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: hbond,chhb,ishybd,4 cishybdo,nursat,interhbond5 c 6 cCopyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,7 cShura Hayryan, Chin-Ku8 cCopyright 2007 Frank Eisenmenger, U.H.E. Hansmann,9 cJan H. Meinke, Sandipan Mohanty10 c 11 c**************************************************************1 !************************************************************** 2 ! 3 ! This file contains the subroutines: hbond,chhb,ishybd, 4 ! ishybdo,nursat,interhbond 5 ! 6 ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann, 7 ! Shura Hayryan, Chin-Ku 8 ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann, 9 ! Jan H. Meinke, Sandipan Mohanty 10 ! 11 ! ************************************************************** 12 12 13 13 14 14 subroutine hbond(nml,mhb,ipr) 15 c.................................................................16 cPURPOSE: find hydrogen bonds in molecule 'nml'17 c 18 cprints HBonds, if ipr > 019 c 20 cOUTPUT: mhb - number of hyd.bds. of type i->i+421 c22 cto INCL.H:23 c 24 cntyhb - number of different types of hyd. bds. found25 cnutyhb - number of hyd.bds. found for each type26 cixtyhb - index for each type of hyd. bd. composed as27 c(atom idx. of H) * 1000 + atm.idx. of acceptor28 c 29 cCALLS: chhb,ishybd (ishybdo),nursat30 C 31 c................................................................32 33 include 'INCL.H' 34 35 cf2py intent(out) mhb15 ! ................................................................. 16 ! PURPOSE: find hydrogen bonds in molecule 'nml' 17 ! 18 ! prints HBonds, if ipr > 0 19 ! 20 ! OUTPUT: mhb - number of hyd.bds. of type i->i+4 21 ! 22 ! to INCL.H: 23 ! 24 ! ntyhb - number of different types of hyd. bds. found 25 ! nutyhb - number of hyd.bds. found for each type 26 ! ixtyhb - index for each type of hyd. bd. composed as 27 ! (atom idx. of H) * 1000 + atm.idx. of acceptor 28 ! 29 ! CALLS: chhb,ishybd (ishybdo),nursat 30 ! 31 !................................................................ 32 33 include 'INCL.H' 34 35 !f2py intent(out) mhb 36 36 parameter (atbase=mxat) 37 37 logical ishb … … 50 50 if (ntlvr.eq.0) then 51 51 write (*,'(a,i4)') 52 #' hbond> No variables defined in molecule #',nml52 & ' hbond> No variables defined in molecule #',nml 53 53 return 54 54 endif 55 55 56 56 ifivr=ivrml1(nml) 57 cIndex of last moving set57 ! Index of last moving set 58 58 i1s=imsml1(nml)+nmsml(nml) 59 59 endif 60 cLoop over all variables60 ! Loop over all variables 61 61 do io=ifivr+ntlvr-1,ifivr,-1 62 cGet index of variable62 ! Get index of variable 63 63 iv=iorvr(io) 64 cIndex of next to last moving set64 ! Index of next to last moving set 65 65 i2s=i1s-1 66 cIndex of moving set belonging to iv66 ! Index of moving set belonging to iv 67 67 i1s=imsvr1(iv) 68 cLoop over all moving sets between the one belonging to iv and the69 cnext to last one68 ! Loop over all moving sets between the one belonging to iv and the 69 ! next to last one 70 70 do ims=i1s,i2s 71 cFirst atom in moving set71 ! First atom in moving set 72 72 i1=latms1(ims) 73 cLast atom in moving set73 ! Last atom in moving set 74 74 i2=latms2(ims) 75 cLoop over all atoms in moving set.75 ! Loop over all atoms in moving set. 76 76 do i=i1,i2 77 cLoop over van der Waals domains of atom i77 ! Loop over van der Waals domains of atom i 78 78 do ivw=ivwat1(i),ivwat2(i) 79 cLoop over atoms in van der Waals domain.79 ! Loop over atoms in van der Waals domain. 80 80 do j=lvwat1(ivw),lvwat2(ivw) 81 81 … … 111 111 112 112 call ishybd(i,j,ishb,ih,ia) ! Thornton criteria 113 ccall ishybdo(i,j,ishb,ih,ia)113 ! call ishybdo(i,j,ishb,ih,ia) 114 114 115 115 if (ishb) then … … 144 144 mhb=0 145 145 146 cdo inhb=1,ntyhb147 cmhb = mhb+nutyhb(inhb)148 cenddo146 ! do inhb=1,ntyhb 147 ! mhb = mhb+nutyhb(inhb) 148 ! enddo 149 149 150 150 if (ipr.gt.0) write(*,'(1x,a,/)') ' hbond> Hydrogen Bonds:' … … 173 173 if (n.gt.0) then 174 174 write(*,'(1x,i3,a2,a4,a3,i3,1x,a4,a7,a4,a3,i3,1x,a4,a9, 175 #i2)')176 #ii,') ',nmat(ia),' ( ',na,seq(na),' ) <-- ',nmat(id),177 #' ( ', nd,seq(nd),' ) = i +',n175 & i2)') 176 & ii,') ',nmat(ia),' ( ',na,seq(na),' ) <-- ',nmat(id), 177 & ' ( ', nd,seq(nd),' ) = i +',n 178 178 else 179 179 write(*,'(1x,i3,a2,a4,a3,i3,1x,a4,a7,a4,a3,i3,1x,a4,a9, 180 #i2)')181 #ii,') ',nmat(ia),' ( ',na,seq(na),' ) <-- ',nmat(id),182 #' ( ', nd,seq(nd),' ) = i -',abs(n)180 & i2)') 181 & ii,') ',nmat(ia),' ( ',na,seq(na),' ) <-- ',nmat(id), 182 & ' ( ', nd,seq(nd),' ) = i -',abs(n) 183 183 endif 184 184 … … 192 192 return 193 193 end 194 c.....................................................................195 cCalculates hydrogen bonds between different chains.196 c197 c@return number of intermolecular hydrogen bonds. Returns 0 if only198 cone molecule is present. The value is returned in the199 cvariable mhb.200 c 201 c@author Jan H. Meinke <j.meinke@fz-juelich.de>202 c203 c.....................................................................194 ! ..................................................................... 195 ! Calculates hydrogen bonds between different chains. 196 ! 197 ! @return number of intermolecular hydrogen bonds. Returns 0 if only 198 ! one molecule is present. The value is returned in the 199 ! variable mhb. 200 ! 201 ! @author Jan H. Meinke <j.meinke@fz-juelich.de> 202 ! 203 ! ..................................................................... 204 204 subroutine interhbond(mhb) 205 205 206 206 include 'INCL.H' 207 207 208 cf2py intent(out) mhb208 !f2py intent(out) mhb 209 209 210 210 logical ishb … … 233 233 234 234 end ! subroutine interhbond 235 c************************235 ! ************************ 236 236 subroutine chhb(i,j) 237 237 … … 249 249 250 250 dah=sqrt((xat(ih)-xat(ia))**2+(yat(ih)-yat(ia))**2+ 251 #(zat(ih)-zat(ia))**2)251 & (zat(ih)-zat(ia))**2) 252 252 253 253 id=iowat(ih) 254 254 255 255 dad=sqrt((xat(id)-xat(ia))**2+(yat(id)-yat(ia))**2+ 256 #(zat(id)-zat(ia))**2)256 & (zat(id)-zat(ia))**2) 257 257 adha=valang(id,ih,ia)*crd 258 258 … … 269 269 return 270 270 end 271 c*************************************271 ! ************************************* 272 272 subroutine ishybd(i,j,ishb,ih,ia) 273 273 274 274 275 c..........................................................276 cPURPOSE: checks for hydrogen bond between atoms 'i' & 'j'277 caccording to geometric criteria278 c279 cOUTPUT: logical 'ishb' - true, if have Hydrogen bond280 cih - index of Hydrogen atom281 cia - index of Acceptor atom282 c 283 c[I.K.McDonald,J.M.Thornton,Satisfying hydrogen bond284 cpotential in proteins.J.Mol.Biol.238(5),777-793 (1994)]285 c 286 cD: hydrogen(=H) donor, A: acceptor, B: atom bound to A287 c 288 cDis_HA <= 2.5 & Dis_DA <= 3.9 & Angle(D-H-A) > 90 &289 cAngle(H-A-B) > 90 & Angle(D-A-B) > 90290 c..........................................................275 ! .......................................................... 276 ! PURPOSE: checks for hydrogen bond between atoms 'i' & 'j' 277 ! according to geometric criteria 278 ! 279 ! OUTPUT: logical 'ishb' - true, if have Hydrogen bond 280 ! ih - index of Hydrogen atom 281 ! ia - index of Acceptor atom 282 ! 283 ! [I.K.McDonald,J.M.Thornton,Satisfying hydrogen bond 284 ! potential in proteins.J.Mol.Biol.238(5),777-793 (1994)] 285 ! 286 ! D: hydrogen(=H) donor, A: acceptor, B: atom bound to A 287 ! 288 ! Dis_HA <= 2.5 & Dis_DA <= 3.9 & Angle(D-H-A) > 90 & 289 ! Angle(H-A-B) > 90 & Angle(D-A-B) > 90 290 ! .......................................................... 291 291 292 292 include 'INCL.H' 293 293 294 294 parameter (cdad=3.9d0, 295 #cdah=2.5d0,296 #cang=110.d0)297 c# cang=90.d0)295 & cdah=2.5d0, 296 & cang=110.d0) 297 ! # cang=90.d0) 298 298 299 299 logical ishb … … 318 318 319 319 if (sqrt((xat(ih)-xat(ia))**2+(yat(ih)-yat(ia))**2+ 320 #(zat(ih)-zat(ia))**2).gt.cdah) return320 & (zat(ih)-zat(ia))**2).gt.cdah) return 321 321 322 322 id=iowat(ih) 323 323 324 324 if (id.le.0.or.sqrt((xat(id)-xat(ia))**2+(yat(id)-yat(ia))**2+ 325 #(zat(id)-zat(ia))**2).gt.cdad326 #.or.valang(id,ih,ia).lt.cahb) return325 & (zat(id)-zat(ia))**2).gt.cdad 326 & .or.valang(id,ih,ia).lt.cahb) return 327 327 328 328 ib=iowat(ia) 329 329 330 330 if (ib.gt.0.and.valang(ih,ia,ib).ge.cahb 331 #.and.valang(id,ia,ib).ge.cahb) ishb=.true.331 & .and.valang(id,ia,ib).ge.cahb) ishb=.true. 332 332 333 333 return 334 334 end 335 c**************************************335 ! ************************************** 336 336 337 337 subroutine ishybdo(i,j,ishb,ih,ia) 338 338 339 c..........................................................340 cPURPOSE: checks for hydrogen bond between atoms 'i' & 'j'341 caccording to geometric criteria342 c343 cOUTPUT: logical 'ishb' - true, if have Hydrogen bond344 cih - index of Hydrogen atom345 cia - index of Acceptor atom346 c 347 cD: hydrogen(=H) donor, A: acceptor348 c 349 cDis_AH <= 2.5 & Angle(D-H-A) >= 160350 c...........................................................339 ! .......................................................... 340 ! PURPOSE: checks for hydrogen bond between atoms 'i' & 'j' 341 ! according to geometric criteria 342 ! 343 ! OUTPUT: logical 'ishb' - true, if have Hydrogen bond 344 ! ih - index of Hydrogen atom 345 ! ia - index of Acceptor atom 346 ! 347 ! D: hydrogen(=H) donor, A: acceptor 348 ! 349 ! Dis_AH <= 2.5 & Angle(D-H-A) >= 160 350 ! ........................................................... 351 351 352 352 include 'INCL.H' 353 353 354 354 parameter (cdah=2.5d0, 355 #cang=140.d0)355 & cang=140.d0) 356 356 357 357 logical ishb … … 377 377 378 378 if (sqrt((xat(ih)-xat(ia))**2+(yat(ih)-yat(ia))**2+ 379 #(zat(ih)-zat(ia))**2).gt.cdah) return379 & (zat(ih)-zat(ia))**2).gt.cdah) return 380 380 381 381 id=iowat(ih)
Note:
See TracChangeset
for help on using the changeset viewer.