This repository provides the code release for PocketXMol, a pocket-interacting foundation model introduced in the paper Unified modeling of 3D molecular generation via atomic interactions with PocketXMol published in Cell (2026).
This repository is modified from the MolDiff repository. We thank the authors for their work.
PocketXMol is an AI generative model that learns fundamental atom interactions, enabling applications governed by atom interactions within a pocket, including:
- Structure prediction: Small-molecule docking, peptide docking, and molecular conformation generation.
- Molecular design: Structure-based drug design (SBDD), fragment linking/growing, PROTAC design, de novo linear/cyclic peptide design, and peptide inverse folding.
- Complex manipulation: Combining prediction and design, such as partial structure prediction/generation.
Interactive notebooks are available under notebooks/ and on Colab:
Using conda to create the environment. For CUDA 11.7, use the provided environment.yml:
conda env create -f environment.yml
conda activate pxmFor other options (manual pip), see Setup Guide.
Training/Test data and model weights are hosted on Zenodo: https://zenodo.org/records/17801271
For sampling, download model_weights.tar.gz from Zenodo and extract it:
tar -zxvf model_weights.tar.gzRun the following command to sample small molecule docking poses for an example protein-ligand pair:
python scripts/sample_use.py \
--config_task configs/sample/examples/dock_smallmol.yml \
--outdir outputs_examples \
--device cuda:0(If you encounter GPU OOM errors, add --batch_size 50 to adjust batch_size or modify the config).
For more examples and detailed instructions, see the Sampling Guide.
Outputs:
A new directory {exp_name}_{timestamp} will be created in outputs_examples/:
{exp_name}_{timestamp}_SDF/: Final generated molecules (SDF or PDB format).SDF/: Sampling trajectories (if enabled).gen_info.csv: Metadata and confidence scores (cfd_traj).log.txt: Execution logs.
- Installation via Conda or manual Pip.
- Instructions for downloading weights and test data from Zenodo.
- Directory structure explainer.
- User Guide for running inference/generation on provided examples.
- Catalog of configuration files in
configs/sample/examples/(Docking, SBDD, Linking/Growing, Optimization, Peptide design, etc.). - Guide to Confidence Scoring.
- Explanation of Custom Tasks (noise groups, partitions, mapping).
- Instructions for reproducing benchmark results (PoseBusters, PepBDB, GEOM, CSD, MOAD, PROTAC-DB).
- Specific commands and configs for each benchmark task.
- Evaluation tools for ranking poses.
- Instructions for training on the reduced demo set.
- Pointers for processing full datasets.
- Step-by-step instructions for processing raw training data from scratch.
- Required for full-dataset training (>500 GB).
- Source Code Guide: Architecture overview and code walkthrough.
- notebooks/: Interactive Colab-ready notebooks.
MIT License. See LICENSE.
Pull requests, bug reports, and feedback are very welcome — please feel free to submit a PR! This is a one-person maintained project, so any help is greatly appreciated!!!
@article{Peng2026,
title = {Unified modeling of 3D molecular generation via atomic interactions with PocketXMol},
ISSN = {0092-8674},
url = {http://dx.doi.org/10.1016/j.cell.2026.01.003},
DOI = {10.1016/j.cell.2026.01.003},
journal = {Cell},
publisher = {Elsevier BV},
author = {Peng, Xingang and Guo, Ruihan and Guo, Fenglin and Wang, Ziyi and Sun, Jiayu and Guan, Jiaqi and Jia, Yinjun and Xu, Yan and Huang, Yanwen and Zhang, Muhan and Peng, Jian and Wang, Xinquan and Han, Chuanhui and Wang, Zihua and Ma, Jianzhu},
year = {2026},
month = feb
}