Smooth, chiral 3D molecular descriptors from atomistic foundation models
Project description
Rem3Di: REpresentation learning for Molecules with 3D Information
Steffen Wedig · Felix Burton · Rokas Elijošius* · Christoph Schran* · Lars L. Schaaf*
Paper Link
Documentation
📖 Full usage docs — installation, quickstart, evaluating models, training downstream heads, training from scratch, and concepts — are online at https://molsuit.github.io/Rem3Di/.
Setup
- pip install from pyproject.toml
- Additionally clone and install a torch-sim fork from https://github.com/steffen-wedig/torch-sim
Raw dataset download
We work with a number of different datasets for benchmarking Rem3Di.
Scripts to download these datasets from can be found in scripts/dataset_download. All scripts take the target destination folder as their first argument.
Example: Geom Drugs can be downloaded by:
mkdir raw_datasets
bash scripts/dataset_download/download_geomdrugs.sh ./raw_datasets
Generating a MoleculeDataset for Training
TL;DR: We generate molecular datasets containing molecular structures and their mace descriptors from various sources, examples can be found in scripts/dataset_creation.
Dataset Overview
MoleculeDatasets (remedi/data_handling/dataset/molecule_dataset.py) is the object that contains all embedding and structural data for our molecular datasets. The datasets can further contain system wide, molecular labels, or atomwise labels, which can be used for training regression models. Our datasets are backed by zarr arrays(Design motivitation: multithreaded read access from disk, when dataset size exceeds memory limit). As the size of molecules varies, the MoleculeDataset contain pointer values that point to the molecules atom limits.
Dataset Generation
Dataset generation is implemented batchwise to increase performance, as GPU memory can be fully utilized in this way. The pipeline goes through the following stages.
- MoleculeGenerators yield batches of smiles or processed ase atoms, in case the molecular structures are available in the datasets. For a new data source, like a new dataset that stores molecular data in its own way, you need to implement a new MoleculeGenerator.
- Configurable Orchestrator will execute the pipeline. E.g. perform conformal sampling, relaxation. Lastly, the mace descriptors will be configured
- Everything (Embeddings, structures, optional system wide or atom wise regression labels) will be shoved into the right zarr arrays in the MoleculeDataset.
Running Pretraining
- Create a training dir with a training_config.yaml and architecture_config.yaml or generate the architecture_config.yaml with the scripts/write_config_file.py script. In the train dir
- Run pretrainig via scripts/scripts/run_denoising_pretraining.py --train_dir "dir"
One note re. training: For training we create new dataset object (class TrainingMoleculeDataset). This contains additionally logic how multiple dataloader workers can simulatounsly retireve data from the same zarr files.
Using Pretrained Model
import torch
from remedi.configuration.architecture_config import EncoderOnlyArchitectureConfig
from remedi.evaluation.evaluation_utils import evaluate_molecular_descriptor_on_dataset
from remedi.data_handling.dataset.training_dataset import (
TrainingMoleculeDataset,
pos_emb_getitem,
)
ds = TrainingMoleculeDataset(training_config.dataset_path, get_item=pos_emb_getitem)
model = EncoderOnlyArchitectureConfig.from_directory(model_dir).build()
model.encoder.load_state_dict(torch.load(f"{model_dir}/encoder.pth"))
model.preprocessor.atomic_preprocessor.load_state_dict(
torch.load(f"{model_dir}/atomic_preprocessor.pth")
)
model.preprocessor.geometric_preprocessor.load_state_dict(
torch.load(f"{model_dir}/geometric_preprocessor.pth")
)
remedi_descriptors = evaluate_molecular_descriptor_on_dataset(model, ds)
Citation
If you use any of this code in your work, please cite our paper (OpenReview):
Wedig, Steffen, et al. "REM3DI: Learning smooth, chiral 3D molecular representations from equivariant atomistic foundation models." NeurIPS 2025 Workshop on Symmetry and Geometry in Neural Representations. 2025.
@inproceedings{wedig2025rem3di,
title={REM3DI: Learning smooth, chiral 3D molecular representations from equivariant atomistic foundation models},
author={Wedig, Steffen and Elijo{\v{s}}ius, Rokas and Schran, Christoph and Schaaf, Lars Leon},
booktitle={NeurIPS 2025 Workshop on Symmetry and Geometry in Neural Representations},
year={2025}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remedi-0.1.0.tar.gz.
File metadata
- Download URL: remedi-0.1.0.tar.gz
- Upload date:
- Size: 802.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c167506317102e729284ad454b3ac9730e5c960a2fabab5dc9e798ecad2be1b9
|
|
| MD5 |
39f1fb3012d75543ca3dea061fdc45ab
|
|
| BLAKE2b-256 |
8a1d373fbf77b5b4e478879111ca053f279c3d689851de39401cb853d1014847
|
Provenance
The following attestation bundles were made for remedi-0.1.0.tar.gz:
Publisher:
release.yml on molsuit/Rem3Di
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remedi-0.1.0.tar.gz -
Subject digest:
c167506317102e729284ad454b3ac9730e5c960a2fabab5dc9e798ecad2be1b9 - Sigstore transparency entry: 2167756311
- Sigstore integration time:
-
Permalink:
molsuit/Rem3Di@b2574870bb4d10b00693b6af24661d25a30b9e84 -
Branch / Tag:
refs/tags/v0.1.0.1 - Owner: https://github.com/molsuit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b2574870bb4d10b00693b6af24661d25a30b9e84 -
Trigger Event:
push
-
Statement type:
File details
Details for the file remedi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: remedi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 306.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
144518fc96b82cf7dcb07169bf7d6934d966f452d4325afcb7a1cdac6f20facb
|
|
| MD5 |
b71403a29d6c7486eb802b1fb38849ed
|
|
| BLAKE2b-256 |
31ddb04fcb15476e736e6fab2371a4c1bffbbce9d016e594cdc6a86854a6edac
|
Provenance
The following attestation bundles were made for remedi-0.1.0-py3-none-any.whl:
Publisher:
release.yml on molsuit/Rem3Di
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remedi-0.1.0-py3-none-any.whl -
Subject digest:
144518fc96b82cf7dcb07169bf7d6934d966f452d4325afcb7a1cdac6f20facb - Sigstore transparency entry: 2167756329
- Sigstore integration time:
-
Permalink:
molsuit/Rem3Di@b2574870bb4d10b00693b6af24661d25a30b9e84 -
Branch / Tag:
refs/tags/v0.1.0.1 - Owner: https://github.com/molsuit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b2574870bb4d10b00693b6af24661d25a30b9e84 -
Trigger Event:
push
-
Statement type: