mc++

mc++ is a simple, but efficient program for thermodynamic Monte Carlo simulations of fluid and fluid mixtures. The program is written in C++ (hence the name), object oriented, and rather compact. It can be easily extended (e.g., new pair potentials can be added), and may be useful for teaching purposes.

mc++ can handle mixtures of an arbitrary number of components. The molecules may have an arbitrary number of atoms or groups, but must be rigid. The recent version can handle partial electrical charges with the Ewald summation method (still a somewhat experimental feature) and with the reaction field method.

Refer to the documentation included in the installation package for a description of the program options.


Installation requirements

  • C++ version: a C++ compiler capable of handling dynamic libraries (GNU g++ is known to work)
  • the make command (a standard feature of UNIX and Linux)
  • the mathC package
  • the mc++ source files; contact us for an installation package!

Installation

  1. If you have not done so already, install the mathC package.
  2. Unpack the mc++ archive:
      gzip -cd mc++.tar.gz | tar -xvf -
    
    This creates the directory mc++.
  3. Make platform-specific changes:
      cd mc++
      ./configure
    
  4. Build the library:
      make
    

Note: The recent configure script recognizes Linux and MacOS only. If you have a different operating system, you may have to modify the configure script. Please send us your configure script, and we will build your changes into the official distribution.


Concept

mc++ distinguishes between molecules and models. The model represents the invariant properties of a molecule (in other words: the species): the name, the number of atoms/groups, the structure, … Within , the model is represented by two classes:

  • Model1 contains informations about single molecular species, e.g., name, locations and names of atoms, etc.
  • Model2 contains informations about the pair potentials. More specifically: Model2 is overloaded with the class definition for the desired pair potential, and then stores the necessary pair interaction parameters.

Within mc++, there is a vector of Model1 instances, and each vector element represents a molecular species.

The molecules are represented as instances of the Molecule class. These contain the actual coordinates, and pointers to the associated Model1 and Model2.

mc++ can use NVT and NpT simulation ensembles.

A particular feature of mc++ is that a simulation run, after the equilibration phase, can split into several threads which run in parallel. This not only saves time on multi- processor machines, but lets the user check how fast the correlation between the threads gets lost.

Implemented pair potentials (“models”)

  • Mie-(n,6)
    Mie-(n,6) inverse-power-law potentials (also known as Lennard-Jones-(n,6), but they were proposed by Mie first)
  • Lennard-Jones
    implemented here as a Mie-(12,6) potential
  • fused hard spheres
  • Korona
    Vogel
    multi-parameter ab-initio pair potentials
  • exp6x
    extended (by an 1/r^8 term) Buckingham potential; if used with electrical charges, sometimes called Born–Maier–Huggins–Fumi–Tosi potential
  • Neumaier
    a pair potential with an exponential repulsion like the Buckingham potential, but with a modification that ensures a physically reasonable behaviour at short distances