- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pdbread.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: pdbread,pdbvars,atixpdb,getpar4 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: pdbread,pdbvars,atixpdb,getpar 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 subroutine pdbread(pdbfil,ier) 13 13 14 c....................................................15 cPURPOSE: read protein atom coordinates from 'pdbfil'16 c(no Hydrogens, only ATOM records)17 c 18 cRETURNS: 0 = no errors / 1 = error19 c 20 cCALLS: iopfil,iendst21 c......................................................14 ! .................................................... 15 ! PURPOSE: read protein atom coordinates from 'pdbfil' 16 ! (no Hydrogens, only ATOM records) 17 ! 18 ! RETURNS: 0 = no errors / 1 = error 19 ! 20 ! CALLS: iopfil,iendst 21 ! ...................................................... 22 22 23 23 implicit real*8 (a-h,o-z) … … 26 26 include 'INCP.H' 27 27 28 c-------------------------- input28 ! -------------------------- input 29 29 character*(*) pdbfil 30 c-------------------------- local30 ! -------------------------- local 31 31 dimension cor(3) 32 32 character atm*4,rsn*3,rsno*3,chn,chno, 33 #rsid*5,rsido*5,line*13233 & rsid*5,rsido*5,line*132 34 34 35 35 natp=0 … … 48 48 else 49 49 write (*,'(a)') 50 #' pdbread> empty file name to read pdb-structure'50 & ' pdbread> empty file name to read pdb-structure' 51 51 52 52 return … … 57 57 if (io.le.0) then 58 58 write (*,'(a,/,a)') 59 #' pdbread> ERROR opening file to read pdb-structure: ',60 #pdbfil(1:iendst(pdbfil))59 & ' pdbread> ERROR opening file to read pdb-structure: ', 60 & pdbfil(1:iendst(pdbfil)) 61 61 62 62 return … … 70 70 if ( line(17:17).ne.' ' ) then 71 71 write (*,'(a,/,a,/,a,/,2a)') 72 #' pdbread> found alternate atom location: ',73 #' !',74 #line(:l),' in file: ',pdbfil(1:iendst(pdbfil))72 & ' pdbread> found alternate atom location: ', 73 & ' !', 74 & line(:l),' in file: ',pdbfil(1:iendst(pdbfil)) 75 75 76 76 close(lunpdb) … … 86 86 if ((natp+1).gt.MXATP) then 87 87 write (*,'(a,i5,a,/,a)') 88 #' pdbread> >MXATP (',MXATP,') ATOM lines in PDB file ',89 #pdbfil(1:iendst(pdbfil))88 & ' pdbread> >MXATP (',MXATP,') ATOM lines in PDB file ', 89 & pdbfil(1:iendst(pdbfil)) 90 90 91 91 close(lunpdb) … … 97 97 if ((nchp+1).gt.MXCHP) then 98 98 write (*,'(a,i3,a,/,a)') 99 #' pdbread> >MXCHP (',MXCHP,') chains in PDB file ',100 #pdbfil(1:iendst(pdbfil))99 & ' pdbread> >MXCHP (',MXCHP,') chains in PDB file ', 100 & pdbfil(1:iendst(pdbfil)) 101 101 102 102 close(lunpdb) … … 106 106 if ((nrsp+1).gt.MXRSP) then 107 107 write (*,'(a,i3,a,/,a)') 108 #' pdbread> >MXRSP (',MXRSP,') residues in PDB file ',109 #pdbfil(1:iendst(pdbfil))108 & ' pdbread> >MXRSP (',MXRSP,') residues in PDB file ', 109 & pdbfil(1:iendst(pdbfil)) 110 110 111 111 close(lunpdb) … … 141 141 if ((nrsp+1).gt.MXRSP) then 142 142 write (*,'(a,i3,a,/,a)') 143 #' pdbread> >MXRSP (',MXRSP,') residues in PDB file ',144 #pdbfil(1:iendst(pdbfil))143 & ' pdbread> >MXRSP (',MXRSP,') residues in PDB file ', 144 & pdbfil(1:iendst(pdbfil)) 145 145 146 146 close(lunpdb) … … 172 172 173 173 2 write (*,'(a,/,a,/,2a)') 174 #' pdbread> ERROR reading ATOM line ',175 #line(:l),176 #' from file ',pdbfil(1:iendst(pdbfil))174 & ' pdbread> ERROR reading ATOM line ', 175 & line(:l), 176 & ' from file ',pdbfil(1:iendst(pdbfil)) 177 177 178 178 close(lunpdb) … … 195 195 196 196 write (*,'(a,/,a)') 197 #' pdbread> NO atom coordinates selected from file ',198 #pdbfil(1:iendst(pdbfil))197 & ' pdbread> NO atom coordinates selected from file ', 198 & pdbfil(1:iendst(pdbfil)) 199 199 200 200 endif … … 205 205 206 206 end 207 c**************************************************************207 ! ************************************************************** 208 208 209 209 subroutine pdbvars() 210 210 211 c--------------------------------------------------------------------212 cPURPOSE: sequence,indices for selected atoms (data in INCP.H)213 c& torsions from PDB to be used to build SMMP structure214 c 215 cixatp(i,)216 c= indices for SMMP atoms pointing to PDB atoms217 c(=0, if atom not selected)218 c 219 c--------------------------------- ref. point & axes220 cixrfpt(3,),rfpt(3,),xrfax(3,),yrfax(3,),zrfax(3,)221 c 222 cCALLS: tolost,getmol,bldmol,addend,atixpdb,setmvs,mklist,223 cdihedr,fnd3ba,setsys,getpar,setvar,rmsdopt224 c--------------------------------------------------------------------211 ! -------------------------------------------------------------------- 212 ! PURPOSE: sequence,indices for selected atoms (data in INCP.H) 213 ! & torsions from PDB to be used to build SMMP structure 214 ! 215 ! ixatp(i,) 216 ! = indices for SMMP atoms pointing to PDB atoms 217 ! (=0, if atom not selected) 218 ! 219 ! --------------------------------- ref. point & axes 220 ! ixrfpt(3,),rfpt(3,),xrfax(3,),yrfax(3,),zrfax(3,) 221 ! 222 ! CALLS: tolost,getmol,bldmol,addend,atixpdb,setmvs,mklist, 223 ! dihedr,fnd3ba,setsys,getpar,setvar,rmsdopt 224 ! -------------------------------------------------------------------- 225 225 226 226 include 'INCL.H' … … 236 236 do nc=1,nchp ! PDB chains 237 237 238 c=============================== SMMP molecule238 ! =============================== SMMP molecule 239 239 nml=nml+1 240 240 if (nml.gt.mxml) then 241 241 write(*,'(a,i4,2a)')' pdbvars> NUMBER of chains > ' 242 #,mxml,' in ',' ?'242 & ,mxml,' in ',' ?' 243 243 stop 244 244 endif 245 245 ntlml=nml 246 c----------------------------- 'nmml' = ChainID246 ! ----------------------------- 'nmml' = ChainID 247 247 nmml(nml)=chnp(nc) 248 248 249 c======================================== get sequence249 ! ======================================== get sequence 250 250 251 251 irb=nrs+1 252 252 ire=nrs+nchrsp(nc) 253 c----------------------------- # of 1st & last residue253 ! ----------------------------- # of 1st & last residue 254 254 irsml1(nml)=irb 255 255 irsml2(nml)=ire … … 261 261 if (nrs.gt.mxrs) then 262 262 write(*,'(a,i4,2a)') ' pdbvars> NUMBER of residues > ' 263 #,mxrs,' in ',' ?'263 & ,mxrs,' in ',' ?' 264 264 stop 265 265 endif … … 271 271 272 272 if (.not.flex.and.irs.eq.irb.and.seq(nrs)(1:3).eq.'pro') 273 #seq(nrs)='pron' ! only ECEPP/3273 & seq(nrs)='pron' ! only ECEPP/3 274 274 275 275 enddo ! residues 276 276 277 c======================== get initial coords. for molecule 'nml'278 cwith library values for deg. of freedom277 ! ======================== get initial coords. for molecule 'nml' 278 ! with library values for deg. of freedom 279 279 280 280 call getmol(nml) ! assemble res. data from libraries … … 289 289 call atixpdb(nml) ! get 'ixatp' 290 290 291 c-------------------------- 'load' SMMP variable information291 ! -------------------------- 'load' SMMP variable information 292 292 call setmvs(nml) ! moving sets 293 293 call mklist(nml) ! interaction lists 294 294 295 c================================= get variables for 'nml'295 ! ================================= get variables for 'nml' 296 296 297 297 ii=ivrml1(nml) … … 356 356 nvr = ivrml1(ntlml)+nvrml(ntlml)-1 357 357 358 c================================= global parameters for 'nml'359 360 c+++++++++++358 ! ================================= global parameters for 'nml' 359 360 ! +++++++++++ 361 361 inew=0 362 362 363 363 if (inew.eq.1) then 364 c++++++++++++++++++++++++364 ! ++++++++++++++++++++++++ 365 365 366 366 call setvar(nml,vlvr) … … 369 369 call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd) 370 370 371 c---------------------------- retrieve ref. coords.372 c& transform acc. to opt. rmsd371 ! ---------------------------- retrieve ref. coords. 372 ! & transform acc. to opt. rmsd 373 373 do i=1,3 374 374 ii=ixrfpt(i,nml) … … 396 396 call bldmol(nml) ! finally build SMMP molecule 397 397 398 c++++++++++++++++398 ! ++++++++++++++++ 399 399 else ! old 400 c++++++++++++++++400 ! ++++++++++++++++ 401 401 402 402 call fnd3ba(nml,i1,i2,i3) ! three 1st bb atoms in SMMP (e.g. n,ca,c') … … 406 406 ixrfpt(3,nml)=i3 407 407 408 c-------------------------------- retrieve ref. coords.408 ! -------------------------------- retrieve ref. coords. 409 409 do i=1,3 410 410 ii=ixrfpt(i,nml) … … 416 416 else 417 417 write(*,'(3a)') ' pdbvars> missing PDB atom ',nmat(ii), 418 #' is ref. point for SMMP - cannot proceed !'418 & ' is ref. point for SMMP - cannot proceed !' 419 419 endif 420 420 enddo … … 426 426 call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd) 427 427 428 c++++++++++428 ! ++++++++++ 429 429 endif 430 c++++++++++430 ! ++++++++++ 431 431 432 432 write(*,*) ' ' … … 437 437 return 438 438 end 439 c***************************439 ! *************************** 440 440 subroutine atixpdb(nml) 441 441 442 c--------------------------------------------------------------------443 cPURPOSE: get ixatp - pointer of each SMMP atom to corresponding atom444 cof reference structure loaded in 'INCP.H'445 c(=0 if no corr. atom in ref. str.)446 c 447 cCALLS: toupst448 c--------------------------------------------------------------------442 ! -------------------------------------------------------------------- 443 ! PURPOSE: get ixatp - pointer of each SMMP atom to corresponding atom 444 ! of reference structure loaded in 'INCP.H' 445 ! (=0 if no corr. atom in ref. str.) 446 ! 447 ! CALLS: toupst 448 ! -------------------------------------------------------------------- 449 449 450 450 include 'INCL.H' … … 477 477 enddo 478 478 479 cwrite(*,'(8a)') ' pdbvars> ',atm,' not found in '480 c# ,chnp(nc),' ',rsidp(irs),' ',rsnmp(irs)479 ! write(*,'(8a)') ' pdbvars> ',atm,' not found in ' 480 ! # ,chnp(nc),' ',rsidp(irs),' ',rsnmp(irs) 481 481 482 482 endif … … 489 489 return 490 490 end 491 c**************************491 ! ************************** 492 492 subroutine getpar(nml) 493 493 … … 496 496 parameter (TOL = 1.d-12) 497 497 498 cObtain molecule-fixed system (J,K,L) for 1st 3 bb-atoms,499 c-> determine global parameters: shifts dX,dY,dZ500 c& angles alpha,beta,gamma [rad], put into 'gbpr'501 c502 cCALLS: none503 c 498 ! Obtain molecule-fixed system (J,K,L) for 1st 3 bb-atoms, 499 ! -> determine global parameters: shifts dX,dY,dZ 500 ! & angles alpha,beta,gamma [rad], put into 'gbpr' 501 ! 502 ! CALLS: none 503 ! 504 504 505 505 i1=ixrfpt(1,nml) ! from 'INCL.H' 506 506 i2=ixrfpt(2,nml) 507 507 i3=ixrfpt(3,nml) 508 c-------------------------------------- Shifts508 ! -------------------------------------- Shifts 509 509 gbpr(1,nml) = xat(i1) 510 510 gbpr(2,nml) = yat(i1) … … 514 514 gbpr(i,nml) = 0.d0 515 515 enddo 516 c--------------------------------- J516 ! --------------------------------- J 517 517 h1=xat(i2) 518 518 h2=yat(i2) … … 528 528 x2=x2/d 529 529 x3=x3/d 530 c--------------------------------- L530 ! --------------------------------- L 531 531 h1=xat(i3)-h1 532 532 h2=yat(i3)-h2 … … 543 543 z3=z3/d 544 544 545 c---------------------------------- K545 ! ---------------------------------- K 546 546 y1=z2*x3-z3*x2 547 547 y2=z3*x1-z1*x3 … … 550 550 if ( ( 1.d0 - abs(y3) ) .gt. TOL ) then ! ============ |beta| < PI/2 551 551 552 c----------------------------------------------- Y'552 ! ----------------------------------------------- Y' 553 553 d = sqrt( y1 * y1 + y2 * y2 ) 554 554 yp1= y1 / d
Note:
See TracChangeset
for help on using the changeset viewer.