[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,
|
---|
| 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 | ! **************************************************************
|
---|
[e40e335] | 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
|
---|
[cb47b9c] | 27 | integer argc, status, argv_length
|
---|
| 28 | character(len=255) :: argv
|
---|
[e40e335] | 29 |
|
---|
[bd2278d] | 30 | ! =================================================== Energy setup
|
---|
[e40e335] | 31 |
|
---|
[bd2278d] | 32 | ! Directory for SMMP libraries
|
---|
| 33 | ! Change the following directory path to where you want to put SMMP
|
---|
| 34 | ! libraries of residues.
|
---|
[e40e335] | 35 | libdir='./SMMP/'
|
---|
[cb47b9c] | 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")
|
---|
[e40e335] | 43 |
|
---|
[bd2278d] | 44 | ! The switch in the following line is now not used.
|
---|
[e40e335] | 45 | flex=.false. ! .true. for Flex / .false. for ECEPP
|
---|
| 46 |
|
---|
[bd2278d] | 47 | ! Choose energy type with the following switch instead ...
|
---|
[e40e335] | 48 | ientyp = 0
|
---|
[bd2278d] | 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 | !
|
---|
[e40e335] | 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 |
|
---|
[bd2278d] | 65 | ! ================================================= Structure setup
|
---|
[e40e335] | 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'
|
---|
[cb47b9c] | 73 | varfile='EXAMPLES/enkefa.ann'
|
---|
[e40e335] | 74 | ! varfile = ' '
|
---|
| 75 |
|
---|
| 76 | ntlml = 0
|
---|
| 77 | write (*,*) 'Solvent: ', itysol
|
---|
[bd2278d] | 78 | ! Initialize random number generator.
|
---|
[e40e335] | 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 |
|
---|
[bd2278d] | 89 | ! Decide if and when to use BGS, and initialize Lund data structures
|
---|
[e40e335] | 90 | bgsprob=0.75 ! Prob for BGS, given that it is possible
|
---|
[bd2278d] | 91 | ! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob
|
---|
| 92 | ! 2 => temperature dependent choice
|
---|
[e40e335] | 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 |
|
---|
[bd2278d] | 100 | ! ======================================== Add your task down here
|
---|
[e40e335] | 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)
|
---|
[cb47b9c] | 106 | call outvar(0, ' ')
|
---|
[bd2278d] | 107 | ! To do a canonical Monte Carlo simulation uncomment the lines below
|
---|
[e40e335] | 108 | ! nequi = 100
|
---|
| 109 | ! nsweep = 50000
|
---|
| 110 | ! nmes = 10
|
---|
| 111 | ! temp = 300.0
|
---|
| 112 | ! lrand = .true.
|
---|
[bd2278d] | 113 | ! Canonical Monte Carlo
|
---|
[e40e335] | 114 | ! call canon(nequi, nsweep, nmes, temp, lrand)
|
---|
| 115 |
|
---|
[bd2278d] | 116 | ! For simulated annealing uncomment the lines below
|
---|
[e40e335] | 117 | ! tmin = 200.0
|
---|
| 118 | ! tmax = 500.0
|
---|
| 119 | ! call anneal(nequi, nsweep, nmes, tmax, tmin, lrand);
|
---|
[bd2278d] | 120 | ! ======================================== End of main
|
---|
[e40e335] | 121 | end
|
---|