Program Structure

DICE is written in FORTRAN/77 and is composed of two files: dice.for and dice.prm.
 
The dice.for file contains the main code and the subroutines. The dice.prm file contains the parameters that dimension the most important vectors and matrices in the program, the commons and the declarations of theirs variables. The parameters are:
 
mnt = maximum number of different type of molecules.
mnm = maximum number of solvent molecules.
mnms = maximum number of solute molecules.
mna = maximum number of atoms in each solvent molecule.
mnas = maximum number of atoms in each solute molecule.
mbin = maximum number of r bins in the RDF.
nin = maximum number of different pairwise RDF.
u?? = i/o unit number.
 
If the values of mnt, mnm, mnms, mna, mnas, mbin and nin parameters are exceeded, the execution stops with an error message like “Increase the parameter mnt”. In this case, the program should be recompiled after increasing the parameter in the file dice.prm. The subroutines play specific roles in the simulation. They are:
 
1. Subroutine distribution(grfil, delr, ibl, consti, iprop)
    Normalizes and writes out the RDF functions.
 
2. Subroutine energy(rxinew,ryinew,rzinew,i,rcutsq,rminsq,v12,v6,vc,ovrlap,vdip,dielec)
    Calculates the pair potential energy of molecule i with the other molecules separated by distances smaller than the rc.
 
3. Subroutine initial(boxl, rmin, dummy)
    Creates an initial configuration randomly.
 
4. Subroutine initial_cm(cmfil, boxl, rmin, dummy)
    Creates an initial configuration using center-of-mass position and orientation of molecules, specified in the file outname.cm.
 
5. Subroutine initial_ord(boxl, rmin)
    Creates an initial configuration ordered using original molecular orientation read in the ljname file. In this case the number of molecules should be an exact cubic root (ex.: 125, 343, etc.)
 
6. Subroutine input(title, mofile, namefil, inic, rest, utmp)
    Read the input keywords related to the labels.
 
7. Subroutine input_sys(utmp, tstep, igeom, temp, press, dens, seed, dielec)
    Read the input keywords related to the initial configuration.
 
8. Subroutine input_run(utmp, vstep, nstep, iprint, imean, isave, iratio, vratio)
    Read the input keywords related to the MC simulation.
 
9. Subroutine move(rxi, ryi, rzi, i, rxj, ryj, rzj, drmax, dgamax, dummy)
    Moves the molecule i to a new position and orientation.
 
10.Subroutine order(orx, ory, orz, list)
    Orders a configuration.
 
11.Subroutine properties(delr, ratl, li, l6i, l12i)
    Accumulates the RDF.
 
12.Real function ranf(dummy)
    Returns a uniform random number between zero and one.
 
13.Subroutine readdt(dtfil, temp, press, dens, dlmax, drmax, ibl, dielec)
    Reads several variables and an initial configuration (normalized units) in the file outname.dat.
 
14.Subroutine sumup(rcutsq, rminsq, ovrlap, v12, v6, vc, vdip, dip)
    Calculates the potential energy for a configuration.
 
15.Subroutine writcf(boxl, sni)
    Writes a configuration in the file outname.xyz.
 
16.Subroutine writcf_ord(boxl, sni)
    Writes an ordered configuration in the file outname.xyz.
 
17.Subroutine writdt(dtfil, temp, press, dens, dlmax, drmax, ibl, dielec)
    Writes several variables and a configuration (normalized units) in the file outname.dat