source: main.f

Last change on this file was 3fbbfbb, checked in by Jan Meinke <j.meinke@…>, 14 years ago

Move to doxygen comments and smmp_p.

Doxygen comments in Fortran are !> ... !! ... !<. I'm planning move the API documentation from the
lyx file into the code. This should make it easier to get documentation for all the common block
variables as well.

Use import smmp_p to indicate the parallel version of the Python bindings.

  • Property mode set to 100644
File size: 4.6 KB
RevLine 
[bd2278d]1! **************************************************************
2! This file contains the: main (SINGLE PROCESSOR JOBS ONLY,
3! FOR PARALLEL JOBS USE pmain)
4!
5! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,
[32289cd]6! Shura Hayryan, Chin-Ku
[bd2278d]7! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
8! Jan H. Meinke, Sandipan Mohanty
9!
10! CALLS: init_energy,init_molecule
11! CALLS TASK SUBROUTINE: anneal,canon,elp,minim,mulcan_par,
12! mulcan_sim,partem_s, or regul
13! CAN ALSO CALL MEASUREMENT ROUTINES: cnteny,contacts,helix,hbond,
14! outpdb,outvar,rgyr,
15! rmsinit and rsmdfun,zimmer
16! $Id: main.f 334 2007-08-07 09:23:59Z meinke $
17! **************************************************************
[32289cd]18
[e40e335]19 program main
20
[3fbbfbb]21 use timer
[e40e335]22 include 'INCL.H'
23 include 'INCP.H'
[3fbbfbb]24 double precision eps, temp, e, energy, enyshe_simple
[32289cd]25
[3fbbfbb]26 integer iabin, imin, maxit, nequi
27 integer nsweep, nmes, ncalls, nacalls, i
[32289cd]28
[e40e335]29 common/updstats/ncalls(5),nacalls(5)
30 character*80 libdir, seqfile, varfile
31 character grpn*4,grpc*4
32 logical lrand,bgsposs
[cb47b9c]33 integer argc, status, argv_length
34 character(len=255) :: argv
[e40e335]35
[bd2278d]36! =================================================== Energy setup
[e40e335]37
[bd2278d]38! Directory for SMMP libraries
39! Change the following directory path to where you want to put SMMP
[32289cd]40! libraries of residues.
[e40e335]41 libdir='./SMMP/'
[32289cd]42
[cb47b9c]43! Set the maximum log level. The larger the number the more detailed
44! the log.
[3fbbfbb]45 MAXLOGLEVEL = 100
[cb47b9c]46! File unit to use for the log file.
47 LOGFILEUNIT = 27
48 open(LOGFILEUNIT, file="smmp.log")
[e40e335]49
[bd2278d]50! The switch in the following line is now not used.
[e40e335]51 flex=.false. ! .true. for Flex / .false. for ECEPP
52
[bd2278d]53! Choose energy type with the following switch instead ...
[e40e335]54 ientyp = 0
[bd2278d]55! 0 => ECEPP2 or ECEPP3 depending on the value of sh2
[32289cd]56! 1 => FLEX
[bd2278d]57! 2 => Lund force field
58! 3 => ECEPP with Abagyan corrections
59!
[e40e335]60
61 sh2=.false. ! .true. for ECEPP/2; .false. for ECEPP3
62 epsd=.false. ! .true. for distance-dependent dielectric
63 ! permittivity
64
65 itysol= 0 ! 0: vacuum
66 ! >0: numerical solvent energy
67 ! <0: analytical solvent energy & gradients
68
69 call init_energy(libdir)
70
[bd2278d]71! ================================================= Structure setup
[e40e335]72
73 grpn = 'nh2' ! N-terminal group
74 grpc = 'cooh'! C-terminal group
75
76 iabin = 1 ! =0: read from PDB-file
77 ! =1: ab Initio from sequence (& variables)
[32289cd]78 seqfile='polyq.seq'
79! seqfile='polyA.pdb'
80 varfile='polyq.var'
81 varfile = ' '
82
[e40e335]83 ntlml = 0
[38d77eb]84 write (logString, *) 'Solvent: ', itysol
[bd2278d]85! Initialize random number generator.
[e40e335]86 call sgrnd(31433)
[32289cd]87
[e40e335]88 if (itysol.eq.0.and.ientyp.eq.3) then
89 print *,'Can not use Abagyan entropic corrections without '
90 print *,'solvent term. '
91 stop
92 endif
93
94 call init_molecule(iabin,grpn,grpc,seqfile,varfile)
95
[32289cd]96! Decide if and when to use BGS, and initialize Lund data structures
[e40e335]97 bgsprob=0.75 ! Prob for BGS, given that it is possible
[32289cd]98! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob
99! 2 => temperature dependent choice
[e40e335]100 upchswitch=1
101 rndord=.true.
102 call init_lund
103 if (ientyp.eq.2) call init_lundff
104 if (ientyp.eq.3) call init_abgn
[32289cd]105
[e40e335]106
[bd2278d]107! ======================================== Add your task down here
[e40e335]108
109 imin = 1 ! Quasi-Newton
110 maxit = 15000 ! maximum number of iterations in minimization
111 eps = 1.0d-7 ! requested precision
[32289cd]112! call minim(imin, maxit, eps)
113! call outvar(0, ' ')
[bd2278d]114! To do a canonical Monte Carlo simulation uncomment the lines below
[3fbbfbb]115 nequi = 100
116 nsweep = 500
117 nmes = 10
118 temp = 300.0
119 lrand = .true.
120 E = energy()
121 write (logString, *) E, eyel,eyvw,eyhb,eyvr
122 call outpdb(1, "polyrQ.pdb")
[bd2278d]123! Canonical Monte Carlo
[3fbbfbb]124 call init_timer()
125 call start_timer(1)
126 call canon(nequi, nsweep, nmes, temp, lrand)
127 call stop_timer(1)
128
129 E = 0
130! call start_timer(1)
131! do i =1, nsweep
132! E = E + enyshe_simple()
133! end do
134! call stop_timer(1)
135 call evaluate(1)
136 print *,timingData(1)%average, "s.", E
[bd2278d]137! For simulated annealing uncomment the lines below
[e40e335]138! tmin = 200.0
139! tmax = 500.0
140! call anneal(nequi, nsweep, nmes, tmax, tmin, lrand);
[32289cd]141! ======================================== End of main
[e40e335]142 end
Note: See TracBrowser for help on using the repository browser.