Atom-JEPA
Embeddings from the pretrained encoders of Atom-JEPA: Joint-Embedding Predictive Architecture for 3D Atomistic Systems.
Atom-JEPA is a self-supervised pretraining method for 3D atomistic systems. It learns by predicting the latent representations of one part of a structure from another, and the same recipe applies to both molecules and crystals. This package loads the pretrained encoders and turns 3D structures into embeddings. Pretraining and fine-tuning code is in the GitHub repository.
Update (Nov 2026): Atom-JEPA-Bio builds on Atom-JEPA with a second pretraining stage that combines the Atom-JEPA objectives with bioassay supervision on roughly 1.5M PCBA molecules. Load it with
from_pretrained("bio"). See the project page.
Installation
Install PyTorch first (pytorch.org), then:
pip install atom-jepa # structures as arrays or ase.Atoms
pip install "atom-jepa[rdkit]" # + SMILES input
pip install "atom-jepa[all]" # + SMILES and pymatgen input
pip install "atom-jepa[cu12]" # + cuEquivariance GPU kernels for CUDA 12 ([cu13] for CUDA 13)
Extras combine, e.g. "atom-jepa[all,cu12]"; python -m atom_jepa.info shows what your
machine supports and which kernel extra matches your PyTorch.
Usage
from atom_jepa import AtomJEPA
model = AtomJEPA.from_pretrained("molecules") # or "crystals", "bio"
emb = model.embed("CC(=O)Oc1ccccc1C(=O)O") # one structure -> [256]
embs = model.embed(["CCO", "c1ccncc1"]) # a list -> [2, 256]
The weights are downloaded from huggingface.co/atom-jepa/atom-jepa on first use and cached locally. A path to a local checkpoint also works.
| name | domain | pretraining data |
|---|---|---|
molecules |
molecules | Uni-Mol, 19M molecules |
crystals |
inorganic crystals | Alexandria PBE 3D, 1.7M crystals |
bio |
molecules | molecules, then a second stage with PCBA bioassays (~1.5M molecules, 1,089 assays) |
embed accepts any of these as one structure, or a list of them:
| input | notes |
|---|---|
| SMILES string | one RDKit ETKDGv3 + MMFF94 conformer, hydrogens added (needs [rdkit]) |
ase.Atoms |
periodic if any of its pbc flags is set |
pymatgen Structure / Molecule |
crystals / molecules (needs [pymatgen]) |
(atomic_numbers, positions[, cell]) |
positions in Angstrom; cell with lattice vectors as rows |
{"atomic_numbers", "node_coordinates"[, "cell"]} |
the same as a dict |
For several conformers per molecule, use
atom_jepa.conformers.smiles_to_samples(smiles, num_conformers=10) and embed the list.
Feature options
model.embed(smiles, layers="all") # [S, 8, 256] output of each of the 8 blocks
model.embed(smiles, layers=[4, 8]) # [S, 2, 256]
model.embed(smiles, degrees="all") # [S, 9, 256] l=0, l=1 (3), l=2 (5) components
model.embed(smiles, degrees="all", invariant=True) # [S, 3, 256] l=0 and per-channel norms of l=1, l=2
model.embed(smiles, layers="all", degrees="all") # [S, 8, 9, 256]
model.embed(smiles, per_atom=True) # list of [n_atoms, 256]
layers="last"(default) is the last block after the encoder's final norm; block numbers 1-8 and"all"are the block outputs before it.- Structure features are the mean over atoms. The l>0 components are equivariant: l=1
rotates like an (x, y, z) vector.
invariant=Truemakes them rotation invariant.
Fine-tuning
AtomJEPA is a torch.nn.Module: calling it on a batch returns differentiable features
(with the same options), so you can train your own head and fine-tune the encoder:
import torch
from torch.utils.data import DataLoader
from atom_jepa import AtomJEPA, to_sample
model = AtomJEPA.from_pretrained("molecules").train()
head = torch.nn.Linear(model.embedding_dim, 1).to(model.device)
data = [{**to_sample(s), "y": torch.tensor([y])} for s, y in zip(train_smiles, train_y)]
loader = DataLoader(data, batch_size=32, shuffle=True, collate_fn=model.collate)
opt = torch.optim.AdamW([{"params": model.parameters(), "lr": 1e-5},
{"params": head.parameters(), "lr": 1e-3}])
for batch in loader:
loss = torch.nn.functional.mse_loss(head(model(batch)), batch["y"].to(model.device))
opt.zero_grad(); loss.backward(); opt.step()
model.set_grad_checkpointing(True) trades compute for memory on large structures. The
paper's benchmark recipes are the fine-tuning scripts in the
GitHub repository.
Execution
On a CUDA GPU the encoder runs in bf16 and, if the kernels are installed, with cuEquivariance; otherwise it runs in plain fp32 PyTorch. The settings are printed when loading and can be set explicitly:
model = AtomJEPA.from_pretrained("molecules") # auto
# [atom-jepa] molecules: device=cuda, precision=bf16, cuequivariance=on, compile=off
# we recommend compile=True for larger jobs
model = AtomJEPA.from_pretrained("molecules", compile=True) # compile the blocks (CUDA)
model = AtomJEPA.from_pretrained("molecules", precision="fp32", cuequivariance=False) # plain
bf16 changes the embeddings slightly; use precision="fp32" for exact
fp32 features. Compiling adds a one-off cost on the first batches.
On GPUs older than Ampere (e.g. V100, T4), load with precision="fp32", cuequivariance=False;
the automatic choice can pick emulated bf16 and kernels these GPUs do not support.
License
The code is released under the MIT License. The pretrained models are released under CC BY 4.0.
Metadata
Release files for atom-jepa 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atom_jepa-0.4.0.tar.gz | 75.0 kB | With provenance | Details for atom_jepa-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atom_jepa-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for atom_jepa-0.4.0-py3-none-any.whl |
Total release size: 157.6 kB
Release files / atom_jepa-0.4.0.tar.gz
| Download URL | atom_jepa-0.4.0.tar.gz |
|---|---|
| Size | 75.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46fdc7045b895a3804f21aadcd731565d3c6a702ae7cc69002aadcc53d84e74c
|
|
BLAKE2b-256 checksum How to use checksums |
be7ae37658da2d924a76b7988f88b22d956b67cec9eb30f4dbcb2bdad4eedb50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logRelease files / atom_jepa-0.4.0-py3-none-any.whl
| Download URL | atom_jepa-0.4.0-py3-none-any.whl |
|---|---|
| Size | 82.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f56bc3a5de06baac150930bec36456cdd605b5709e9f72567e97c1cdcd7c3ab
|
|
BLAKE2b-256 checksum How to use checksums |
3bc7ce4f6171a944d077ec485634b012010e06758be780ae717300be24af3885
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logSecurity for atom-jepa 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for atom_jepa-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.