Installation¶
Requirements¶
- Python 3.10 or newer
- GROMACS available as
gmxforbuild,sample, andvalidate - CP2K only if you want to run staged snapshot evaluation inputs
- PLUMED only for PLUMED-biased systems
Recommended User Install¶
Create a small conda environment first:
mamba create -n bfflearn python=3.10 pip
mamba activate bfflearn
Install a matching PyTorch build for your machine before fitting or learning. Use the official PyTorch selector for the exact command:
https://pytorch.org/get-started/locally/
Example for Linux with CUDA 12.6:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
Then install BFF from PyPI:
pip install bfflearn
Notebook Support¶
The default installation keeps the command-line package small. To run the Jupyter examples, install the optional notebook tools:
pip install "bfflearn[notebook]"
This adds IPython, ipykernel, JupyterLab, Notebook, and widget support. You
can then launch:
jupyter lab
If you need the exact code used for the published paper, do not install
v0.0.1 through a direct pip Git URL. That archived tag predates the
packaging cleanup. Instead, clone the repository, check out the archived tag,
and follow the README.md and environment.yaml included in that snapshot:
git clone https://github.com/vojtechkostal/BayesicForceFields.git
cd BayesicForceFields
git checkout v0.0.1
That tag is the reference point for exact reproduction of the published paper
data. The current bfflearn package is the post-paper refactored workflow.
PyTorch is intentionally not part of the default package dependencies because the correct CPU or CUDA build depends on the target hardware and driver stack.
Repository Environment¶
For work on the repository itself, create the shared project environment from the repository root:
mamba env create -f environment.yaml
mamba activate bfflearn
That environment installs BFF in editable mode together with the dev, docs,
and notebook extras, but still leaves PyTorch to you so you can choose the
correct CPU or CUDA build.
If you prefer to start from an existing environment:
pip install -e ".[dev,docs,notebook]"
Local Docs¶
Preview the docs locally:
mkdocs serve
Build the static site:
mkdocs build --strict