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

    r2ebb8b6 rbd2278d  
    1 c **************************************************************
    2 c
    3 c This file contains the subroutines:  anneal
    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 $Id: anneal.f 334 2007-08-07 09:23:59Z meinke $
    11 c **************************************************************
     1! **************************************************************
     2!
     3! This file contains the subroutines:  anneal
     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! $Id: anneal.f 334 2007-08-07 09:23:59Z meinke $
     11! **************************************************************
    1212
    1313      subroutine  anneal(nequi, nswp, nmes, tmax, tmin, lrand)
    1414
    15 C --------------------------------------------------------------
    16 C PURPOSE: SIMULATED ANNEALING SEARCH OF LOWEST-POTENTIAL-ENERGY
    17 C          CONFORMATIONS OF PROTEINS
    18 C
    19 C CALLS: addang,energy,metropolis,outvar,outpdb,rgyr,setvar,zimmer
    20 C
    21 C ---------------------------------------------------------------
     15! --------------------------------------------------------------
     16! PURPOSE: SIMULATED ANNEALING SEARCH OF LOWEST-POTENTIAL-ENERGY
     17!          CONFORMATIONS OF PROTEINS
     18!
     19! CALLS: addang,energy,metropolis,outvar,outpdb,rgyr,setvar,zimmer
     20!
     21! ---------------------------------------------------------------
    2222 
    2323      include 'INCL.H'
    2424
    25 cf2py intent(in) nequi
    26 cf2py intent(in) nswp
    27 cf2py intent(in) nmes
    28 cf2py intent(in) Tmax
    29 cf2py intent(in) Tmin
    30 cf2py logical optional, intent(in):: lrand = 1
     25!f2py intent(in) nequi
     26!f2py intent(in) nswp
     27!f2py intent(in) nmes
     28!f2py intent(in) Tmax
     29!f2py intent(in) Tmin
     30!f2py logical optional, intent(in):: lrand = 1
    3131
    32 c     external rand
     32!     external rand
    3333      external can_weight
    34 c      parameter(lrand=.true.)
    35 c      parameter(nequi=100, nswp=100000,nmes=1000)
    36 c      parameter(tmax=1000.0,tmin=100.0)
    37 C     lrand=.true.: creates random start configuration
     34!      parameter(lrand=.true.)
     35!      parameter(nequi=100, nswp=100000,nmes=1000)
     36!      parameter(tmax=1000.0,tmin=100.0)
     37!     lrand=.true.: creates random start configuration
    3838      logical lrand
    39 C     nequi: Number of sweeps for equilibrisation of system
     39!     nequi: Number of sweeps for equilibrisation of system
    4040      integer nequi
    41 C     nswp:  Number of sweeps for simulation run
     41!     nswp:  Number of sweeps for simulation run
    4242      integer nswp
    43 c     nmes:  Number of sweeps between measurments
     43!     nmes:  Number of sweeps between measurments
    4444      integer nmes
    45 C     tmax: Start temperature
     45!     tmax: Start temperature
    4646      double precision tmax
    47 C     tmin: Final temperature
     47!     tmin: Final temperature
    4848      double precision tmin
    4949     
    5050     
    5151!      common/bet/beta
    52 C
     52!
    5353      dimension vlvrm(mxvr)
    5454
    5555     
    5656 
    57 c     Define files for output:
     57!     Define files for output:
    5858      open(14,file='time.d')
    5959      write(14, *) '# $Id: anneal.f 334 2007-08-07 09:23:59Z meinke $'
     
    6464      db = exp(log(bmax/bmin)/nswp)
    6565
    66 c     nresi: Number of residues
    67 c FIXME: Should loop over all proteins
     66!     nresi: Number of residues
     67! FIXME: Should loop over all proteins
    6868      nresi=irsml2(ntlml)-irsml1(1)+1
    69 c _________________________________ random start
     69! _________________________________ random start
    7070      if(lrand) then
    7171       do i=1,nvr
     
    8080      write (*,'(a,e12.5,/)')  'energy of start configuration: ',eol
    8181
    82 C Write start configuration in pdb-format into file
     82! Write start configuration in pdb-format into file
    8383        call outpdb(0, "start.pdb")
    8484
    85 c =====================Equilibration by  Metropolis
     85! =====================Equilibration by  Metropolis
    8686      beta =  bmin
    8787      do nsw=1,nequi
     
    9090      write(*,*) 'Energy after  equilibration:',eol
    9191
    92 C======================Simulation by simulated annealing
     92!======================Simulation by simulated annealing
    9393      acz = 0.0d0
    9494      ymin = eol
     
    9696        beta = bmin*db**nsw
    9797        call metropolis(eol,acz,can_weight)
    98 c Store lowest-energy conformation
     98! Store lowest-energy conformation
    9999        if(eol.lt.ymin) then
    100100         ymin = eol
    101101         nemin = nsw
    102102         call outvar(0,'global.var')
    103 C     Output of lowest-energy conformation as pdb-file
     103!     Output of lowest-energy conformation as pdb-file
    104104         call outpdb(0,"global.pdb")
    105105         do j=1,nvr
     
    108108         end do
    109109        end if
    110 c
     110!
    111111        if(mod(nsw,nmes).eq.0) then
    112 C Measure radius of gyration and end-to-end distance
     112! Measure radius of gyration and end-to-end distance
    113113         call rgyr(1, rgy, ee)
    114 C Determine Zimmerman code of actual conformation
     114! Determine Zimmerman code of actual conformation
    115115         call zimmer(nresi)
    116 C Write down information on actual conformation
     116! Write down information on actual conformation
    117117         temp =  1.0d0/beta/0.00198773
    118118         write(14,'(i6,13f12.3,1x,a)') 
     
    121121     &   eyhb, eyvw, eyel, eyvr, zimm(1:nresi)
    122122        end if
    123 C
     123!
    124124      end do
    125125
     
    127127      write(*,*) 'acceptance rate:',acz
    128128      write(*,*)
    129 c ------------ Output Dihedreals of final configuration
     129! ------------ Output Dihedreals of final configuration
    130130      write(*,*) 'last energy',eol
    131131      call outvar(0,' ')
    132 C     Output final conformation as pdb-file
     132!     Output final conformation as pdb-file
    133133      call outpdb(0,"final.pdb")
    134134      write(*,*)
    135135
    136 c ------------ Output Dihedreals of conformation with lowest energy
     136! ------------ Output Dihedreals of conformation with lowest energy
    137137      write(*,*) 'lowest energy ever found:',nemin,ymin
    138138      close(14)
    139 c =====================
     139! =====================
    140140
    141141
Note: See TracChangeset for help on using the changeset viewer.