Skip to main content

MolCraftDiffusion

PyPI DOI DOI Weights Dataset Docs


Three-dimensional molecular generative models place atoms directly in Cartesian space, enabling geometric and physicochemical conditioning. Yet their implementations and evaluation workflows remain fragmented across incompatible repositories.

One platform brings together a broad range of 3D molecular generators for de novo, property-directed, structure-guided, shape-conditioned, pocket-conditioned, fragment-based, and pharmacophore-driven design.

MolCraftDiffusion unifies data preparation, training and fine-tuning, guided generation, checkpoint handling, and evaluation behind a modular architecture and consistent CLI. This shared workflow makes diverse generators easier to build, compare, and apply across virtual library construction, chemical-space exploration, inverse design, and structure-based discovery.

workflow

One Platform, Many 3D Generation Paradigms

  • De novo generation of complete 3D molecules
  • Property-directed generation for inverse molecular design
  • Structure-guided generation through inpainting, outpainting, and soft reference steering
  • Shape-conditioned generation around desired molecular geometries
  • Protein-pocket-conditioned generation for structure-based molecular design
  • Fragment linking and scaffold elaboration
  • Pharmacophore-conditioned generation
  • Latent-space diffusion and flow-matching approaches

These capabilities share the same configuration system, CLI, data pipeline, checkpoint handling, and analysis tools, making it possible to apply and compare different generation paradigms without maintaining separate codebases. See the supported architectures and their application domains.

Features

Broad generator coverage Multiple 3D generation paradigms and application domains in one platform
3D-native generation Models trained directly in Cartesian space; geometric validity by construction, not augmentation
Extensible architecture Multiple backbone families included; adding a new model is a single sub-package drop-in
Steerable generation Guide outputs towards target properties or structural constraints without retraining
End-to-end pipeline Raw data through training to post-generation analysis, with no glue scripts needed
Unified CLI train · generate · predict · analyze · data, all from one MolCraftDiff entry point
Built-in analysis suite Geometry optimisation, validity metrics, quantum-chemical descriptors, and featurisation

Installation

# Create environment
conda create -n molcraft python=3.11 -y
conda activate molcraft

GPU / CUDA:

pip install molcraftdiffusion[gpu] \
    --find-links https://data.pyg.org/whl/torch-2.6.0+cu124.html

CPU-only:

pip install molcraftdiffusion[cpu] \
    --extra-index-url https://download.pytorch.org/whl/cpu \
    --find-links https://data.pyg.org/whl/torch-2.6.0+cpu.html

See the installation guide for optional capabilities, platform-specific dependencies, and development setup.

Usage

Pre-trained diffusion models are available on Hugging Face. Starting from a pretrained checkpoint is recommended for downstream tasks.

CLI

Training and inference commands accept a YAML config followed by optional Hydra-style overrides:

MolCraftDiff {train|generate|predict|eval-predict} CONFIG [key=value ...]

Analysis and data preparation are direct utility command groups, while generation sweeps accept a sweep config and command-line options.

Command Description
train Train a diffusion, regression, or guidance model
generate Sample molecules from a trained model
generate-sweep Run and resume generation parameter sweeps
predict Run property prediction
eval-predict Evaluate prediction results
analyze Post-process and evaluate generated molecules
data Data preparation and augmentation utilities
MolCraftDiff train configs/example_diffusion_config.yaml
MolCraftDiff generate configs/generate.yaml interference.num_generate=100
MolCraftDiff predict configs/predict.yaml
MolCraftDiff generate-sweep path/to/sweep.yaml --dry-run
MolCraftDiff data prepare compile -s data_dir/ -d dataset.db

MolCraftDiff --help         # all commands
MolCraftDiff train --help   # per-command help

Analysis & Post-processing

MolCraftDiff analyze metrics generated_molecules/
MolCraftDiff analyze --help

The analysis suite covers structural validation, geometry optimisation and comparison, electronic properties, molecular representations, and feature extraction. See the analysis tutorial for commands and optional dependencies.

Documentation

Project Structure

src/MolecularDiffusion/
├── cli/                         # Shared command-line entry points
├── configs/
│   ├── tasks/<generator>.yaml   # Hydra registration for a generator
│   └── ...                      # Shared data, trainer, engine, and generation configs
├── core/                        # Architecture-agnostic training engines and callbacks
├── data/                        # Shared datasets, loaders, and molecular representations
├── modules/
│   ├── layers/<family>/         # Optional reusable architectural building blocks
│   ├── models/<generator>/      # Isolated model implementation
│   └── tasks/<generator>.py     # Thin adapter to the common task interface
├── runmodes/                    # Generic training, generation, and analysis workflows
└── utils/                       # Geometry, diffusion, graph, and I/O utilities

Adding a generator normally requires only its isolated model implementation, a task adapter, and a Hydra task config. The shared CLI, data pipeline, training engines, checkpoint handling, and analysis workflows remain unchanged because they operate through a common task interface.

Citation

If you use MolCraftDiffusion in your research, please cite:

MolCraftDiffusion

DOI

Modular Framework for 3D Molecular Generation in Computational Chemistry Applications

@article{worakul_modular_2026,
	title = {Modular {Framework} for {3D} {Molecular} {Generation} in {Computational} {Chemistry} {Applications}},
	copyright = {https://creativecommons.org/licenses/by/4.0/},
	issn = {0002-7863, 1520-5126},
	url = {https://pubs.acs.org/doi/10.1021/jacs.5c19960},
	doi = {10.1021/jacs.5c19960},
	language = {en},
	urldate = {2026-06-24},
	journal = {Journal of the American Chemical Society},
	author = {Worakul, Thanapat and Azzouzi, Mohammed and Wodrich, Matthew D. and Corminboeuf, Clémence},
	month = jun,
	year = {2026},
	pages = {jacs.5c19960},
}

Related Paper

DOI

A Diffusion Framework for Geometrically Valid and Practically Viable 3D Molecular Generation

@article{worakul_diffusion_2026,
	title = {A {Diffusion} {Framework} for {Geometrically} {Valid} and {Practically} {Viable} {3D} {Molecular} {Generation}},
	url = {https://chemrxiv.org/doi/full/10.26434/chemrxiv.15005231/v1},
	doi = {10.26434/chemrxiv.15005231/v1},
	publisher = {American Chemical Society (ACS)},
	author = {Worakul, Thanapat and Corminboeuf, Clémence},
	month = jun,
	year = {2026},
}

Release files for molcraftdiffusion 1.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for molcraftdiffusion 1.7.0
File Size Uploaded
molcraftdiffusion-1.7.0.tar.gz 8.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for molcraftdiffusion 1.7.0
File Interpreter ABI Platform
molcraftdiffusion-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 MB

Release files / molcraftdiffusion-1.7.0.tar.gz

Download URL molcraftdiffusion-1.7.0.tar.gz
Size 8.6 MB
Tags Source
SHA-256 checksum
How to use checksums
dfe385e64407bda2900bc90179b2b231a68d4a588a7554c10d786d1c1eaae4f8
BLAKE2b-256 checksum
How to use checksums
72472cc244ac1f226bee6127e4c58a3249e1703b540178e9e410cce6cd64081f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / molcraftdiffusion-1.7.0-py3-none-any.whl

Download URL molcraftdiffusion-1.7.0-py3-none-any.whl
Size 8.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
859954a4b02c5b2d22c381168f85c44f9276ebce5b6d4698b40ef231add8ba5b
BLAKE2b-256 checksum
How to use checksums
6083a4e2da197821ee50079457c6a2b0dee52243f628cce9d7d47db9734336ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

1.7.0 This release

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page