> This page is for GenMol, version 2.0.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 2.0.0 (Latest) (default): https://docs.nvidia.com/nim/bionemo/genmol/2.0.0/llms.txt
> - 1.0.1: https://docs.nvidia.com/nim/bionemo/genmol/1.0.1/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/bionemo/genmol/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/bionemo/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nim/bionemo/_mcp/server.

# Overview

## Introduction

GenMol is a masked diffusion model trained on **S**equential **A**ttachment-based **F**ragment **E**mbedding (SAFE)<sup>[1](https://arxiv.org/abs/2310.10773)</sup> representations for fragment-based molecule generation, which can serve as a generalist model for various drug discovery tasks. As the most important feature of GenMol compared to other molecular generation models, the use of SAFE format enables users to design a template for a generation schema, such as:

1. Specifying fixed fragment(s), which will remain unchanged in generation.
2. Specifying specific positions that generated fragments will attach to.
3. Generating a partial or full fragment or generating multiple fragments.
4. Generating fragments at any range of lengths specified.

The inference by this model is a masking-unmasking process inspired by the idea of **masked discrete diffusion**<sup>[2](https://arxiv.org/abs/2406.07524)</sup>. It accepts a SAFE-formatted text sequence (representing a molecule) with some fragments masked (represented by asterisk symbols) and translates it into tokens (with masking tokens) before supplying it to the Transformer/BERT-based neural network model. In each forward pass, the model will try to predict the tokens at all masked positions, and only one or a few tokens with the highest probit values will be picked in a step, which will be repeated until all masking positions are recovered.

## Applications

GenMol can be applied for a variety of scenarios for molecular generation:

* **De Novo generation**​ - random sampling of valid molecular sequences with certain lengths.
* **Conditioned generation** - sequence completion from a given molecular structure, such as:
  * Motif extension and scaffold decoration - Adding a new fragment sequence to a specified attachment point in a molecule.
  * Superstructure generation - Adding a new fragment sequence to any of the possible attachment points (randomly) in a molecule.
  * Linker design - Generation of a sequence linking two separated molecular fragments on specified attachment points.
  * One-step linker design - Direct generation of a linker connecting two specified fragments in a single inference pass. v2 substantially improves the success rate over v1.
* **Molecule optimization** with Oracle methods, such as:
  * Hit-generation - Screening drug candidates generated from a library of molecular fragments for effective binding affinity to the target.
  * Lead-optimization - Sampling molecules from a pre-identified lead compound with improved drug-like properties, such as [ADMET](https://en.wikipedia.org/wiki/ADME).

## NIM Features

The GenMol model is wrapped and delivered as [NVIDIA Inference Microservice (NIM)](https://developer.nvidia.com/blog/nvidia-nim-offers-optimized-inference-microservices-for-deploying-ai-models-at-scale/) with the following features:

* **Scalable deployment** - GenMol NIM is a Docker image that you deploy to supported Linux systems with NVIDIA GPUs. You can scale it to more GPUs by running one container instance per GPU.

* **Standard API** - GenMol inferences are OpenAPI standard requests to the HTTP(S) endpoints of a NIM hosted in the [NVIDIA API Catalog](https://docs.api.nvidia.com/nim/reference/nvidia-genmol-infer) or self-deployed on premises. You can integrate it into pipelines and workflows for molecular design.

* **Enterprise-level optimization and support** - NIM products are optimized for the performance, reliability, and security of AI inference, and NVIDIA monitors and patches CVEs in them.

* **NIM telemetry support** - Optional telemetry controls help improve deployment reliability and compatibility while preserving user privacy.

![Example output](/nim/bionemo/_fern-files/_img/f125c98e7c5ebaa0838bd29b3c2b554f25470c2144b4f2ee2521e53a270ca33b.webp)

<Note>
A more detailed description of the model is in the [Model Card](https://build.nvidia.com/nvidia/genmol-generate/modelcard).
</Note>

## References

<sup>1</sup> **Gotta be SAFE: A New Framework for Molecular Design**, Noutahi et al, 2023. [Link](https://arxiv.org/abs/2310.10773)

<sup>2</sup> **Simple and Effective Masked Diffusion Language Models**, Sahoo et al, 2024. [Link](https://arxiv.org/abs/2406.07524)