Changeset bd2278d for bldmol.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
  • bldmol.f

    r2ebb8b6 rbd2278d  
    1 c **************************************************************
    2 c
    3 c This file contains the subroutines:  bldmol, fnd3ba,eyring,
    4 c                                      setsys,setgbl
    5 c
    6 c Copyright 2003-2005  Frank Eisenmenger, U.H.E. Hansmann,
    7 c                      Shura Hayryan, Chin-Ku
    8 c Copyright 2007       Frank Eisenmenger, U.H.E. Hansmann,
    9 c                      Jan H. Meinke, Sandipan Mohanty
    10 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! **************************************************************
    1212
    1313      subroutine bldmol(nml)
    1414
    15 c .................................................
    16 c PURPOSE: calculate coordinates for molecule 'nml'
    17 c
    18 c OUTPUT:  xat,yat,zat,xbaat,ybaat,zbaat,xtoat,ytoat,
    19 c          ztoat (via 'eyring')
    20 c
    21 c          1st 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 to
    25 c            global angles 'gbpr(4-5,nml)'
    26 c
    27 c CALLS: eyring, fnd3ba,setgbl,setsys
    28 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! .................................................
    2929
    3030      include 'INCL.H'
     
    3434
    3535      call fnd3ba(nml,i1,i2,i3)
    36 c ------------------------------ first 3 bb atoms of 'nml'
     36! ------------------------------ first 3 bb atoms of 'nml'
    3737      ixrfpt(1,nml)=i1
    3838      ixrfpt(2,nml)=i2
    3939      ixrfpt(3,nml)=i3
    4040
    41 c ------------------------------ position of 1st bb atom
     41! ------------------------------ position of 1st bb atom
    4242      xat(i1) = gbpr(1,nml)
    4343      yat(i1) = gbpr(2,nml)
     
    8686      return
    8787      end
    88 c ***********************************
     88! ***********************************
    8989      subroutine fnd3ba(nml,i1,i2,i3)
    9090 
    91 c .................................................
    92 c PURPOSE: return indices 'i1,i2,i3' of
    93 c          first 3 backbone atoms in molecule 'nml'
    94 c
    95 c CALLS:   fndbrn
    96 c .................................................
     91! .................................................
     92! PURPOSE: return indices 'i1,i2,i3' of
     93!          first 3 backbone atoms in molecule 'nml'
     94!
     95! CALLS:   fndbrn
     96! .................................................
    9797 
    9898      include 'INCL.H'
     
    104104      irs=irsml1(nml)
    105105
    106 c --------------------------- 1st bb atom
     106! --------------------------- 1st bb atom
    107107      i1=iatrs1(irs)
    108108
    109109      call fndbrn(nml,irs,i1,i,ix,i2,bb)
    110110
    111 c --------------------------- 2nd bb atom
     111! --------------------------- 2nd bb atom
    112112      i2=i+1
    113113
    114 c ------------------------ check for ring
     114! ------------------------ check for ring
    115115
    116116      ibd(1)=iowat(i1)
     
    126126          if (ix.ne.0) then
    127127            write (*,'(2a,i3)')
    128      #         ' fnd3ba> Can handle only simple ring at 1st',
    129      #         ' atom of molecule #',nml
     128     &         ' fnd3ba> Can handle only simple ring at 1st',
     129     &         ' atom of molecule #',nml
    130130            stop
    131131          endif
     
    135135      enddo
    136136
    137 c --------------------------- 3rd bb atom
     137! --------------------------- 3rd bb atom
    138138
    139139      ix=ixatrs(irs)
     
    158158
    159159      write (*,'(4a,i4,a,i4)')
    160      #   ' fnd3ba> Cannot find backbone atom following ',nmat(i2),
    161      #   ' of residue ',seq(irs),irs,' in molecule #',nml
     160     &   ' fnd3ba> Cannot find backbone atom following ',nmat(i2),
     161     &   ' of residue ',seq(irs),irs,' in molecule #',nml
    162162      stop
    163163
    164164      end
    165 c ***************************
     165! ***************************
    166166      subroutine eyring(i,ia)
    167167
    168 c .........................................................
    169 c PURPOSE:  calculate cartesian coordinates of atom 'i'
    170 c           using EYRING's algorithm
    171 c INPUT:    i - index of atom to be constructed
    172 c               for 'i': blat,csbaat,snbaat,cstoat,sntoat
    173 c           ia- index of atom from which 'i' is to be built
    174 c OUTPUT:   for 'i': xat,yat,zat,xbaat,ybaat,zbaat,xtoat,ytoat,ztoat
    175 c
    176 c CALLS: none
    177 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! .........................................................
    178178
    179179      include 'INCL.H'
     
    228228      return
    229229      end
    230 c ***********************************************************
     230! ***********************************************************
    231231      subroutine setsys(i1,i2,i3, x1,x2,x3,y1,y2,y3,z1,z2,z3)
    232232
    233 c ..........................................................
    234 c  PURPOSE:  calculate axes X,Y,Z of right-handed orthogonal
    235 c            system given by three atom positions R1, R2, R3
    236 c
    237 c            X = (R2-R1)/ |( )|
    238 c            Z = {X x (R2-R3)} / |{ }|
    239 c            Y = Z x X
    240 c
    241 c  INPUT:    i1, i2, i3 - indices of three atoms
    242 c  OUTPUT:   x1,x2,x3 |
    243 c            y1,y2,y3 | -direction cosines of X,Y,Z
    244 c            z1,z2,z3 |
    245 c
    246 c  CALLS:    none
    247 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! ...................................................
    248248
    249249
     
    283283      end
    284284
    285 c *****************************************
     285! *****************************************
    286286      subroutine setgbl(nml,i1,i2,i3,xg,zg)
    287287
    288 c ...................................................
    289 c
    290 c PURPOSE: 1. Obtain global axes (J,K,L)
    291 c             related to x(1 0 0),y(0 1 0),z(0 0 1)
    292 c             by 3 rotations (gbl. parameters #4-#6):
    293 c
    294 c             - round z by angle alpha
    295 c             - round x' by a. beta
    296 c             - round y" by a. gamma
    297 c
    298 c          2. Return x-axis (xg) & z-axis (zg)
    299 c             for atom #1 in order to orientate J
    300 c             along the bond from backbone atom #1
    301 c             to bb.a. #2 and L according to the
    302 c             cross product [ bond(#1->#2) x
    303 c             bond(#2->#3) ] when using Eyring's
    304 c             algorithm to get the coordinates
    305 c
    306 c CALLS:   none
    307 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! ..............................................
    308308
    309309      include 'INCL.H'
     
    319319      sg = sin(gbpr(6,nml))
    320320
    321 c ----------------------------- J
     321! ----------------------------- J
    322322      x1 =  ca*cg - sa*sb*sg
    323323      x2 =  sa*cg + ca*sb*sg
     
    328328      ag(2,1) = x2/d
    329329      ag(3,1) = x3/d
    330 c ----------------------------- K
     330! ----------------------------- K
    331331      y1 = -sa*cb
    332332      y2 =  ca*cb
     
    337337      ag(2,2) = y2/d
    338338      ag(3,2) = y3/d
    339 c ----------------------------- L
     339! ----------------------------- L
    340340      z1 =  ca*sg + sa*sb*cg
    341341      z2 =  sa*sg - ca*sb*cg
     
    347347      ag(3,3) = z3/d
    348348
    349 c ------------------------------------ X1
     349! ------------------------------------ X1
    350350      ct2 = cstoat(i2)
    351351      st2 = sntoat(i2)
     
    360360      x2 = x2/dx
    361361      x3 = x3/dx
    362 c ------------------------------------- Z1
     362! ------------------------------------- Z1
    363363      st3 = sntoat(i3)
    364364      ct3 = cstoat(i3)
     
    372372      z2 = z2/dz
    373373      z3 = z3/dz
    374 c ------------------------------------- Y1
     374! ------------------------------------- Y1
    375375      y1 = z2 * x3 - z3 * x2
    376376      y3 = z1 * x2 - z2 * x1  ! do not need y2
    377377
    378 c ----------------------------- into global system
     378! ----------------------------- into global system
    379379
    380380      xg(1) = ag(1,1)*x1 + ag(1,2)*y1 + ag(1,3)*z1
Note: See TracChangeset for help on using the changeset viewer.