Skip to content

A flow matching model for generating conformational ensembles of protein backbones.

License

Notifications You must be signed in to change notification settings

graeter-group/bbflow

Repository files navigation

Learning conformational ensembles of proteins with BBFlow

Structure-based conformational ensemble prediction with flow matching. The method is described in the paper Learning conformational ensembles of proteins based on backbone geometry.

@article{wolf2025conformational,
      title={Learning conformational ensembles of proteins based on backbone geometry}, 
      author={Nicolas Wolf and Leif Seute and Vsevolod Viliuga and Simon Wagner and Jan Stühmer and Frauke Gräter},
      year={2025},
      eprint={2503.05738},
      archivePrefix={arXiv},
      journal={arXiv preprint arXiv:2503.05738},
}

Please cite the paper if you use the code.

This repository relies on the GAFL package and code from FrameFlow.

Installation

BBFlow relies on the GAFL package, which can be installed from GitHub as shown below. The dependencies besides GAFL are listed in environment.yaml.

# download bbflow:
git clone [email protected]:graeter-group/bbflow.git
cd bbflow
# create env with dependencies:
conda env create -f environment.yaml
conda activate bbflow
# install gafl:
git clone [email protected]:hits-mli/gafl.git ../gafl
pushd ../gafl
bash install_gatr.sh # Apply patches to gatr (needed for gafl)
pip install -e .
# install bbflow:
popd
pip install -e .

Usage

After installing the bbflow package, you can generate ensemble states by three lines of code:

from bbflow.deployment.bbflow import BBFlow
bbflow_sampler = BBFlow.from_tag('latest')
bbflow_sampler.sample(input_path='<path/to/equilibrium.pdb>', output_path='<path/to/output_ensemble.pdb>', n_samples=50)

For more details, see the example script in scripts/inference_example.py.

About

A flow matching model for generating conformational ensembles of protein backbones.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages