Changeset bd2278d for pdbread.f


Ignore:
Timestamp:
09/05/08 11:49:42 (16 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
fafe4d6
Parents:
2ebb8b6
Message:

Reformatting comments and continuation marks.

Fortran 90 and higher use ! to mark comments no matter where they are in the
code. The only valid continuation marker is &.
I also added the SMMP.kdevelop.filelist to the repository to make it easier
to use kdevelop.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@12 26dc1dd8-5c4e-0410-9ffe-d298b4865968

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pdbread.f

    r2ebb8b6 rbd2278d  
    1 c **************************************************************
    2 c
    3 c This file contains the subroutines: pdbread,pdbvars,atixpdb,getpar
    4 c
    5 c Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
    6 c                      Shura Hayryan, Chin-Ku
    7 c Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
    8 c                      Jan H. Meinke, Sandipan Mohanty
    9 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! **************************************************************
    1111
    1212      subroutine pdbread(pdbfil,ier)
    1313
    14 c ....................................................
    15 c PURPOSE: read protein atom coordinates from 'pdbfil'
    16 c          (no Hydrogens, only ATOM records)
    17 c
    18 c RETURNS: 0 = no errors / 1 = error
    19 c
    20 c CALLS: iopfil,iendst
    21 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! ......................................................
    2222
    2323      implicit real*8 (a-h,o-z)
     
    2626      include 'INCP.H'
    2727
    28 c -------------------------- input
     28! -------------------------- input
    2929      character*(*) pdbfil
    30 c -------------------------- local
     30! -------------------------- local
    3131      dimension cor(3)
    3232      character atm*4,rsn*3,rsno*3,chn,chno,
    33      #          rsid*5,rsido*5,line*132
     33     &          rsid*5,rsido*5,line*132
    3434
    3535      natp=0
     
    4848      else
    4949        write (*,'(a)')
    50      #    ' pdbread> empty file name to read pdb-structure'
     50     &    ' pdbread> empty file name to read pdb-structure'
    5151
    5252        return
     
    5757      if (io.le.0) then
    5858        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))
    6161
    6262        return
     
    7070      if ( line(17:17).ne.' ' )  then
    7171        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))
    7575
    7676        close(lunpdb)
     
    8686      if ((natp+1).gt.MXATP) then
    8787        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))
    9090
    9191        close(lunpdb)
     
    9797        if ((nchp+1).gt.MXCHP) then
    9898          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))
    101101
    102102          close(lunpdb)
     
    106106        if ((nrsp+1).gt.MXRSP) then
    107107          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))
    110110
    111111          close(lunpdb)
     
    141141        if ((nrsp+1).gt.MXRSP) then
    142142          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))
    145145
    146146          close(lunpdb)
     
    172172
    173173    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))
    177177
    178178      close(lunpdb)
     
    195195
    196196        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))
    199199
    200200      endif
     
    205205
    206206      end
    207 c **************************************************************
     207! **************************************************************
    208208
    209209      subroutine pdbvars()
    210210
    211 c --------------------------------------------------------------------
    212 c PURPOSE: sequence,indices for selected atoms (data in INCP.H)
    213 c          & torsions from PDB to be used to build SMMP structure
    214 c
    215 c          ixatp(i,)
    216 c          = indices for SMMP atoms pointing to PDB atoms
    217 c            (=0, if atom not selected)
    218 c
    219 c --------------------------------- ref. point & axes
    220 c         ixrfpt(3,),rfpt(3,),xrfax(3,),yrfax(3,),zrfax(3,)
    221 c
    222 c CALLS:  tolost,getmol,bldmol,addend,atixpdb,setmvs,mklist,
    223 c         dihedr,fnd3ba,setsys,getpar,setvar,rmsdopt
    224 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! --------------------------------------------------------------------
    225225
    226226      include 'INCL.H'
     
    236236      do nc=1,nchp  ! PDB chains
    237237
    238 c =============================== SMMP molecule
     238! =============================== SMMP molecule
    239239        nml=nml+1
    240240        if (nml.gt.mxml) then
    241241          write(*,'(a,i4,2a)')' pdbvars> NUMBER of chains > '
    242      #                          ,mxml,' in ',' ?'
     242     &                          ,mxml,' in ',' ?'
    243243          stop
    244244        endif
    245245        ntlml=nml
    246 c ----------------------------- 'nmml' = ChainID
     246! ----------------------------- 'nmml' = ChainID
    247247        nmml(nml)=chnp(nc)
    248248
    249 c ======================================== get sequence
     249! ======================================== get sequence
    250250
    251251        irb=nrs+1
    252252        ire=nrs+nchrsp(nc)
    253 c ----------------------------- # of 1st & last residue
     253! ----------------------------- # of 1st & last residue
    254254        irsml1(nml)=irb
    255255        irsml2(nml)=ire
     
    261261          if (nrs.gt.mxrs) then
    262262            write(*,'(a,i4,2a)') ' pdbvars> NUMBER of residues > '
    263      #                       ,mxrs,' in ',' ?'
     263     &                       ,mxrs,' in ',' ?'
    264264            stop
    265265          endif
     
    271271
    272272          if (.not.flex.and.irs.eq.irb.and.seq(nrs)(1:3).eq.'pro')
    273      #      seq(nrs)='pron'  ! only ECEPP/3
     273     &      seq(nrs)='pron'  ! only ECEPP/3
    274274
    275275        enddo ! residues
    276276
    277 c ======================== get initial coords. for molecule 'nml'
    278 c                          with library values for deg. of freedom
     277! ======================== get initial coords. for molecule 'nml'
     278!                          with library values for deg. of freedom
    279279
    280280        call getmol(nml)   ! assemble res. data from libraries
     
    289289        call atixpdb(nml)  ! get 'ixatp'
    290290
    291 c -------------------------- 'load' SMMP variable information
     291! -------------------------- 'load' SMMP variable information
    292292        call setmvs(nml)   ! moving sets
    293293        call mklist(nml)   ! interaction lists
    294294
    295 c ================================= get variables for 'nml'
     295! ================================= get variables for 'nml'
    296296
    297297        ii=ivrml1(nml)
     
    356356        nvr = ivrml1(ntlml)+nvrml(ntlml)-1
    357357
    358 c ================================= global parameters for 'nml'
    359 
    360 c +++++++++++
     358! ================================= global parameters for 'nml'
     359
     360! +++++++++++
    361361       inew=0
    362362
    363363       if (inew.eq.1) then
    364 c ++++++++++++++++++++++++
     364! ++++++++++++++++++++++++
    365365
    366366        call setvar(nml,vlvr)
     
    369369        call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
    370370
    371 c ---------------------------- retrieve ref. coords.
    372 c                     & transform acc. to opt. rmsd
     371! ---------------------------- retrieve ref. coords.
     372!                     & transform acc. to opt. rmsd
    373373        do i=1,3
    374374          ii=ixrfpt(i,nml)
     
    396396        call bldmol(nml)  ! finally build SMMP molecule
    397397
    398 c ++++++++++++++++
     398! ++++++++++++++++
    399399       else  ! old
    400 c ++++++++++++++++
     400! ++++++++++++++++
    401401
    402402        call fnd3ba(nml,i1,i2,i3)  ! three 1st bb atoms in SMMP (e.g. n,ca,c')
     
    406406        ixrfpt(3,nml)=i3
    407407
    408 c -------------------------------- retrieve ref. coords.
     408! -------------------------------- retrieve ref. coords.
    409409        do i=1,3
    410410          ii=ixrfpt(i,nml)
     
    416416          else
    417417            write(*,'(3a)') ' pdbvars> missing PDB atom ',nmat(ii),
    418      #       ' is ref. point for SMMP - cannot proceed !'
     418     &       ' is ref. point for SMMP - cannot proceed !'
    419419          endif
    420420        enddo
     
    426426        call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
    427427
    428 c ++++++++++
     428! ++++++++++
    429429       endif
    430 c ++++++++++
     430! ++++++++++
    431431
    432432       write(*,*) ' '
     
    437437      return
    438438      end
    439 c ***************************
     439! ***************************
    440440      subroutine atixpdb(nml)
    441441
    442 c --------------------------------------------------------------------
    443 c PURPOSE: get ixatp - pointer of each SMMP atom to corresponding atom
    444 c                      of reference structure loaded in 'INCP.H'
    445 c                      (=0 if no corr. atom in ref. str.)
    446 c
    447 c CALLS:   toupst
    448 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! --------------------------------------------------------------------
    449449
    450450      include 'INCL.H'
     
    477477            enddo
    478478               
    479 c            write(*,'(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)
    481481
    482482          endif
     
    489489      return
    490490      end
    491 c **************************
     491! **************************
    492492      subroutine getpar(nml)
    493493
     
    496496      parameter (TOL = 1.d-12)
    497497
    498 c Obtain molecule-fixed system (J,K,L) for 1st 3 bb-atoms,
    499 c -> determine global parameters: shifts dX,dY,dZ
    500 c & angles alpha,beta,gamma [rad], put into 'gbpr'
    501 c
    502 c CALLS: none
    503 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!
    504504
    505505      i1=ixrfpt(1,nml)  ! from 'INCL.H'
    506506      i2=ixrfpt(2,nml)
    507507      i3=ixrfpt(3,nml)
    508 c -------------------------------------- Shifts
     508! -------------------------------------- Shifts
    509509      gbpr(1,nml) = xat(i1)
    510510      gbpr(2,nml) = yat(i1)
     
    514514        gbpr(i,nml) = 0.d0
    515515      enddo
    516 c --------------------------------- J
     516! --------------------------------- J
    517517      h1=xat(i2)
    518518      h2=yat(i2)
     
    528528      x2=x2/d
    529529      x3=x3/d
    530 c --------------------------------- L
     530! --------------------------------- L
    531531      h1=xat(i3)-h1
    532532      h2=yat(i3)-h2
     
    543543      z3=z3/d
    544544
    545 c ---------------------------------- K
     545! ---------------------------------- K
    546546      y1=z2*x3-z3*x2
    547547      y2=z3*x1-z1*x3
     
    550550      if ( ( 1.d0 - abs(y3) ) .gt. TOL )  then       ! ============ |beta| < PI/2
    551551
    552 c ----------------------------------------------- Y'
     552! ----------------------------------------------- Y'
    553553        d = sqrt( y1 * y1 + y2 * y2 )
    554554        yp1= y1 / d
Note: See TracChangeset for help on using the changeset viewer.