Skip to main content

Bayesian workflows for fixed-charge molecular force fields

Reason this release was yanked:

Python 3.10 import failure caused by use of typing.Self. Install bfflearn>=0.2.1.

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.

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

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.2.0.tar.gz (241.0 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.2.0-py3-none-any.whl (150.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bfflearn-0.2.0.tar.gz
Algorithm Hash digest
SHA256 75fc45651396be86421159f3c8c95270fce7d03da8fcced48e2c85547befdc80
MD5 45e32d01a65c58b5c809993c965f9f1b
BLAKE2b-256 4316dbd0e20c9d8cff263abb4e705b22cc11b25d2f36f182290bfc82a97fef62

See more details on using hashes here.

Provenance

The following attestation bundles were made for bfflearn-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: bfflearn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 150.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3e93283a4a60ac18e83fa5141c03c6d6e62dd872505a99c0e4a1e4452afabbf
MD5 b5eb2d4f5813be0879837bdb3dfa3f3e
BLAKE2b-256 6e2801ffed72f7ec9fa33908425546cd08ab47d17b819e90e0c2416c0812d4f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for bfflearn-0.2.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