Source Code


This page contains the source code for the Gibbs program. Each source file is listed followed by a brief description of what it contains.

Notes about the code

source.tar The source code in a tar file. MS Windows version
source_unix.tar The source code in a tar file. UNIX version
banner.f90 Subroutine to write header information to the results file.
bigread.f90 Subroutine to read in most information.
bondl.f90 Subroutine to find a bondlength for beads that are attached via a harmonic stretching potential.
com.f90 Subroutine to determine the center of mass of a molecule.
cone.f90 Subroutine to place a bead a fixed distance and bond angle from existing beads.
create.f90 Subroutine to create a system from scratch or from an existing configuration.
displace.f90 Subroutine to displace or rotate a molecule.
e6interact.f90 Subroutine to calculate the LJ or exp-6 energy of the entire system.
e6molecule.f90 Subroutine to calculate the LJ or exp-6 energy due to a single molecule.
erf.f90 Numerical recipies routine to calculate the error function.
erfc.f90 Numerical recipies routine to calculate the complementary error function.
fourier_move.f90 Subroutine to calculate the Fourier space energy of the Ewald summation for point charges.
fourier_setup.f90 Subroutine to setup the arrays needed to calculate the Fourier space energy of the Ewald summation.
gcmc.f90 The main routine to run the Gibbs program.
grow.f90 Subroutine to grow a molecule using configurational-bias.
intrabend.f90 Subroutine to calculate the harmonic bending energy of three consecutive beads.
intratorsion.f90 Subroutine to calculate the torsion energy of four consecutive beads.
ionmolecule.f90 Subroutine to calculate the intramolecular Coulombic energy between nonbonded beads.
littleread.f90 Subroutine to read input data used to allocate arrays before bigread is called.
lrcorr.f90 and
lrcorr.dat
Subroutine to calculate the long-range correction to the LJ or exp-6 energy.
newmaxima.f90 Subroutine to adjust the maximum particele displacement and rotation.
outfold.f90 Subroutine to unfold a molecule's coordinates from periodic boundary conditions.
ran2.f90 Random number generator from numerical recipies.
realinteract.f90 Subroutine to calculate the real space energy of the Ewald summation for the entire system.
realmolecule.f90 Subroutine to calculate the real space energy of the Ewald summation due to a single molecule.
regrow.f90 Subroutine to attempt an internal regrowth move for flexible molecules.
selfmolecule.f90 Subroutine to calculate the self energy of the Ewald summation.
sphere.f90 Subroutine to determine a random location on the surface of a sphere.
statistics.f90 Subroutine to calculate block averages and uncertainties.
store.f90 Subroutine to write the configuration to disk.
student_t.f90 This subroutine returns the inverse of the Student's t-distribution for the specified number of blocks.
surf_move.f90 Subroutine to calculate the surface term of the Ewald summation.
transfer.f90 Subroutine to transfer molecules between phases.
volume_npt.f90 Subroutine to change the volume for a NpT Gibbs run.
volume_nvt.f90 Subroutine to change the volume for a NVT Gibbs run.
writedata.f90 Subroutine to write initial information to the results file.
writeresults.f90 Subroutine to write the results to the results file at the end of an equilibration or production phase.
zbrent.f90 Root finding routine from numerical recipies.

 

Compiling the code on a UNIX machine

  1. Download the file source_unix.tar (above) and expand.
  2. Use the following makefile to build the program. You may want to edit the top section of the makefile to change the compiler options and executable name.
  3. The UNIX version of the code uses the system function etime for timing purposes. If the system you're using does not have this function, you'll have to make the appropriate changes in the code.