Downloads · 30 days
0
Zirui-Fan/DynaFold
DynaFold is a machine learning model from Zirui-Fan. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains code for "DynaFold: A Latent Diffusion Based Generative Framework for Protein Dynamic Trajectory", which introduced a latent diffusion based framework for generating all-atom protein structura…
Downloads · 30 days
0
Access
Public
Updated Oct 7, 2025
Repo size
10.2 GB
Likes
0
Public
Click a slice to open those files.
.pth7.5 GB · 74%
From the Hugging Face model README
This repository contains code for "DynaFold: A Latent Diffusion Based Generative Framework for Protein Dynamic Trajectory", which introduced a latent diffusion based framework for generating all-atom protein structural trajectories and ensembles. Specifically, DynaFold can model:

To set up an environment for DynaFold, run:
git clone https://huggingface.co/Zirui-Fan/DynaFold
cd DynaFold
conda create -n dynafold python=3.12.10
conda activate dynafold
pip install -r requirements.txt
pip install python-dateutil
DynaFold is a latent diffusion framework comprising a unified protein all-atom structure Variational Autoencoder (VAE) and various Latent Denoising Models (LDTs) tailored for different tasks. We name the model weights as DynaFold-{task type}, where forward simulation, conformational transition and ensemble tasks are abbreviated as FS, CT and ES respectively. For the same task trained on different datasets, the dataset name will also be appended to the suffix.
| Model Name | Download Link |
|---|---|
| Encoder | https://huggingface.co/Zirui-Fan/DynaFold/blob/main/weights/encoder.pth |
| Decoder | https://huggingface.co/Zirui-Fan/DynaFold/blob/main/weights/decoder.pth |
For models trained by Fast Folding dataset, we employed leave-one-out cross-validation (LOOCV) for evaluation. Therefore, there will be a model weight file with the same name as the test protein within FastFolding-suffix weights folders.
| Model Name | Download Link |
|---|---|
| DynaFold-FS-ATLAS | https://huggingface.co/Zirui-Fan/DynaFold/blob/main/weights/DynaFold-FS-ATLAS.pth |
| DynaFold-FS-FastFolding | https://huggingface.co/Zirui-Fan/DynaFold/tree/main/weights/DynaFold-FS-FastFolding |
| DynaFold-CT | https://huggingface.co/Zirui-Fan/DynaFold/blob/main/weights/DynaFold-CT.pth |
| DynaFold-ES-Pretrain | https://huggingface.co/Zirui-Fan/DynaFold/blob/main/weights/DynaFold-ES-Pretrain.pth |
| DynaFold-ES-ATLAS | https://huggingface.co/Zirui-Fan/DynaFold/blob/main/weights/DynaFold-ES-ATLAS.pth |
| DynaFold-ES-FastFolding | https://huggingface.co/Zirui-Fan/DynaFold/tree/main/weights/DynaFold-ES-FastFolding |
inference.py is used for DynaFold's forward simulation (DynaFold-FS) and ensemble (DynaFold-ES) models. The basic inference command for running DynaFold-ES is:
python inference.py \
--input ./example/ATLAS \
--out_dir ./results \
--esm_model_path ./esm2/weights/esm2_t33_650M_UR50D.pt \
--encoder_ckpt ./weights/encoder.pth \
--decoder_ckpt ./weights/decoder.pth \
--ldt_ckpt ./weights/DynaFold-ES-ATLAS.pth \
--T 100
Where --T denotes the number of sampled structures or tracjetory frames. For DynaFold-FS, the additional parameters --use_cond and --temp_attn must be supplied, specifying the use of conditional frames and temporal attention mechanisms within the LDT model respectively. The basic inference command for running DynaFold-FS is:
python inference.py \
--input ./example/ATLAS \
--out_dir ./results \
--esm_model_path ./esm2/weights/esm2_t33_650M_UR50D.pt \
--encoder_ckpt ./weights/encoder.pth \
--decoder_ckpt ./weights/decoder.pth \
--ldt_ckpt ./weights/DynaFold-FS-ATLAS.pth \
--T 201 --use_cond --temp_attn
inference_CT.py is used for DynaFold's conformational transition (DynaFold-CT) models. The basic inference command for running DynaFold-CT is:
python inference_CT.py \
--pdb0 ./example/FastFolding/CT/NLT9/start.pdb \
--pdbT ./example/FastFolding/CT/NLT9/end.pdb \
--out_dir ./results \
--esm_model_path ./esm2/weights/esm2_t33_650M_UR50D.pt \
--encoder_ckpt ./weights/encoder.pth \
--decoder_ckpt ./weights/decoder.pth \
--ldt_ckpt ./weights/DynaFold-CT.pth \
--T 50