source: EXAMPLES/parallel_tempering_s.f

Last change on this file was bd2278d, checked in by baerbaer <baerbaer@…>, 16 years ago

Reformatting comments and continuation marks.

Fortran 90 and higher use ! to mark comments no matter where they are in the
code. The only valid continuation marker is &.
I also added the SMMP.kdevelop.filelist to the repository to make it easier
to use kdevelop.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@12 26dc1dd8-5c4e-0410-9ffe-d298b4865968

  • Property mode set to 100644
File size: 3.1 KB
Line 
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
22! =================================================== Energy setup
23
24! Directory for SMMP libraries
25! Change the following directory path to where you want to put SMMP
26! libraries of residues.
27 libdir='../SMMP/'
28
29! The switch in the following line is now not used.
30 flex=.false. ! .true. for Flex / .false. for ECEPP
31
32! Choose energy type with the following switch instead ...
33 ientyp = 0
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!
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
50! ================================================= Structure setup
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
61! Initialize random number generator.
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)
71! Decide if and when to use BGS, and initialize Lund data structures
72 bgsprob=0.75 ! Prob for BGS, given that it is possible
73! upchswitch= 0 => No BGS 1 => BGS with probability bgsprob
74! 2 => temperature dependent choice
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
82! ======================================== Add your task down here
83 num_rep = 5
84 nequi = 100
85 nsweep = 10000
86 nmes = 10
87 newsta = .true.
88 switch = 1
89! parallel tempering on a single CPU
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
96! ======================================== End of main
97 end
Note: See TracBrowser for help on using the repository browser.