Description of the program Atomc:
Monte Carlo simulation of atomic fluids
in the (T,V,N), (T,P,N), or (T,V,mu) ensemble
Mihaly Mezei
Department of Pharmacological Sciences,
Icahn School of Medicine at Mount Sinai
New York, NY 10029
Mihaly.Mezei@mssm.edu
June 23, 2004
I. General Description
Atomc is a Metropolis Monte Carlo program for the simulation of atomic fluids.
The first atom can be different from the rest.
The simulations can be performed in the (T,V,N), (T,P,N) or (T,V,mu)
ensembles.
In the (T,V,N) ensemble, force biased displacements
REF or
energy-scaled displacements
REF can be used.
In the (T,P,N) ensemble, virial-biased volume changes
REF can be used.
In the (T,V,mu) ensemble,
cavity-biased insertions
REF can be used.
II. Installation
The program is written in standard Fortran-77. Before compilation,
certain symbols have to be changed in the source file atomc.for.
There is a Fortran-77 preprocessor program
pre.f that performs the dimension-related
substitution. It can be edited to accomodate
the system to be simulated.
After compilation it asks for the source file name
without the .for (i.e., atomc and then
read the file atomc.for,
make the substitutions and create a file
atomc.f that is ready to be compiled.
The symbols changed by the preprocessor
determine the maximum dimensions of arrays used.
The symbols prefixed by # are replaced by numbers as follows
- #MO: maximum number of atoms (maxats)
- #IJ: (maxats-1)*maxats/2
- #RG: maximum number of rdf grids
- #CV: maximum number of cavities
- #GX: maximum number of
cavity grids in each direction
- #DD: maximum dimension of the space (e.g., 3)
- #NN: maximum number of PBC replicas
- #CP: maximum number of system copies
(2 for (T,P,N), 1 otherwise)
Furthermore, certain platform-dependent lines
may be uncommented as follows:
- For generic UNIX systems, 'C@UX' is changed to ''
- For IBM VM/MVS systems, 'C@BM' is changed to ''
- For VAX/VMS systems, 'C@VX' is changed to ''
- For Cray, 'C@RY' is changed to ''
II. Input syntax
The input format is specified using standard Fortran FORMATs.
For example, (24i3,a4) describes the input of 24 integers of 3
digits in one line (right-adjusted), followed by a string of 4
characters; (5f8.0,10x,e12.5) describes the input of five real
numbers, occupying 8 spaces each, with the decimal point explicitly
given, followed by 10 spaces to be skipped and after that a number
in scientific notation, occupying 12 spaces with a 5-digit
mantissa, e.g., -1.76921E-03. The appearance of / in the format
instructs the input to start to read a new line.
- Option array : iop (40i2)
- iop(1) = 0 : LJ fluid
- iop(1) = 1 : soft-sphere fluid (E=1/r12)
- iop(1) = 2 : LJ fluid, first atom is a solute
- iop(2) = 0 : initial configuration is read from unit 13
- iop(2) = 1 : random initial guess is generated and saved
- iop(2) = 2 : empty box to start, put one atom in the center
- iop(3) = 0 : (T,V,N) ensemble simulation
- iop(3) = 1 : (T,P,N) ensemble simulation
- iop(3) = 2 : (T,V,mu) ensemble simulation
- iop(4) > 0 : do not compute distribution functions
- iop(5) = 0 : simple cubic boundary conditions
- iop(5) = 1 : face-centered cubic boundary conditions
- iop(6) = 0 : regular (random) insertion algorithm
- iop(6) = 1 : cavity-biased insertion alg. using spec. pcav
- iop(6) = 2 : cavity-biased insertion alg. using general pcav
- iop(6) = 3 : cavity-biased insertion alg. using grid search
- iop(6) = 4 : multi-particle random insertion algorithm
- iop(7) = 0 : force-biased of Pangali, Rao and Berne
REF
- iop(7) = 1 : regular Metropolis method
- iop(7) = 2 : step determined outside deploy (in test mode)
- iop(8) = 0 : regular (T,P,N) sampling
- iop(8) = 1 : virial-biased (T,P,N) sampling
REF
- iop(9) > 0 : save all the run history on unit 11
- iop(10) > 0 : restart, input from unit 10
- iop(10) = 2 : use options from unit 5 input (override old values)
- iop(10) = 3 : reinitialize grid information
- iop(11) = 0 : alternating insertion/deletion attempt
- iop(11) = 1 : random (50/50) insertion/deletion attempt
- iop(12) = 0 : move the atoms randomly
- iop(12) = 1 : move the atoms sequentially
- iop(12) = 2 : move the atoms randomly within one cycle
- iop(13) > 0 : detailed trace output
- iop(14) = 1 : compute the chemical potential by Widoms meth
- iop(15) = 1 : save the last config on unit 13 and reset all accums
- iop(15) = 2 : save config, reset all accums except those for pcav
- iop(16) = 0 : maximum displacement is fixed
- iop(16) = 1 : maximum displacement is varied with esdmc/db
- iop(16) = 2 : maximum displacement is varied with esdmc/db/artan
- iop(16) = 3 : maximum displacement is varied with esdmc (Met. accpt)
- iop(17) = 1 : energy average for esdmc is fixed from input
- iop(18) > 0 :
perform order parameter calculation with a=edge/iop(1)
- iop(19) > 1 : multiple ins/del, iop(19) is the max no of ins/del.
- iop(20) > 0 : minimum no of ins/del when iop(6) eq. 4.
If iop(10) > 0 (run continued from a checkpoint file),
skip items 2-10.
- id (20a4/20a4)
Verbal description of the run
- natoms, ndim, temp, edge,
pext, ba, cutof, cedgs,
fblam (2i5,7f10.0)
- natoms: number of particles
- ndim: dimension of space
- temp: temperature
- edge: unit cell parameters
for simle cubic PBC, volume=edge3
for face-centered cubic pbc, volume=2*edge3
- pext: pressure for (T,P,N) simulations in reduced unit
- ba: adams' b parameter for (T,V,mu) simulations
- cutof: potential cutoff (in sigma)
- cedgs: translational displacement stepsize
- fblam: force-bias lambda parameter (best: 0.5)
for (T,P,N) simulations:
- delvol, vlam (10x,7f10.0)
- delvol: volume change stepsize parameter
- vlam: virial bias lambda parameter
for (T,V,mu) ensemble calculations;
- ntry, natxp, ngrid, rsph (3i5,6f10.0)
- ntry; number of insertion trys for cavity-biased (T,V,mu)
- natxp: number of atoms at target density
- ngrid: number of grid points for cavity search in each dimension
- rsph: radius of the cavity that is required in cavity-biased (T,V,mu)
for energy-scaled displacement calculations:
- aesd, gexplim, batan,epmav (10x,7f10.0)
- aesd: a coefficient for esdmc
- explim: upper bound for the exponential argument
- batan: the coefficient of atan in the modified esdmcx
- epmav: average energy per atom to be used in esdmc
- if iop(1) = 2:
ktiexp, ljavg, epsslt, sigslt,
epsslv, sigslv, cplp (2i5, 5f10.0)
- ktiexp: lambda exponent for TI
- ljavg: 0 - arithmetic avg. of sigmas; 1 - geom avg of sigmas
- epsslt,sigslt,epsslv,sigslv: eps and sigma for solute and solv
- cplp: coupling parameter lambda
- nmcmax, nmcvid, nmovrp,
nvidrp, nmcsav, nmcrec, nmcplt (8i10)
- nmcmax: number of MC steps to run
- nmcvid: frequency of ins/del or vol change try
- nmovrp: frequency of report on displacements
- nvidrp: frequency of report on ins/del or vol change
- nmcsav: frequnecy of saving the state of the simulation on unit 10
- nmcrec: frequency of saving c on unit 11 if iop(9)=1
- nmcplt: frequency of reporting the distributions and saving on
unit 12
- rdmx, ri, rfsl, ebemin, ebegrid (5f15.10)
- rdmx: range of the radial distribution function
- ri: grid size used for integerized distances and the RDF.
- rfsl: first solvation shell radius for coordination no QCDF
(rfsl < rdmx is enforced for efficiency)
- For Widom insertion method calculations (iop(14)=1):
ntry, eftmin, eftgrd (i5,5x,7f10.0)
- eftmin,eftgrd: minimum and gridsize of the insertion energy QCDF
- ntry: number of random insertions per configurations
When iop(10)=0, the input termintes here.
- nmcmax, nmcvid, nmovrp,
nvidrp (8i10)
- nmcmax: number of additional MC steps to run
- nmcvid: frequency of ins/del or vol change try
- nmovrp: frequency of report on displacements
- nvidrp: frequency of report on ins/del or vol change
IV. Sample input
2 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 1 0
TEST L-J WITH SOLUTE
100 3 1.0 5.5 0.0 0.0 2.5 0.3 0.5
2 0 1.0 1.0 1.0 1.0 1.0
20000 100 1000 100 25000 5000 200000
V. File formats
- Unit 10: checkpoint file
The checkpoint file is a binary file containig all the
variables of the program. It can only be read with a program that has been
dimensioned to exactly the same size. It is written automatically at every
nrecd step and at the end of each run.
- Unit 11: history file (optional)
- Unit 12: distribution functions, stacked - optional.
- Unit 13: configuration file
The configuration file contains the description of the initial coordinates.
it has been created with the following Fortran write statement:
write (13) natoms,ix,etot,vol,
- ((c(k,i,1),k=1,ndim),i=1,natoms)
where
- ix: random number generator seed
- etot:total energy of the configuration (real*8)
- vol: volume of the unit cell
- c: array of the (x,y,z) coordinates of the particles
- ndim: the dimension of the space
- natoms: the number of atoms in the configuration
VI. References
- Cavity-biased insertion - grid-based formalism:
M. Mezei, Mol. Phys., 61, 565-582
(1987); Erratum,
67,1207-1208 (1989).
- Phase equilibria of methylene fluoride:
P. Jedlovszky, and M. Mezei, J. Chem., Phys., in print
(1999).
- Force-bias sampling:
C. Pangali, Rao and B.J. Berne, Chem. Phys.
Lett., 55, 413 (1978), Mol. Phys., 37, 1773 (1979)
- Virial-biased volume change in the (T,P,N) ensemble:
M. Mezei, Mol. Phys., 48, 1075 (1983)
Anisotropic (improved) virial-biased volume change:
P. Jedlovszky, and M. Mezei, Molec. Phys, in print
- Energy-scaled displacement:
M. Mezei, K. Bencsath, S. Goldman and S. Singh, Molecular Simulation,
1, 87 (1987)