[e40e335] | 1 | !**************************************************************
|
---|
| 2 | ! Parallel tempering of Met-Enaphalin on a single CPU
|
---|
| 3 | !
|
---|
| 4 | !
|
---|
| 5 | ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,
|
---|
| 6 | ! Shura Hayryan, Chin-Ku Hu
|
---|
| 7 | ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
|
---|
| 8 | ! Jan H. Meinke, Sandipan Mohanty
|
---|
| 9 | !
|
---|
| 10 | ! **************************************************************
|
---|
| 11 |
|
---|
| 12 | program main
|
---|
| 13 |
|
---|
| 14 | include '../INCL.H'
|
---|
| 15 | include '../INCP.H'
|
---|
| 16 | common/updstats/ncalls(5),nacalls(5)
|
---|
| 17 | character*80 libdir, seqfile, varfile
|
---|
| 18 | character grpn*4,grpc*4
|
---|
| 19 | logical bgsposs,newsta
|
---|
| 20 | integer switch
|
---|
| 21 |
|
---|
[bd2278d] | 22 | ! =================================================== Energy setup
|
---|
[e40e335] | 23 |
|
---|
[bd2278d] | 24 | ! Directory for SMMP libraries
|
---|
| 25 | ! Change the following directory path to where you want to put SMMP
|
---|
| 26 | ! libraries of residues.
|
---|
[e40e335] | 27 | libdir='../SMMP/'
|
---|
| 28 |
|
---|
[bd2278d] | 29 | ! The switch in the following line is now not used.
|
---|
[e40e335] | 30 | flex=.false. ! .true. for Flex / .false. for ECEPP
|
---|
| 31 |
|
---|
[bd2278d] | 32 | ! Choose energy type with the following switch instead ...
|
---|
[e40e335] | 33 | ientyp = 0
|
---|
[bd2278d] | 34 | ! 0 => ECEPP2 or ECEPP3 depending on the value of sh2
|
---|
| 35 | ! 1 => FLEX
|
---|
| 36 | ! 2 => Lund force field
|
---|
| 37 | ! 3 => ECEPP with Abagyan corrections
|
---|
| 38 | !
|
---|
[e40e335] | 39 |
|
---|
| 40 | sh2=.false. ! .true. for ECEPP/2; .false. for ECEPP3
|
---|
| 41 | epsd=.false. ! .true. for distance-dependent dielectric
|
---|
| 42 | ! permittivity
|
---|
| 43 |
|
---|
| 44 | itysol= 1 ! 0: vacuum
|
---|
| 45 | ! >0: numerical solvent energy
|
---|
| 46 | ! <0: analytical solvent energy & gradients
|
---|
| 47 |
|
---|
| 48 | call init_energy(libdir)
|
---|
| 49 |
|
---|
[bd2278d] | 50 | ! ================================================= Structure setup
|
---|
[e40e335] | 51 |
|
---|
| 52 | grpn = 'nh2' ! N-terminal group
|
---|
| 53 | grpc = 'cooh'! C-terminal group
|
---|
| 54 |
|
---|
| 55 | iabin = 1 ! =0: read from PDB-file
|
---|
| 56 | ! =1: ab Initio from sequence (& variables)
|
---|
| 57 | seqfile='enkefa.seq'
|
---|
| 58 | varfile='enkefa.var'
|
---|
| 59 | ntlml = 0
|
---|
| 60 | write (*,*) 'Solvent: ', itysol
|
---|
[bd2278d] | 61 | ! Initialize random number generator.
|
---|
[e40e335] | 62 | call sgrnd(31433)
|
---|
| 63 |
|
---|
| 64 | if (itysol.eq.0.and.ientyp.eq.3) then
|
---|
| 65 | print *,'Can not use Abagyan entropic corrections without '
|
---|
| 66 | print *,'solvent term. '
|
---|
| 67 | stop
|
---|
| 68 | endif
|
---|
| 69 |
|
---|
| 70 | call init_molecule(iabin,grpn,grpc,seqfile,varfile)
|
---|
[bd2278d] | 71 | ! Decide if and when to use BGS, and initialize Lund data structures
|
---|
[e40e335] | 72 | bgsprob=0.75 ! Prob for BGS, given that it is possible
|
---|
[bd2278d] | 73 | ! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob
|
---|
| 74 | ! 2 => temperature dependent choice
|
---|
[e40e335] | 75 | upchswitch=1
|
---|
| 76 | rndord=.true.
|
---|
| 77 | call init_lund
|
---|
| 78 | if (ientyp.eq.2) call init_lundff
|
---|
| 79 | if (ientyp.eq.3) call init_abgn
|
---|
| 80 |
|
---|
| 81 |
|
---|
[bd2278d] | 82 | ! ======================================== Add your task down here
|
---|
[e40e335] | 83 | num_rep = 5
|
---|
| 84 | nequi = 100
|
---|
| 85 | nsweep = 10000
|
---|
| 86 | nmes = 10
|
---|
| 87 | newsta = .true.
|
---|
| 88 | switch = 1
|
---|
[bd2278d] | 89 | ! parallel tempering on a single CPU
|
---|
[e40e335] | 90 | eol = energy()
|
---|
| 91 | write (*,*) "Energy before randomization:", eol
|
---|
| 92 | call partem_s(num_rep, nequi, nsweep, nmes, nmes, newsta, switch)
|
---|
| 93 | eol = energy()
|
---|
| 94 | write (*,*) "Final energy:", eol
|
---|
| 95 |
|
---|
[bd2278d] | 96 | ! ======================================== End of main
|
---|
[e40e335] | 97 | end
|
---|