- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bldmol.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: bldmol, fnd3ba,eyring,4 csetsys,setgbl5 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: bldmol, fnd3ba,eyring, 4 ! setsys,setgbl 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 subroutine bldmol(nml) 14 14 15 c.................................................16 cPURPOSE: calculate coordinates for molecule 'nml'17 c 18 cOUTPUT: xat,yat,zat,xbaat,ybaat,zbaat,xtoat,ytoat,19 cztoat (via 'eyring')20 c 21 c1st backbone atom of 1st residue of 'nml':22 c 23 c- it's position: from 'gbpr(1-3,nml)'24 c- it's axes: from 'setgbl' according to25 cglobal angles 'gbpr(4-5,nml)'26 c 27 cCALLS: eyring, fnd3ba,setgbl,setsys28 c.................................................15 ! ................................................. 16 ! PURPOSE: calculate coordinates for molecule 'nml' 17 ! 18 ! OUTPUT: xat,yat,zat,xbaat,ybaat,zbaat,xtoat,ytoat, 19 ! ztoat (via 'eyring') 20 ! 21 ! 1st backbone atom of 1st residue of 'nml': 22 ! 23 ! - it's position: from 'gbpr(1-3,nml)' 24 ! - it's axes: from 'setgbl' according to 25 ! global angles 'gbpr(4-5,nml)' 26 ! 27 ! CALLS: eyring, fnd3ba,setgbl,setsys 28 ! ................................................. 29 29 30 30 include 'INCL.H' … … 34 34 35 35 call fnd3ba(nml,i1,i2,i3) 36 c------------------------------ first 3 bb atoms of 'nml'36 ! ------------------------------ first 3 bb atoms of 'nml' 37 37 ixrfpt(1,nml)=i1 38 38 ixrfpt(2,nml)=i2 39 39 ixrfpt(3,nml)=i3 40 40 41 c------------------------------ position of 1st bb atom41 ! ------------------------------ position of 1st bb atom 42 42 xat(i1) = gbpr(1,nml) 43 43 yat(i1) = gbpr(2,nml) … … 86 86 return 87 87 end 88 c***********************************88 ! *********************************** 89 89 subroutine fnd3ba(nml,i1,i2,i3) 90 90 91 c.................................................92 cPURPOSE: return indices 'i1,i2,i3' of93 cfirst 3 backbone atoms in molecule 'nml'94 c 95 cCALLS: fndbrn96 c.................................................91 ! ................................................. 92 ! PURPOSE: return indices 'i1,i2,i3' of 93 ! first 3 backbone atoms in molecule 'nml' 94 ! 95 ! CALLS: fndbrn 96 ! ................................................. 97 97 98 98 include 'INCL.H' … … 104 104 irs=irsml1(nml) 105 105 106 c--------------------------- 1st bb atom106 ! --------------------------- 1st bb atom 107 107 i1=iatrs1(irs) 108 108 109 109 call fndbrn(nml,irs,i1,i,ix,i2,bb) 110 110 111 c--------------------------- 2nd bb atom111 ! --------------------------- 2nd bb atom 112 112 i2=i+1 113 113 114 c------------------------ check for ring114 ! ------------------------ check for ring 115 115 116 116 ibd(1)=iowat(i1) … … 126 126 if (ix.ne.0) then 127 127 write (*,'(2a,i3)') 128 #' fnd3ba> Can handle only simple ring at 1st',129 #' atom of molecule #',nml128 & ' fnd3ba> Can handle only simple ring at 1st', 129 & ' atom of molecule #',nml 130 130 stop 131 131 endif … … 135 135 enddo 136 136 137 c--------------------------- 3rd bb atom137 ! --------------------------- 3rd bb atom 138 138 139 139 ix=ixatrs(irs) … … 158 158 159 159 write (*,'(4a,i4,a,i4)') 160 #' fnd3ba> Cannot find backbone atom following ',nmat(i2),161 #' of residue ',seq(irs),irs,' in molecule #',nml160 & ' fnd3ba> Cannot find backbone atom following ',nmat(i2), 161 & ' of residue ',seq(irs),irs,' in molecule #',nml 162 162 stop 163 163 164 164 end 165 c***************************165 ! *************************** 166 166 subroutine eyring(i,ia) 167 167 168 c.........................................................169 cPURPOSE: calculate cartesian coordinates of atom 'i'170 cusing EYRING's algorithm171 cINPUT: i - index of atom to be constructed172 cfor 'i': blat,csbaat,snbaat,cstoat,sntoat173 cia- index of atom from which 'i' is to be built174 cOUTPUT: for 'i': xat,yat,zat,xbaat,ybaat,zbaat,xtoat,ytoat,ztoat175 c 176 cCALLS: none177 c.........................................................168 ! ......................................................... 169 ! PURPOSE: calculate cartesian coordinates of atom 'i' 170 ! using EYRING's algorithm 171 ! INPUT: i - index of atom to be constructed 172 ! for 'i': blat,csbaat,snbaat,cstoat,sntoat 173 ! ia- index of atom from which 'i' is to be built 174 ! OUTPUT: for 'i': xat,yat,zat,xbaat,ybaat,zbaat,xtoat,ytoat,ztoat 175 ! 176 ! CALLS: none 177 ! ......................................................... 178 178 179 179 include 'INCL.H' … … 228 228 return 229 229 end 230 c***********************************************************230 ! *********************************************************** 231 231 subroutine setsys(i1,i2,i3, x1,x2,x3,y1,y2,y3,z1,z2,z3) 232 232 233 c..........................................................234 cPURPOSE: calculate axes X,Y,Z of right-handed orthogonal235 csystem given by three atom positions R1, R2, R3236 c 237 cX = (R2-R1)/ |( )|238 cZ = {X x (R2-R3)} / |{ }|239 cY = Z x X240 c 241 cINPUT: i1, i2, i3 - indices of three atoms242 cOUTPUT: x1,x2,x3 |243 cy1,y2,y3 | -direction cosines of X,Y,Z244 cz1,z2,z3 |245 c 246 cCALLS: none247 c...................................................233 ! .......................................................... 234 ! PURPOSE: calculate axes X,Y,Z of right-handed orthogonal 235 ! system given by three atom positions R1, R2, R3 236 ! 237 ! X = (R2-R1)/ |( )| 238 ! Z = {X x (R2-R3)} / |{ }| 239 ! Y = Z x X 240 ! 241 ! INPUT: i1, i2, i3 - indices of three atoms 242 ! OUTPUT: x1,x2,x3 | 243 ! y1,y2,y3 | -direction cosines of X,Y,Z 244 ! z1,z2,z3 | 245 ! 246 ! CALLS: none 247 ! ................................................... 248 248 249 249 … … 283 283 end 284 284 285 c*****************************************285 ! ***************************************** 286 286 subroutine setgbl(nml,i1,i2,i3,xg,zg) 287 287 288 c...................................................289 c 290 cPURPOSE: 1. Obtain global axes (J,K,L)291 crelated to x(1 0 0),y(0 1 0),z(0 0 1)292 cby 3 rotations (gbl. parameters #4-#6):293 c 294 c- round z by angle alpha295 c- round x' by a. beta296 c- round y" by a. gamma297 c 298 c2. Return x-axis (xg) & z-axis (zg)299 cfor atom #1 in order to orientate J300 calong the bond from backbone atom #1301 cto bb.a. #2 and L according to the302 ccross product [ bond(#1->#2) x303 cbond(#2->#3) ] when using Eyring's304 calgorithm to get the coordinates305 c 306 cCALLS: none307 c..............................................288 ! ................................................... 289 ! 290 ! PURPOSE: 1. Obtain global axes (J,K,L) 291 ! related to x(1 0 0),y(0 1 0),z(0 0 1) 292 ! by 3 rotations (gbl. parameters #4-#6): 293 ! 294 ! - round z by angle alpha 295 ! - round x' by a. beta 296 ! - round y" by a. gamma 297 ! 298 ! 2. Return x-axis (xg) & z-axis (zg) 299 ! for atom #1 in order to orientate J 300 ! along the bond from backbone atom #1 301 ! to bb.a. #2 and L according to the 302 ! cross product [ bond(#1->#2) x 303 ! bond(#2->#3) ] when using Eyring's 304 ! algorithm to get the coordinates 305 ! 306 ! CALLS: none 307 ! .............................................. 308 308 309 309 include 'INCL.H' … … 319 319 sg = sin(gbpr(6,nml)) 320 320 321 c----------------------------- J321 ! ----------------------------- J 322 322 x1 = ca*cg - sa*sb*sg 323 323 x2 = sa*cg + ca*sb*sg … … 328 328 ag(2,1) = x2/d 329 329 ag(3,1) = x3/d 330 c----------------------------- K330 ! ----------------------------- K 331 331 y1 = -sa*cb 332 332 y2 = ca*cb … … 337 337 ag(2,2) = y2/d 338 338 ag(3,2) = y3/d 339 c----------------------------- L339 ! ----------------------------- L 340 340 z1 = ca*sg + sa*sb*cg 341 341 z2 = sa*sg - ca*sb*cg … … 347 347 ag(3,3) = z3/d 348 348 349 c------------------------------------ X1349 ! ------------------------------------ X1 350 350 ct2 = cstoat(i2) 351 351 st2 = sntoat(i2) … … 360 360 x2 = x2/dx 361 361 x3 = x3/dx 362 c------------------------------------- Z1362 ! ------------------------------------- Z1 363 363 st3 = sntoat(i3) 364 364 ct3 = cstoat(i3) … … 372 372 z2 = z2/dz 373 373 z3 = z3/dz 374 c------------------------------------- Y1374 ! ------------------------------------- Y1 375 375 y1 = z2 * x3 - z3 * x2 376 376 y3 = z1 * x2 - z2 * x1 ! do not need y2 377 377 378 c----------------------------- into global system378 ! ----------------------------- into global system 379 379 380 380 xg(1) = ag(1,1)*x1 + ag(1,2)*y1 + ag(1,3)*z1
Note:
See TracChangeset
for help on using the changeset viewer.