Use MoFlow Online
Commercially Available MoFlow No-Code Web Server
MoFlow: Flow-Based Molecular Graph Generation for De Novo Drug Design
MoFlow is a flow-based graph generative model that learns invertible mappings between molecular graphs and latent representations, so it can generate new molecules, reconstruct existing ones and optimize their properties. It was introduced by Chengxi Zang and Fei Wang and presented at KDD 2020. MoFlow is available to run on Tamarind Bio without any local setup.
Generating chemically valid molecular graphs is hard. Chemical constraints such as atom valency and the combinatorial size of molecular space make it difficult for a model to propose molecules that are both novel and realistic.
MoFlow addresses this with a one-shot approach. Instead of building a molecule atom by atom, it generates the whole graph in a single pass and then applies a validity correction, while keeping exact and tractable likelihood training.
Attribute | Detail |
|---|---|
Model type | Invertible flow model for molecular graphs |
Generation order | Bonds first (Glow-based), then atoms conditioned on bonds |
Training datasets | QM9 (133,885 molecules) and ZINC250K (249,455 molecules) |
Tasks | Generation, reconstruction, latent-space visualization, property optimization, constrained optimization |
Venue | KDD 2020 |
How MoFlow Generates Molecules with Invertible Graph Flows
The model factorizes a molecule into its bonds and its atoms and learns each part with a normalizing flow.
Bond generation: a Glow-style flow with affine coupling layers, invertible 1x1 convolutions and actnorm models the bond tensor.
Atom generation: a novel graph conditional flow, built on relational graph convolutions, generates atoms conditioned on the bonds.
Graph assembly: atoms and bonds are combined into a molecular graph.
Validity correction: if an atom exceeds its valency, the highest-order bond is reduced step by step until the molecule is valid, and the largest connected component is returned.
Because the mapping is invertible, every training molecule can be encoded and decoded back, which gives the reconstruction rate of 100% reported in the paper.
MoFlow Benchmark Results for Validity, Uniqueness and Novelty
The authors report average results over 5 runs of 10,000 generated molecules, using a sampling temperature of 0.85.
Dataset | Validity (with correction) | Validity (no correction) | Uniqueness | Novelty | Reconstruction |
|---|---|---|---|---|---|
QM9 | 100.00% | 96.17% | 99.20% | 98.03% | 100.00% |
ZINC250K | 100.00% | 81.76% | 99.99% | 100.00% | 100.00% |
Property optimization
For molecular property optimization, a small neural network regresses a property from the latent code, and gradient ascent in latent space is followed by decoding. On the QED task MoFlow's top four novel molecules each reach 0.948, matching the best values reported in the comparison.
Constrained optimization
For penalized logP optimization under a similarity constraint, MoFlow reaches success rates of 98.88%, 96.75%, 85.75% and 58.25% at similarity thresholds of 0.0, 0.2, 0.4 and 0.6. The authors report the best similarity scores and the second-best property improvements among compared methods.
What is Tamarind Bio?
Tamarind Bio is a no-code bioinformatics platform built to give life scientists and researchers access to powerful computational tools. Many cutting-edge machine learning models are hard to deploy and use. Tamarind provides an intuitive, web-based environment that removes the complexity of high-performance computing, software dependencies and command-line interfaces.
The platform is designed for biologists, chemists and other researchers who may not have a background in programming or cloud infrastructure but want to run models on their own data. Key features include:
A user-friendly graphical interface for setting up and launching experiments
A robust API for integration into existing research pipelines
An automated system for managing and scaling computational resources
Tamarind treats information and data security as a top priority, as detailed in its Trust Center and Terms of Service.
Accelerating Discovery with MoFlow on Tamarind Bio
De novo molecule generation: sample large sets of novel, valid, drug-like molecular graphs from a model trained on QM9 or ZINC250K.
Property-guided optimization: steer latent codes toward higher values of a property such as QED or penalized logP.
Constrained lead optimization: improve a property of an existing molecule while keeping it similar to the starting structure.
Latent-space exploration: encode molecules into the latent space to visualize and interpolate between them.
How to Use MoFlow on Tamarind Bio
Log in and open the tool: sign in at tamarind.bio and select MoFlow from the tool list.
Choose the task: pick generation, or an optimization task if exposed, since the paper covers both.
Select the training dataset: choose the QM9 or ZINC250K model if exposed, which sets the molecule size and atom types.
Provide inputs: for optimization, supply a starting molecule as a SMILES string if exposed.
Set parameters: adjust the number of molecules and the sampling temperature if exposed; the paper uses 0.85.
Run the job: launch it and monitor progress from your Tamarind dashboard.
Download outputs: retrieve the generated molecules and any scores from the results page.
Use results downstream: filter candidates with docking, ADMET or property predictors on Tamarind Bio.
Things to Keep in Mind
Without the post-hoc validity correction, validity is below 100% (96.17% on QM9 and 81.76% on ZINC250K).
The correction changes the generated molecule and keeps only the largest connected component.
Formal charges are handled only for N+, S+ and O+, and molecules are kekulized with hydrogens removed and three bond types.
On constrained optimization, success rates are lower than GCPN and GraphAF at each similarity threshold, and property gains are second-best.
Source: Chengxi Zang and Fei Wang, MoFlow: An Invertible Flow Model for Generating Molecular Graphs, KDD 2020. arXiv:2006.10137, DOI 10.1145/3394486.3403104. Paper: https://arxiv.org/abs/2006.10137. Code: https://github.com/calvin-zcx/moflow