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