Bayesian workflows for fixed-charge molecular force fields
Project description
Bayesic Force Fields
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
- Installation
- Examples
- Configuration reference
- Architecture
- Changelog
- Development
- Contributing
- Support
- Security
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bfflearn-0.2.1.tar.gz.
File metadata
- Download URL: bfflearn-0.2.1.tar.gz
- Upload date:
- Size: 241.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
551ed893aebb6e973c6139552f8ceee13ccdfd1d46536a2907a10801de65601b
|
|
| MD5 |
cb37664f708aa777ff772b88d48c6244
|
|
| BLAKE2b-256 |
38f16bd924c2a6116dcdee2a914bb8dffa3bf72614032840687859fb8f5ece72
|
Provenance
The following attestation bundles were made for bfflearn-0.2.1.tar.gz:
Publisher:
publish.yml on vojtechkostal/BayesicForceFields
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bfflearn-0.2.1.tar.gz -
Subject digest:
551ed893aebb6e973c6139552f8ceee13ccdfd1d46536a2907a10801de65601b - Sigstore transparency entry: 1691483931
- Sigstore integration time:
-
Permalink:
vojtechkostal/BayesicForceFields@fb504b62abdeb3a6b57f1a921bd157157e8ff149 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/vojtechkostal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fb504b62abdeb3a6b57f1a921bd157157e8ff149 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bfflearn-0.2.1-py3-none-any.whl.
File metadata
- Download URL: bfflearn-0.2.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00db828a23d831ad4de11c161f8d86b1089405659d60fe434492e7d4b92e7742
|
|
| MD5 |
32f80ccd4af2a3f0fbb292867ed83d5c
|
|
| BLAKE2b-256 |
3a0d90ec2bfaf96ed3daa80704f509448e02631cd26198f93ce9bcb6c0891a89
|
Provenance
The following attestation bundles were made for bfflearn-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on vojtechkostal/BayesicForceFields
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bfflearn-0.2.1-py3-none-any.whl -
Subject digest:
00db828a23d831ad4de11c161f8d86b1089405659d60fe434492e7d4b92e7742 - Sigstore transparency entry: 1691484015
- Sigstore integration time:
-
Permalink:
vojtechkostal/BayesicForceFields@fb504b62abdeb3a6b57f1a921bd157157e8ff149 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/vojtechkostal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fb504b62abdeb3a6b57f1a921bd157157e8ff149 -
Trigger Event:
release
-
Statement type: