This is actually a fork of mcfort but this version works exclusively in the NPT ensemble.
It was made for the sole purpose of computing the equation of state of fluids using the NPT ensemble method and the Monte Carlo simulation technique.
It currently has several potentials implemented, but the source code must be modified by hand to enable them.
It has basic multithreading capabilities to accelerate the energy computation.
To build and use this code, first create a build directory
mkdir build
then, inside this directory run the following
cmake -GNinja ..
This command expects that you have installed the ninja build system.
Then, just run
ninja
In case you only have make
just run
cmake ..
and then run
make
Either way, an executable mcnpt
will be created inside the build directory.
This is the main executable.
The mcnpt
executable expects a file called input.in
with six values in it:
- Packing fraction, a value between strictly larger than 0 and strictly less than 1.0. Any value in between is acceptable. This value will determine the density of the system.
- Reduced temperature.
- Reduced pressure.
- Volume displacement, logarithm based. This is just an initial value, as the code already handles the volume displacement automatically to set it between 15-20% acceptance.
- Number of particles, an integer. The larger this value, the longer it will take to run a simulation.
- Number of Monte Carlo cycles, this is the value to use in order to equilibrate and accumulate results. The default is to use half this number for equilibration and half for averaging results.
The only observable that this code computes is the average density given a value of the reduced pressure. It also provides the standard error for this average.
With both the pressure and the density, one can obtain the equation of state for a given potential.
If you are looking for a way to compute the radial distribution function or the structure factor, please do look into mcfort.