S23D-B
S23D-B generates 3D conformers of molecules from SMILES. It is the base model from the preprint A standard transformer and attention with linear biases for molecular conformer generation by Viatcheslav Gurev and Timothy Rumbell. Code: https://github.com/IBM/S23D
Usage
Create a conda environment and install the smiles23d package from GitHub
(Python 3.11 or later):
conda create -n s23d python=3.11 -y
conda activate s23d
git clone https://github.com/IBM/S23D.git
cd S23D
pip install .
Generate conformers:
from rdkit import Chem
from smiles23d.huggingface import S23DDiffusionHF
model = S23DDiffusionHF.from_pretrained("ibm-research/S23D.25m.v1", map_location="cuda") # or "cpu"
model.eval()
model.set_predict_parameters(kind="VPSDE", n_steps=300) # 300 steps, as in the paper
conformers = model.predict("CC(=O)Nc1ccc(O)cc1", samples_per_molecule=10)
# conformers[0] is a list of RDKit molecules, one conformer each.
with Chem.SDWriter("conformers.sdf") as writer:
for m in conformers[0]:
writer.write(m)
predict also takes an RDKit molecule or a list of SMILES strings or molecules.
The README describes its options and
the GEOM-DRUGS evaluation with s23dtest.
Model
A diffusion model whose score network is a standard, non-equivariant transformer. A graph encoder turns atom tokens and the 2D molecular graph into atom representations, and a structural module combines them with the 3D coordinates to predict the score. Graph structure enters attention as a negative bias that grows linearly with the shortest-path distance between atoms, with a different slope per head.
| Graph encoder blocks | 1 |
| Structural module blocks | 13 |
| Hidden size | 384 |
| Attention heads | 12 |
| Parameters | 24,813,702 |
Training
GEOM-DRUGS as preprocessed by MCF, 20
conformers per molecule, in two stages: 100 epochs on molecules without
hydrogens, then 30 epochs on complete molecules. This checkpoint is epoch 129.
AdamW, learning rate 1e-4, weight decay 1e-3, 2 GPUs, global batch 128. Configs:
configs/s23d_b_stage1.yaml and configs/s23d_b_stage2.yaml.
Evaluation
Results from the preprint for S23D-B-1/13 (S) on GEOM-DRUGS test_1000: 2K
generated conformers for a molecule with K reference conformers, 300 diffusion
steps, heavy-atom RMSD after alignment, coverage threshold 0.75 Ã…, no chirality
correction. Mean / median:
| Recall COV (%) ↑ | Recall AMR (Å) ↓ | Precision COV (%) ↑ | Precision AMR (Å) ↓ |
|---|---|---|---|
| 84.5 / 91.7 | 0.420 / 0.387 | 62.5 / 63.4 | 0.690 / 0.626 |
The benchmark data is in
ibm-research/S23D.GEOM.processed; the evaluation
needs only its zarr/test_1000 and index/eval_index/test_1000 folders.
Citation
@misc{gurev2025standard,
title = {A standard transformer and attention with linear biases for molecular conformer generation},
author = {Gurev, Viatcheslav and Rumbell, Timothy},
year = {2025},
eprint = {2506.19834},
archivePrefix = {arXiv},
primaryClass = {q-bio.BM},
url = {https://arxiv.org/abs/2506.19834}
}
License
Apache License 2.0.
- Downloads last month
- 4