Skip to main content

Bayesian workflows for fixed-charge molecular force fields

Project description

Bayesic Force Fields

BFF logo

Docs Paper Release License

Bayesic Force Fields (BFF) is a Python toolkit for learning fixed-charge molecular force-field parameters from molecular-dynamics observables. It coordinates simulation campaigns, trajectory analysis, surrogate fitting, and Bayesian posterior learning.

Posterior learning supports explicit or data-derived effective observation counts for scalar and curve-valued observables. It also writes QoI-attributed marginals that show which observables support different posterior regions.

Full documentation: vojtechkostal.github.io/BayesicForceFields

Workflow

build -> prepare-assets -> evaluate-snapshots
                       -> sample -> analyze -> fit -> learn -> validate

The command-line interface guides a force-field model from prepared molecular systems to sampled trajectories, quantities of interest, surrogate models, and validated posterior samples. See the CLI reference for the individual commands.

Installation

Create an environment, install the PyTorch build appropriate for your machine, and then install BFF:

mamba create -n bfflearn python=3.10 pip
mamba activate bfflearn
pip install bfflearn

For Jupyter notebooks, install the optional notebook tools:

pip install "bfflearn[notebook]"

WARNING: GPU-enabled PyTorch must be installed separately. Use the official PyTorch installation selector to choose the command matching your CUDA version before running fitting, learning, or the posterior notebooks.

Full MD workflows also require GROMACS. CP2K and PLUMED are needed only for the stages that use them. See the installation guide for details, CUDA guidance, and the repository-development setup.

Quick Start

Install the example tree and choose a walkthrough:

bff examples
cd examples/acetate
  • Acetate: complete staged MD workflow.
  • Arbitrary data: notebook using existing tabular simulation results and targets.
  • Neon Mie: notebook using published RDF data.

The examples guide explains which starting point fits your data. The acetate walkthrough shows the full command sequence.

Supported Parameters

BFF currently updates and learns four GROMACS force-field parameter families:

Parameter Bound label example
Partial charge charge O1 O2
Lennard-Jones sigma sigma OW
Lennard-Jones epsilon epsilon OW
Function-9 dihedral force constant dihedraltype9_3_180

Multiple names in one label share one learned value. Charges can additionally participate in hierarchical residue- or system-level constraints. The sample configuration reference documents the complete syntax and matching rules.

Architecture

flowchart LR
    A["YAML configs or Python API"] --> B["Simulation workflows"]
    B --> C["Trajectories and reference data"]
    C --> D["QoIDataset"]
    D --> E["Gaussian-process surrogates"]
    E --> F["Posterior learning and validation"]

The architecture guide describes the package modules, workflow stages, persisted artifacts, and repository layout.

Documentation

Citation

If you use BFF, please cite:

Kostal, V.; Shanks, B. L.; Jungwirth, P.; Martinez-Seara, H. Bayesian Learning for Accurate and Robust Biomolecular Force Fields. J. Chem. Theory Comput. 2026, 22 (5), 2652-2663. https://doi.org/10.1021/acs.jctc.5c02051

The exact publication snapshot is archived as v0.0.1.

License

BFF is distributed under the GNU GPL v3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bfflearn-0.3.0.tar.gz (248.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bfflearn-0.3.0-py3-none-any.whl (152.9 kB view details)

Uploaded Python 3

File details

Details for the file bfflearn-0.3.0.tar.gz.

File metadata

  • Download URL: bfflearn-0.3.0.tar.gz
  • Upload date:
  • Size: 248.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bfflearn-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0445b1456abb8943aa6c610987965277aa3afcf501cc63c104f1beb88e933ce8
MD5 8422fbc5a8225f8befae523da2103d1c
BLAKE2b-256 86aefc8b562507a3a3a1e4b69dc98bc5683b233466761b2eb05cfae2cb559f75

See more details on using hashes here.

Provenance

The following attestation bundles were made for bfflearn-0.3.0.tar.gz:

Publisher: publish.yml on vojtechkostal/BayesicForceFields

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bfflearn-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: bfflearn-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 152.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bfflearn-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da086a3c53ec7d7030f80938bf3d9b6482f8ec87456d23a8d79ca273486450c0
MD5 d0bae4e4fc61549d0a5831b6f9b43e49
BLAKE2b-256 c5b0afc9a25e2dead81d3fc4679c11fab12d2f4fb79bde5290ffbb78bea35218

See more details on using hashes here.

Provenance

The following attestation bundles were made for bfflearn-0.3.0-py3-none-any.whl:

Publisher: publish.yml on vojtechkostal/BayesicForceFields

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page