Changeset 3fbbfbb
- Timestamp:
- 06/16/10 08:25:47 (14 years ago)
- Branches:
- master
- Children:
- 5fef0d7
- Parents:
- 9f146fa
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
EXAMPLES/1bdd.seq
r9f146fa r3fbbfbb 5 5 SER GLN SER ALA ASN LEU LEU ALA GLU ALA 6 6 LYS LYS LEU ASN ASP ALA 7 -
INCL.H
r9f146fa r3fbbfbb 8 8 integer mxhbac, mxtybl, mxtyba, mxtyto, mxrt, mxvrrt, mxrtsu 9 9 integer nrsty 10 !integer MAXLOGLEVEL, LOGFILEUNIT10 integer MAXLOGLEVEL, LOGFILEUNIT 11 11 double precision pi, pi2, pi4, crd, cdr, zero, one 12 12 integer izero, ione … … 52 52 integer enysolct 53 53 double precision boxsize 54 common /log/MAXLOGLEVEL,LOGFILEUNIT 54 55 common /counter/enysolct 55 56 common /commonrandom/ seed -
algorithms.py
r9f146fa r3fbbfbb 11 11 from protein import * 12 12 13 class CanonicalMonteCarlo :13 class CanonicalMonteCarlo(object): 14 14 """An implementation of a canonical Monte Carlo run using Metropolis weights. 15 15 After a Monte-Carlo sweep over all internal variables, this implementation -
enyshe.f
r9f146fa r3fbbfbb 10 10 ! ************************************************************** 11 11 12 !> PURPOSE: Calculate internal energy of molecule 'nml' with ECEPP parameters 13 !! 14 !! CALLS: none 15 !! 16 !! The function loops over all moving sets within the molecule. Within 17 !! this loop it loops over the van-der-Waals domains of each atom in the 18 !! moving set and finally over the atoms that belong to the 1-4 interaction 19 !! set. 20 !< ............................................................................ 12 21 13 22 real*8 function enyshe(nml) 14 23 15 ! ............................................................................16 !17 ! PURPOSE: Calculate internal energy of molecule 'nml' with ECEPP parameters18 !19 ! CALLS: none20 !21 ! The function loops over all moving sets within the molecule. Within22 ! this loop it loops over the van-der-Waals domains of each atom in the23 ! moving set and finally over the atoms that belong to the 1-4 interaction24 ! set.25 ! ............................................................................26 24 27 25 include 'INCL.H' -
enyshe_p.f
r9f146fa r3fbbfbb 13 13 real*8 function enyshe(nml) 14 14 15 ! ............................................................................ 16 ! 17 ! PURPOSE: Calculate internal energy of molecule 'nml' with ECEPP parameters 18 ! 19 ! CALLS: none 20 ! 21 ! The function loops over all moving sets within the molecule. Within 22 ! this loop it loops over the van-der-Waals domains of each atom in the 23 ! moving set and finally over the atoms that belong to the 1-4 interaction 24 ! set. 25 ! ............................................................................ 15 !> PURPOSE: Calculate internal energy of molecule 'nml' with ECEPP parameters 16 !! 17 !! CALLS: none 18 !! 19 !! The function loops over all moving sets within the molecule. Within 20 !! this loop it loops over the van-der-Waals domains of each atom in the 21 !! moving set and finally over the atoms that belong to the 1-4 interaction 22 !! set. 23 !< ............................................................................ 26 24 27 25 include 'INCL.H' -
main.f
r9f146fa r3fbbfbb 19 19 program main 20 20 21 use timer 21 22 include 'INCL.H' 22 23 include 'INCP.H' 23 double precision eps, temp, e, energy 24 double precision eps, temp, e, energy, enyshe_simple 24 25 25 integer maxloglevel, logfileunit,iabin, imin, maxit, nequi26 integer nsweep, nmes, ncalls, nacalls 26 integer iabin, imin, maxit, nequi 27 integer nsweep, nmes, ncalls, nacalls, i 27 28 28 29 common/updstats/ncalls(5),nacalls(5) … … 42 43 ! Set the maximum log level. The larger the number the more detailed 43 44 ! the log. 44 MAXLOGLEVEL = 1 45 MAXLOGLEVEL = 100 45 46 ! File unit to use for the log file. 46 47 LOGFILEUNIT = 27 … … 112 113 ! call outvar(0, ' ') 113 114 ! To do a canonical Monte Carlo simulation uncomment the lines below 114 115 nsweep = 50000116 117 118 119 120 121 call outpdb(1, "polyA.pdb")115 nequi = 100 116 nsweep = 500 117 nmes = 10 118 temp = 300.0 119 lrand = .true. 120 E = energy() 121 write (logString, *) E, eyel,eyvw,eyhb,eyvr 122 call outpdb(1, "polyrQ.pdb") 122 123 ! Canonical Monte Carlo 123 call canon(nequi, nsweep, nmes, temp, lrand) 124 call init_timer() 125 call start_timer(1) 126 call canon(nequi, nsweep, nmes, temp, lrand) 127 call stop_timer(1) 124 128 129 E = 0 130 ! call start_timer(1) 131 ! do i =1, nsweep 132 ! E = E + enyshe_simple() 133 ! end do 134 ! call stop_timer(1) 135 call evaluate(1) 136 print *,timingData(1)%average, "s.", E 125 137 ! For simulated annealing uncomment the lines below 126 138 ! tmin = 200.0 -
partem_p.f
r9f146fa r3fbbfbb 11 11 ! ************************************************************** 12 12 13 !> 14 !! PURPOSE: SIMULATION OF PROTEINS BY PARALLEL TEMPERING ALGORITHM 15 !! ON PARALLEL COMPUTERS USING MPI 16 !! 17 !! switch: Choses the starting configuration: 18 !! -1 - stretched configuration 19 !! 0 - don't change anything 20 !! 1 - random start configuration 21 !! 22 !! CALLS: addang,contacts,energy,hbond,helix,iendst,metropolis, 23 !! outvar,(rand),rgyr 24 !< 13 25 subroutine partem_p(num_rep, nequi, nswp, nmes, nsave, newsta, 14 26 & switch, rep_id, partem_comm) 15 !16 ! PURPOSE: SIMULATION OF PROTEINS BY PARALLEL TEMPERING ALGORITHM17 ! ON PARALLEL COMPUTERS USING MPI18 !19 ! switch: Choses the starting configuration:20 ! -1 - stretched configuration21 ! 0 - don't change anything22 ! 1 - random start configuration23 !24 ! CALLS: addang,contacts,energy,hbond,helix,iendst,metropolis,25 ! outvar,(rand),rgyr26 !27 27 include 'INCL.H' 28 28 include 'INCP.H' -
protein.py
r9f146fa r3fbbfbb 6 6 # 7 7 import sys 8 import smmp 8 import smmp_p as smmp 9 9 from math import * 10 10 -
rgyr.f
r9f146fa r3fbbfbb 11 11 12 12 13 subroutine rgyr(nml, rgy, ee) 13 !> CALCULATES THE RADIUS-OF-GYRATION AND THE END-TO-END DISTANCE 14 !! FOR A GIVEN PROTEIN CONFORMATION 15 !! If nml == 0, calculate the radius of gyration for all molecules 16 !! 17 !! rgy = radius-of-gyration 18 !! ee = end-to-end distance 19 !! 20 !! REQUIREMENTS: c_alfa has to be called BEFORE call of this subroutine 21 !! 22 !! CALLS: NONE 23 !< 24 subroutine rgyr(nml, rgy, ee) 14 25 15 ! CALCULATES THE RADIUS-OF-GYRATION AND THE END-TO-END DISTANCE16 ! FOR A GIVEN PROTEIN CONFORMATION17 ! If nml == 0, calculate the radius of gyration for all molecules18 !19 ! rgy = radius-of-gyration20 ! ee = end-to-end distance21 !22 ! REQUIREMENTS: c_alfa has to be called BEFORE call of this subroutine23 !24 ! CALLS: NONE25 !26 26 include 'INCL.H' 27 27 -
timer.F90
r9f146fa r3fbbfbb 59 59 ! Initialize timers 60 60 allocate (timingData(initialTimerCount)) 61 forall(i = 1:initialTimerCount) 61 ! forall(i = 1:initialTimerCount) 62 do i = 1, initialTimerCount 62 63 timingData(i) = TimingStructure(0, -1.0, -1.0, -1.0, -1.0, 0.0, & 63 64 0.0, -1.0, -1.0) 64 end forall 65 ! end forall 66 end do 65 67 end subroutine init_timer 66 68 -
universe.py
r9f146fa r3fbbfbb 4 4 # Jan H. Meinke, Sandipan Mohanty 5 5 # 6 import smmp 6 import smmp_p as smmp 7 7 from math import * 8 8 -
utilities.f
r9f146fa r3fbbfbb 7 7 ! ********************************************************************* 8 8 9 !! Calculate the best way to distribute the work load across processors. 10 ! It calculates the average number of interactions and then tries to 11 ! assign a number of interactions to each processor that is as close 12 ! as possible to the average. The routine should be called once for 13 ! every molecule in the system. 14 ! 15 ! @param num_ppr Number of processors per replica 16 ! @param nml index of molecule or zero. 17 ! 18 ! @author Jan H. Meinke 9 !> Calculate the best way to distribute the work load across processors. 10 !! It calculates the average number of interactions and then tries to 11 !! assign a number of interactions to each processor that is as close 12 !! as possible to the average. The routine should be called once for 13 !! every molecule in the system. 14 !! 15 !! @param num_ppr Number of processors per replica 16 !! @param nml index of molecule or zero. 17 !! 18 !! @author Jan H. Meinke 19 !< 19 20 subroutine distributeWorkLoad(num_ppr,nml) 20 21 … … 117 118 end subroutine distributeWorkLoad 118 119 119 ! -----------------------------------------------------------------------120 ! The function fileNameMP takes a template of a file name in the121 ! variable base. The position of the first and last character that122 ! may be replaced by rank in the string are given in i1 (first) and123 ! i2 (last).124 ! The function returns an empty string if the rank would need more125 ! characters than is allowed by the template.126 ! For example,127 ! \code128 ! rank = 11129 ! fileName = fileNameMP('base_0000.dat', 6, 9, rank)130 ! write (logString, *), fileName131 ! \endcode132 ! will output base_0011.dat.133 ! 134 ! @param base the base file name, e.g., base_0000.dat.135 ! @param i1 index of the first character that may be replaced136 ! @param i2 index of the last character that may be replaced137 ! @param rank the number that should be inserted into the file name.138 ! 139 ! @return file name for rank140 ! -----------------------------------------------------------------------120 !> 121 !! The function fileNameMP takes a template of a file name in the 122 !! variable base. The position of the first and last character that 123 !! may be replaced by rank in the string are given in i1 (first) and 124 !! i2 (last). 125 !! The function returns an empty string if the rank would need more 126 !! characters than is allowed by the template. 127 !! For example, 128 !! \code 129 !! rank = 11 130 !! fileName = fileNameMP('base_0000.dat', 6, 9, rank) 131 !! write (logString, *), fileName 132 !! \endcode 133 !! will output base_0011.dat. 134 !! 135 !! @param base the base file name, e.g., base_0000.dat. 136 !! @param i1 index of the first character that may be replaced 137 !! @param i2 index of the last character that may be replaced 138 !! @param rank the number that should be inserted into the file name. 139 !! 140 !! @return file name for rank 141 !< 141 142 character*80 function fileNameMP(base, i1, i2, rank) 142 143 … … 172 173 173 174 174 ! ----------------------------------------------------------------------175 ! Add messages to log. This routine takes the log (debugging) mes-176 ! sages and writes them to the log file if the log level is less or177 ! equal to the maximum log level given by the global variable178 ! MAXLOGLEVEL.179 ! 180 ! @author Jan H. Meinke181 ! 182 ! @param loglevel level at which this message should be added to183 ! the log.184 ! @param message message to be written to the log.185 ! @param rank global rank of this node if running an MPI job zero186 ! otherwise.187 ! ----------------------------------------------------------------------175 !> 176 !! Add messages to log. This routine takes the log (debugging) mes- 177 !! sages and writes them to the log file if the log level is less or 178 !! equal to the maximum log level given by the global variable 179 !! MAXLOGLEVEL. 180 !! 181 !! @author Jan H. Meinke 182 !! 183 !! @param loglevel level at which this message should be added to 184 !! the log. 185 !! @param message message to be written to the log. 186 !! @param rank global rank of this node if running an MPI job zero 187 !! otherwise. 188 !< 188 189 subroutine addLogMessage(loglevel, message, rank) 189 190 190 integer maxloglevel, logfileunit 191 integer MAXLOGLEVEL, LOGFILEUNIT 192 common /log/MAXLOGLEVEL, LOGFILEUNIT 191 193 192 194 integer :: loglevel, rank
Note:
See TracChangeset
for help on using the changeset viewer.