A Python utility library to perform (multimap) targeted free energy perturbation.
The library includes implementations for the following flows:
Centroid
and Oriented
flows, which can be used to fix the reference system before the map.PCA
flow to perform the transformation in uncorrelated coordinates.The library also includes several utilities:
Dataset
that can wrap an MDAnalysis Universe
to train on molecular simulation trajectories.The library has the following required dependencies
python >= 3.9
pytorch >= 1.11
mdanalysis >= 2.0
pint
numpy
lightning >= 2.0
and the following optional dependencies
openmm # To evaluate the target potentials using the OpenMM Python library.
tblite-python # To evaluate the target potentials using the tblite Python library.
psi4 # To evaluate the target potentials using the psi4 Python library.
ase # To evaluate the target potentials using the Atomistic Simulation Environment (ASE) Python library.
torchdiffeq # To use continuous normalizing flows.
bgflow # To use the mixed internal-Cartesian coordinates Lightning module
einops # Required by bgflow
The suggested way of installing tfep
is by first installing all the dependencies through conda
/pip
/setuptools
,
and then installing tfep
from the source (I plan to add a tfep
conda package in the near future). Here is an
example that creates a separate conda environment with all the dependencies and installs tfep
.
# Required dependencies.
conda create --name tfepenv python">=3.9" pytorch">=1.11" mdanalysis">=2.0" pint numpy lightning">=2.0" -c conda-forge
conda activate tfepenv
# Optional dependency using conda.
conda install einops -c conda-forge
# Optional dependency from source code.
git clone https://github.com/noegroup/bgflow.git
cd bgflow
pip install .
cd ..
# Optional dependency using pip.
pip install ase
# Install the package.
git clone https://github.com/andrrizzi/tfep.git
cd tfep
pip install .
# Or if you want to modify the source code, install it in editable mode.
# pip install -e .
If you find this code useful, please cite the following paper:
Andrea Rizzi, Paolo Carloni, Michele Parrinello. Multimap targeted free energy estimation. arXiv preprint arXiv:2302.07683.
Project based on the Computational Molecular Science Python Cookiecutter version 1.5.