!******************************************************************* ! file: parameters.f90 ! language: f90 ! author: Emma Falck ! updated: April, 23 ! description: A module containing the (input) parameters for ! meso.f90. !******************************************************************** ! The author of this software is E. Falck. Copyright (c) 2002. ! Permission to use, copy, modify, and distribute this software for ! any purpose without fee is hereby granted, provided that this entire ! notice is included in all copies of any software which is or includes ! a copy or modification of this software and in all copies of the ! supporting documentation for such software. ! THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR ! IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR SOFTSIMU ! MAKE ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE ! MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR ! PURPOSE. !******************************************************************* MODULE parameters IMPLICIT NONE !------------------------------------------------------------------- ! The global parameters are distinguished from local variables ! by the use of capital letters. !------------------------------------------------------------------- !------------------------------------------------------------------- ! To be used in variable declarations. !------------------------------------------------------------------- INTEGER, PARAMETER :: & DP = KIND(1.0D0) !------------------------------------------------------------------- ! Auxiliary variables needed in initialization. !------------------------------------------------------------------- INTEGER :: & ia ! array index !------------------------------------------------------------------- ! Constants. !------------------------------------------------------------------- REAL(DP), PARAMETER :: & PI_D = 3.141592653589793238462643383279502884197_dp, & PIO2_D = 1.57079632679489661923132169163975144209858_dp, & TWOPI_D = 6.283185307179586476925286766559005768394_dp !-------------------------------------------------------------------- ! Parameters. !-------------------------------------------------------------------- INTEGER, PARAMETER :: & CHECKSTEPS = 10, & ! n. of steps between checking \beta etc. COLSTEPS = 4000, & ! number of steps after equilibration CONFSTEPS = 100, & ! time interval for saving configurations DIM = 2, & ! dimension of the system EQSTEPS = 500, & ! number of equilibration steps INCSTEPS = 1, & ! number of steps between samples MAXSTR = 30, & ! maximum lentgth of character string MAXSTRAC = 20, & ! max. n. of elem. in stress a.c. f. MAXVCMAC = 100, & ! max. n. of elem. in c. of m. vel. a.c. f NSE = 20, & ! number of solute particles MAXNAB = 50 * NSE, & ! number of elements in Verlet list NST = 910, & ! number of solvent particles NWSX = 20, & ! number of coll. vol.'s in x dir. NWSY = 20, & ! number of coll. vol.'s in y dir. RSEED = 60202, & ! integer seed for the rng TEMPSTEPS = 1000, & ! number of steps for tempering X = 1, & ! coordinate index for vectors Y = 2 ! coordinate index for vectors REAL(DP), PARAMETER :: & BETA = 1._dp / 1.2_dp, & ! 1 / (k_B T) DT = 0.005_dp, & ! time step for MD EPS = 1._dp, & ! LJ parameter, unit of energy INITDIST = 1.04245_dp, & ! initial distance between monomers KB = 10._dp, & ! spring constant LB = 1._dp, & ! equilibrium distance in spring pot. MAXINITANG = 0.9_dp * PI_D, & ! max. ang. for init. displ. n.-n. MININITANG = 0.1_dp * PI_D, & ! min. ang. for init. displ. n.-n. MST = 1._dp, & ! solvent mass, mass unit MSE = 2._dp * MST, & ! solute mass RCUT = & ! cutoff radius for LJ potential 1.122462048309_dp, & RLIST = 4._dp, & ! skin size SIG = 1._dp, & ! LJ parameter, unit of length TAU = 1._dp, & ! time step for collision dynamics TAULJ = 1._dp, & ! LJ time, time unit UMEAN = 0._dp ! mean velocity of the system REAL(DP), DIMENSION(1:DIM), PARAMETER :: & LENG = (/ & ! linear sizes in all directions 40._dp, & ! linear size in x-direction 40._dp /) ! linear size in y-direction CHARACTER(LEN = MAXSTR), PARAMETER :: & MPREFIX = 'monom', & ! prefix for outputting coordinates POSTFIX = '.dat' ! postfix for outputting conf.'s CHARACTER(LEN = *), PARAMETER :: & CONFFORM = '(2F30.15)', & ! form factor for outputting a conformation NAMEFORM = '(I30)', & ! form for naming files VECFORM = '(3F30.15)' ! form factor for outputting vectors !-------------------------------------------------------------------- ! Parameters computed from parameters. :) !-------------------------------------------------------------------- INTEGER, PARAMETER :: & MAXCHECK = & ! max. n. of elements in "checking arrays" COLSTEPS / CHECKSTEPS, & MDSTEPS = int(TAU / DT), & ! number of MD steps between collisions N = NST + NSE, & ! total number of particles NWS = NWSX * NWSY, & ! number of collision volumes TOTSTEPS = & ! total number of steps COLSTEPS + EQSTEPS REAL(DP), PARAMETER :: & LWS = LENG(X) / NWSX, & ! lin. size of collision volume RHO = & ! solvent number density N / (LENG(X) * LENG(Y)) END MODULE parameters