OInvFold
Pre-trained models for polymer inverse folding and provisional ligand atom-element assignment from fixed coordinates.
Disclaimer
This is an UNOFFICIAL implementation of the OInvFold models released with ODesign: A World Model for Biomolecular Interaction Design by Odin Zhang, et al.
The OFFICIAL repository of OInvFold is at The-Institute-for-AI-Molecular-Design/ODesign.
OFoldX uses centroid-based virtual global nodes with actual relative rotations and translations. The released polymer preparation supplies constant identity/zero global features instead. This changes checkpoint predictions; inference quality requires separate evaluation.
The team releasing OInvFold did not write this model card for this model so this model card has been written by the OFoldX team.
Model Details
OInvFold predicts protein, DNA, or RNA identities, or ligand atom elements, from fixed coordinates. Polymer and ligand checkpoints use separate graph models with geometric message passing. Polymer decoding produces molecular sequence designs; ligand decoding produces ordered element assignments with unresolved bonds, formal charges, and chemical component identities.
Please refer to the Training Details section for more information on the training process.
Variants
- oteam/oinvfold-protein: Protein sequence design.
- oteam/oinvfold-dna: DNA sequence design.
- oteam/oinvfold-rna: RNA sequence design.
- oteam/oinvfold-ligand: Provisional ligand atom-element assignment.
Each repository pairs the model's output-class convention with its processor's coordinate and chemistry convention.
Model Specification
| Variant | Hidden Size | Encoder Blocks | Attention Heads | Virtual Atoms | Released Output Classes | Num Parameters (M) |
|---|---|---|---|---|---|---|
| Polymer | 128 | 12 | 4 | 32 | 25 | 8.374 |
| Ligand | 128 | 12 | 4 | 32 | 37 | 6.429 |
Links
- Code: ofoldx.models.oinvfold
- Paper: ODesign: A World Model for Biomolecular Interaction Design
- Developed by: The ODesign authors
- Model type: Geometric graph models for polymer inverse folding and ligand atom-element assignment
- Original Repository: The-Institute-for-AI-Molecular-Design/ODesign
Usage
The model file depends on the ofoldx library. You can install it using pip:
pip install ofoldx
Direct Use
Polymer Inverse Folding
You can use this model directly with a pipeline for protein inverse folding from a fixed backbone:
import ofoldx
from ofoldx.io import read_structure
structure, _ = read_structure("backbone.cif")
pipeline = ofoldx.pipeline("design", model="oteam/oinvfold-protein")
result = pipeline(structure, use_beam=True, num_beams=4)
Each candidate contains its molecular target, design record, and total and mean log probabilities. Greedy decoding returns one candidate; beam decoding returns candidates in rank order.
Ligand Element Assignment
You can use this model directly with a pipeline for element assignment to the observed atoms of a known ligand:
import ofoldx
from ofoldx.io import read_structure
structure, _ = read_structure("ligand.cif")
pipeline = ofoldx.pipeline("design", model="oteam/oinvfold-ligand")
result = pipeline.design_from_structure(structure)
Candidates retain atom identifiers and coordinates with predicted elements and probabilities. Bond topology, formal charge, and canonical component identity remain unresolved; the output is a provisional atom assignment.
Downstream Use
Provisional Atom Coordinates
Call OInvFoldLigandPipeline.design with coordinates and
caller-defined slot_ids when the atoms do not yet belong to a canonical molecular graph. The returned assignments keep
those identifiers and unresolved connectivity.
See the pipeline guide for staged execution with prepare, forward, and postprocess.
Training Details
OInvFold uses structure-conditioned graph models for polymer identity prediction and ligand atom-element assignment.
Training Data
The polymer and ligand checkpoints were released with ODesign. Please refer to the ODesign paper for training data and curation.
Training Procedure
OInvFold applies graph corruption in each encoder block during training.
OFoldX exposes differentiable polymer and ligand encode and forward operations, and
OInvFoldLoss provides masked polymer negative log likelihood. The ligand graph
has no target atom-identity supervision interface. Dataset construction and complete upstream training orchestration
remain the training application's responsibility.
Citation
@misc{zhang2025odesign,
title={ODesign: A World Model for Biomolecular Interaction Design},
author={Zhang, Odin and Zhang, Xujun and Lin, Haitao and others},
year={2025},
eprint={2510.22304},
archivePrefix={arXiv},
primaryClass={q-bio.BM}
}
The artifacts distributed in this repository are part of the OFoldX project. If OFoldX supports your research, please cite the OFoldX project as follows:
@software{chen2026ofoldx,
author = {Chen, Zhiyuan},
title = {OFoldX},
year = {2026},
url = {https://github.com/OTeam-AI4S/OFoldX},
}
Contact
Please use GitHub issues of OFoldX for any questions or comments on the model implementation or model card.
Please contact the authors of the ODesign paper for questions or comments on the paper/model.
License
The model weights, implementation, configuration, and documentation distributed by OFoldX are licensed under the GNU Affero General Public License.
For additional terms and clarifications, please refer to our License FAQ.
SPDX-License-Identifier: AGPL-3.0-or-later