Python library for free energy calculations using thermodynamic integration

Installing LAMMPS

pytint works with the standard version of LAMMPS. Currently supported pair styles are pace(works with lammps-ace) and eam (with standard LAMMPS). If you want use other pair styles such as snap or sw, please contact.

pytint needs LAMMPS compiled as a library with Python support. It can be done by the following instructions-

cd lammps
mkdir build_lib
cd build_lib
make # -j${NUM_CPUS}
cp liblammps${SHLIB_EXT}* ../src
cd ../src
make install-python

The include files and compiled files should be available in the paths. A full set of instructions can be found here.

Installing pytint

Install dependencies

The following packages need to be installed.

  • numpy (conda install -c conda-forge numpy)

  • scipy (conda install -c conda-forge scipy)

  • pyyaml (conda install -c conda-forge pyyaml)

  • mendeleev (conda install -c conda-forge mendeleev)

  • pylammpsmpi (conda install -c conda-forge pylammpsmpi)

  • pyscal (conda install -c conda-forge pyscal)

Install pytint

After installing the requirements, pytint can be installed by,

git clone
cd pytint
python install
cd pytint/docs
pip install -r requirements.txt
make html

The files will be in pytint/docs/build/html.

pytint can be run as both a Python library and as a command line tool. The recommended way to use pytint is through the command line. After installation, pytint can be accessed from the terminal using,

tint --help

The main option one needs to specify is the --input or -i. This keyword species the location of the input file. The format of the inputfile is discussed in detail here.

tint -i input.yaml

Such a command will read the input file and start NEHI calculations for each temperature mentioned in the input file. Alternatively, one can use the --mode option to launch a reversible scaling calculation.

tint -i input.yaml -m rs

In this case, one NEHI calculation is done for the first temperature mentioned in the input file, and then a reversible scaling calculation is done to extend the free energy up to the last temperature specified in the input file.


Freitas, Rodrigo, Mark Asta, and Maurice de Koning. “Nonequilibrium Free-Energy Calculation of Solids Using LAMMPS.” Computational Materials Science 112 (February 2016): 333–41.

Paula Leite, Rodolfo, and Maurice de Koning. “Nonequilibrium Free-Energy Calculations of Fluids Using LAMMPS.” Computational Materials Science 159 (March 2019): 316–26.

Koning, Maurice de, A. Antonelli, and Sidney Yip. “Optimized Free-Energy Evaluation Using a Single Reversible-Scaling Simulation.” Physical Review Letters 83, no. 20 (November 15, 1999): 3973–77.


Indices and tables