Practical overview
When it fits
Use MoLeR when a research workflow needs a programmable molecular graph generator, particularly when generated candidates should be conditioned on a specified scaffold. The repository also documents encoding, decoding, sampling and data-preparation stages.
Who it is for
- Computational chemistry researchers exploring generated molecular structures.
- Developers building research workflows for molecular graph generation, encoding or scaffold-conditioned decoding.
- Teams with SMILES datasets that want to preprocess data and train or fine-tune the model.
Documented uses
- Sample candidate molecular structures from a trained model.
- Generate molecular structures while supplying a scaffold constraint.
- Encode SMILES strings into latent vectors and decode vectors into molecular structures.
- Preprocess SMILES datasets into graph data and generation traces for model training.
Requirements & limits
The implementation is public on GitHub and identifies an MIT license. The README documents installation through pip and Conda environment files.
- The documented stack includes Python, TensorFlow and RDKit; GPU use additionally requires CUDA libraries.
- The CLI supports sampling and encoding, but the README says it does not expose all useful inference functionality; the Python interface documents encoding and decoding with scaffold inputs.
- The repository is archived, a relevant consideration for teams planning to maintain or adapt the implementation.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install MoLeR and prepare a checkpoint for sampling
Install the package and arrange the documented pretrained checkpoint for use with the sampling command.
Before you start
- Python 3.7 or later, TensorFlow 2.1.0 or later, and RDKit 2020.09.1 or later; the repository points to its Conda environment files for tested configurations.
- CUDA libraries are needed if using a GPU.
- A MoLeR checkpoint downloaded from the linked location.
Steps
Create and activate the environment with
conda env create -f environment.ymlandconda activate moler-env.Install the package with the command below.
pip install molecule-generationSave the checkpoint in a fresh model directory and rename it with a
.pklending.Run
molecule_generation sample MODEL_DIR 10, replacingMODEL_DIRwith that directory.
Expected outcome
The sampling command requests 10 molecules from the checkpoint in the specified model directory.
Guide limitations
- The model directory must contain exactly one
.pklcheckpoint for the documented model loader. - The README describes CLI inference as mainly intended for simple tests and notes that it does not expose all useful functionality.
Prepare SMILES files for MoLeR preprocessing
Set up the documented input layout for preprocessing molecular data into graph descriptions and generation traces.
Before you start
- A directory containing
train.smiles,valid.smilesandtest.smiles, each with one SMILES string per line. - The installed
molecule_generationpackage.
Steps
Place the three SMILES files in an input directory.
Choose separate directories for intermediate output and final generation traces.
Run
molecule_generation preprocess INPUT_DIR OUTPUT_DIR TRACE_DIR, substituting the chosen directory paths.
Expected outcome
The preprocessing stage produces processed molecular graph data and generation traces for the subsequent training workflow.
Guide limitations
- The generation-trace stage is described as typically the most compute-intensive part of preprocessing.
- The README notes that some molecules may fail parsing or trace generation.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- microsoft/molecule-generation · Official homepage title · retained in its source language

