Skip to main content

AGeDi

AGeDi (Atomistic Generative Diffusion) is a Python package for training and sampling diffusion models for atomistic structures. It is built around PyTorch, PyTorch Geometric, PyTorch Lightning, and ASE.

Build Status Documentation Status License: GPL v3 Python 3.12+ Ruff

Documentation

AGeDi pronounced "A Jedi" is a library for Atomistic Generative Diffusion built on PyG, Lightning and ASE and offers customizable diffusion models for periodic atomistic material generation.

What AGeDi does

AGeDi provides:

  • Data conversion from ASE Atoms to graph data (AtomsGraph)
  • Training pipeline for diffusion models over positions and atom types
  • Sampling pipeline from trained checkpoints (with optional templates)
  • CLI and Python functional API for reproducible workflows

Installation

Minimal install:

pip install "agedi @ git+https://github.com/nronne/agedi.git"

This installs the core package only. For the current release, training and sampling require PaiNN via SchNetPack:

pip install "agedi[full] @ git+https://github.com/nronne/agedi.git"

For contributors:

pip install -e ".[test,full]"

Quickstart (CLI)

# Train (example: 3 hours, surface/slab system)
agedi train -t 3 --noisers ConfinedCellPositions --mask MaskFixed --confinement 2 10 PdO_training_data.traj

# Inspect saved hyperparameters
agedi inspect logs/version_0

# Sample structures
agedi sample logs/version_0 -f Pd2O2 --template_path template.traj --confinement 2 10

# Predict energies and forces (requires model trained with --force_field)
agedi predict logs/version_0 structures.traj

Quickstart (Python API)

from ase.io import read
from agedi import train_from_atoms, sample, AtomsGraph

data = read("PdO_training_data.traj", ":")
diffusion, dataset, trainer = train_from_atoms(
    data,
    noisers=("Positions",),
    style="surface",
    mask="MaskFixed",
    confinement=(2.0, 10.0),
    max_time=3,
)

template = AtomsGraph.from_atoms(read("template.traj"), confinement=(2.0, 10.0))
structures = sample(diffusion, n_samples=8, formula="Pd2O2", template=template)

To additionally train a force-field and run predictions:

from ase.io import read, write
from agedi import train_from_atoms, load_diffusion, predict

data = read("PdO_training_data.traj", ":")  # must contain forces and energy
diffusion, _, _ = train_from_atoms(data, noisers=("CellPositions",), force_field=True)

# Later, predict on new structures
diffusion = load_diffusion("logs/version_0")
predicted = predict(diffusion, read("structures.traj", index=":"))
write("predicted.traj", predicted)

Documentation map

The documentation has dedicated pages for:

  • System overview and code architecture
  • Installation and environment setup
  • CLI and Python workflows
  • End-to-end PdO tutorial
  • Pitfalls and troubleshooting
  • Publication references and citation text
  • API reference (auto-generated)

References

Citation

If you use AGeDi in research, please cite the paper above and the AGeDi preprint.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agedi-1.3.2.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agedi-1.3.2-py3-none-any.whl (162.9 kB view details)

Uploaded Python 3

File details

Details for the file agedi-1.3.2.tar.gz.

File metadata

  • Download URL: agedi-1.3.2.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agedi-1.3.2.tar.gz
Algorithm Hash digest
SHA256 14a2e21d884c400a210d5f51d626a328f09d43c739791c8e13fc09ffca2f4650
MD5 f974731a95b581028e77c21f73b50e3b
BLAKE2b-256 07e31901dbf1f410b4040f60c225d083b02de6aef4ead8ce8e4c5bd2e15caac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for agedi-1.3.2.tar.gz:

Publisher: publish.yml on nronne/agedi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agedi-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: agedi-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 162.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agedi-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a2723bcd9194d6b178fcddcbc165077dc4325208aa922c54f7a9779f8b571f7
MD5 2d9f7074677320228f62c1019c3be1b2
BLAKE2b-256 ac71527f056e076075745c73f3a7ac1f404f492021164e18d95a315e64296c21

See more details on using hashes here.

Provenance

The following attestation bundles were made for agedi-1.3.2-py3-none-any.whl:

Publisher: publish.yml on nronne/agedi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.4.0

2 files

This release

1.3.2 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 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