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
Line 
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,
6! Shura Hayryan, Chin-Ku
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! **************************************************************
18
19 program main
20
21 use timer
22 include 'INCL.H'
23 include 'INCP.H'
24 double precision eps, temp, e, energy, enyshe_simple
25
26 integer iabin, imin, maxit, nequi
27 integer nsweep, nmes, ncalls, nacalls, i
28
29 common/updstats/ncalls(5),nacalls(5)
30 character*80 libdir, seqfile, varfile
31 character grpn*4,grpc*4
32 logical lrand,bgsposs
33 integer argc, status, argv_length
34 character(len=255) :: argv
35
36! =================================================== Energy setup
37
38! Directory for SMMP libraries
39! Change the following directory path to where you want to put SMMP
40! libraries of residues.
41 libdir='./SMMP/'
42
43! Set the maximum log level. The larger the number the more detailed
44! the log.
45 MAXLOGLEVEL = 100
46! File unit to use for the log file.
47 LOGFILEUNIT = 27
48 open(LOGFILEUNIT, file="smmp.log")
49
50! The switch in the following line is now not used.
51 flex=.false. ! .true. for Flex / .false. for ECEPP
52
53! Choose energy type with the following switch instead ...
54 ientyp = 0
55! 0 => ECEPP2 or ECEPP3 depending on the value of sh2
56! 1 => FLEX
57! 2 => Lund force field
58! 3 => ECEPP with Abagyan corrections
59!
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
71! ================================================= Structure setup
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)
78 seqfile='polyq.seq'
79! seqfile='polyA.pdb'
80 varfile='polyq.var'
81 varfile = ' '
82
83 ntlml = 0
84 write (logString, *) 'Solvent: ', itysol
85! Initialize random number generator.
86 call sgrnd(31433)
87
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
96! Decide if and when to use BGS, and initialize Lund data structures
97 bgsprob=0.75 ! Prob for BGS, given that it is possible
98! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob
99! 2 => temperature dependent choice
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
105
106
107! ======================================== Add your task down here
108
109 imin = 1 ! Quasi-Newton
110 maxit = 15000 ! maximum number of iterations in minimization
111 eps = 1.0d-7 ! requested precision
112! call minim(imin, maxit, eps)
113! call outvar(0, ' ')
114! To do a canonical Monte Carlo simulation uncomment the lines below
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")
123! Canonical Monte Carlo
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
137! For simulated annealing uncomment the lines below
138! tmin = 200.0
139! tmax = 500.0
140! call anneal(nequi, nsweep, nmes, tmax, tmin, lrand);
141! ======================================== End of main
142 end
Note: See TracBrowser for help on using the repository browser.