Installation¶
Requirements¶
- Python 3.10 or newer
- GROMACS available as
gmxforprepare,trainset, andvalidate - CP2K only if you want to run the staged reference 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 training 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
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]"
Direct Pip Installation¶
If you already have a Python environment and a working PyTorch install:
pip install bfflearn
Local Docs¶
Preview the docs locally:
mkdocs serve
Build the static site:
mkdocs build --strict
Packaging Metadata¶
Package metadata lives in pyproject.toml. That file defines:
- runtime dependencies
- optional
dev,docs, andnotebookextras - the
bffconsole script - Ruff configuration
- but not PyTorch, which is installed separately to let you choose the appropriate CPU or CUDA build