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 | include 'INCL.H'
|
---|
22 | include 'INCP.H'
|
---|
23 | double precision eps, temp, e, energy
|
---|
24 |
|
---|
25 | integer maxloglevel, logfileunit, iabin, imin, maxit, nequi
|
---|
26 | integer nsweep, nmes, ncalls, nacalls
|
---|
27 |
|
---|
28 | common/updstats/ncalls(5),nacalls(5)
|
---|
29 | character*80 libdir, seqfile, varfile
|
---|
30 | character grpn*4,grpc*4
|
---|
31 | logical lrand,bgsposs
|
---|
32 | integer argc, status, argv_length
|
---|
33 | character(len=255) :: argv
|
---|
34 |
|
---|
35 | ! =================================================== Energy setup
|
---|
36 |
|
---|
37 | ! Directory for SMMP libraries
|
---|
38 | ! Change the following directory path to where you want to put SMMP
|
---|
39 | ! libraries of residues.
|
---|
40 | libdir='./SMMP/'
|
---|
41 |
|
---|
42 | ! Set the maximum log level. The larger the number the more detailed
|
---|
43 | ! the log.
|
---|
44 | MAXLOGLEVEL = 1
|
---|
45 | ! File unit to use for the log file.
|
---|
46 | LOGFILEUNIT = 27
|
---|
47 | open(LOGFILEUNIT, file="smmp.log")
|
---|
48 |
|
---|
49 | ! The switch in the following line is now not used.
|
---|
50 | flex=.false. ! .true. for Flex / .false. for ECEPP
|
---|
51 |
|
---|
52 | ! Choose energy type with the following switch instead ...
|
---|
53 | ientyp = 0
|
---|
54 | ! 0 => ECEPP2 or ECEPP3 depending on the value of sh2
|
---|
55 | ! 1 => FLEX
|
---|
56 | ! 2 => Lund force field
|
---|
57 | ! 3 => ECEPP with Abagyan corrections
|
---|
58 | !
|
---|
59 |
|
---|
60 | sh2=.false. ! .true. for ECEPP/2; .false. for ECEPP3
|
---|
61 | epsd=.false. ! .true. for distance-dependent dielectric
|
---|
62 | ! permittivity
|
---|
63 |
|
---|
64 | itysol= 0 ! 0: vacuum
|
---|
65 | ! >0: numerical solvent energy
|
---|
66 | ! <0: analytical solvent energy & gradients
|
---|
67 |
|
---|
68 | call init_energy(libdir)
|
---|
69 |
|
---|
70 | ! ================================================= Structure setup
|
---|
71 |
|
---|
72 | grpn = 'nh2' ! N-terminal group
|
---|
73 | grpc = 'cooh'! C-terminal group
|
---|
74 |
|
---|
75 | iabin = 1 ! =0: read from PDB-file
|
---|
76 | ! =1: ab Initio from sequence (& variables)
|
---|
77 | seqfile='polyq.seq'
|
---|
78 | ! seqfile='polyA.pdb'
|
---|
79 | varfile='polyq.var'
|
---|
80 | varfile = ' '
|
---|
81 |
|
---|
82 | ntlml = 0
|
---|
83 | write (logString, *) 'Solvent: ', itysol
|
---|
84 | ! Initialize random number generator.
|
---|
85 | call sgrnd(31433)
|
---|
86 |
|
---|
87 | if (itysol.eq.0.and.ientyp.eq.3) then
|
---|
88 | print *,'Can not use Abagyan entropic corrections without '
|
---|
89 | print *,'solvent term. '
|
---|
90 | stop
|
---|
91 | endif
|
---|
92 |
|
---|
93 | call init_molecule(iabin,grpn,grpc,seqfile,varfile)
|
---|
94 |
|
---|
95 | ! Decide if and when to use BGS, and initialize Lund data structures
|
---|
96 | bgsprob=0.75 ! Prob for BGS, given that it is possible
|
---|
97 | ! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob
|
---|
98 | ! 2 => temperature dependent choice
|
---|
99 | upchswitch=1
|
---|
100 | rndord=.true.
|
---|
101 | call init_lund
|
---|
102 | if (ientyp.eq.2) call init_lundff
|
---|
103 | if (ientyp.eq.3) call init_abgn
|
---|
104 |
|
---|
105 |
|
---|
106 | ! ======================================== Add your task down here
|
---|
107 |
|
---|
108 | imin = 1 ! Quasi-Newton
|
---|
109 | maxit = 15000 ! maximum number of iterations in minimization
|
---|
110 | eps = 1.0d-7 ! requested precision
|
---|
111 | ! call minim(imin, maxit, eps)
|
---|
112 | ! call outvar(0, ' ')
|
---|
113 | ! To do a canonical Monte Carlo simulation uncomment the lines below
|
---|
114 | nequi = 100
|
---|
115 | nsweep = 50000
|
---|
116 | nmes = 10
|
---|
117 | temp = 300.0
|
---|
118 | lrand = .true.
|
---|
119 | E = energy()
|
---|
120 | write (logString, *) E, eyel,eyvw,eyhb,eyvr
|
---|
121 | call outpdb(1, "polyA.pdb")
|
---|
122 | ! Canonical Monte Carlo
|
---|
123 | call canon(nequi, nsweep, nmes, temp, lrand)
|
---|
124 |
|
---|
125 | ! For simulated annealing uncomment the lines below
|
---|
126 | ! tmin = 200.0
|
---|
127 | ! tmax = 500.0
|
---|
128 | ! call anneal(nequi, nsweep, nmes, tmax, tmin, lrand);
|
---|
129 | ! ======================================== End of main
|
---|
130 | end
|
---|