Bayesic Force Fields¶
Bayesic Force Fields (BFF) is a command-line workflow for learning fixed-charge molecular force fields from trajectory observables.
Publication: Bayesian Learning for Accurate and Robust Biomolecular Force Fields
Preprint: arXiv:2511.05398
For exact reproduction of the published paper data, use the archived Git tag
v0.0.1. The current bfflearn package is the refactored workflow.
See the changelog for post-publication highlights.
What BFF Does¶
BFF runs a linear workflow:
build -> prepare-assets -> evaluate-snapshots
-> sample -> analyze -> fit -> learn -> validate
build: equilibrate systems and run seeded production trajectoriesprepare-assets: package FFMD starts and stage CP2K snapshot assetsevaluate-snapshots: run CP2K snapshot jobssample: run sampled force-field MD campaignsanalyze: compute quantities of interest from sample and reference datafit: train surrogate modelslearn: infer posterior force-field parametersvalidate: rerun selected posterior samples
Supported Learned Parameters¶
BFF currently learns GROMACS partial charges, Lennard-Jones sigma and epsilon, and function-9 dihedral force constants. A single bound can tie multiple atom names or atom types to one learned value. Charge parameters also support hierarchical residue- or system-level constraints.
See the sample configuration reference for the accepted labels, matching rules, and examples.
Quick Start¶
Install BFF, copy the example tree, then run the acetate walkthrough:
mamba create -n bfflearn python=3.10 pip
mamba activate bfflearn
pip install bfflearn
bff examples
cd examples/acetate
Warning
Install the PyTorch build that matches your machine separately before fitting or learning. Use the official PyTorch selector for CPU or CUDA installation commands.
Each example stage has config templates. Copy the needed files into the stage directory, edit them there, and run BFF from that directory:
mkdir -p 01-build
cp configs/build-colvars.yaml 01-build/config.yaml
cd 01-build
bff build config.yaml
cd ..
mkdir -p 02-assets
cp configs/prepare-assets.yaml 02-assets/config.yaml
cd 02-assets
bff prepare-assets config.yaml
Continue with the stages in the acetate example.