Skip to main content

    RXNFP

    Generate reaction fingerprints and search a reference reaction index by similarity with an RXNBERT transformer model.

    rxnfp

    RXNFP encodes a chemical reaction into a fixed-length fingerprint vector, letting you compare and search reactions by their transformation pattern. Reach for it when you need raw similarity or machine-learning features over reactions rather than named categories. Where Reaction Classifier returns human-readable reaction names, RXNFP returns the underlying vectors — and Reaction Classifier falls back to RXNFP's similarity search when its own classifier is uncertain. See what you can achieve for the full set.

    RXNFP overview

    RXNFP generates a 256-dimensional vector representation of a chemical reaction from its reaction SMILES, using a fixed RXNBERT transformer model. The fingerprint enables cosine-similarity comparison between reactions, and a separate similarity-search tool looks up a query reaction against a pre-built reference index.

    Two tools cover this:

    • Fingerprinting (rxnfp / rxnfp_fingerprint) — turn one or more reaction SMILES into fingerprint vectors.
    • Similarity search (rxnfp_similarity) — take a single query reaction and return the top-k most similar reactions from a reference index built from ORDerly reaction data, above a minimum similarity threshold.

    How it works

    A reaction SMILES is encoded by RXNBERT into a 256-D fingerprint, returned directly or used to search a reference index of known reactions.

    The reaction SMILES is tokenized and processed through the RXNBERT transformer. The hidden state is pooled into a fixed 256-dimensional float vector that captures the chemical transformation pattern. Similar reactions produce similar vectors.

    When to use RXNFP

    Use fingerprinting (rxnfp_fingerprint) when:

    • You need a fixed-length reaction representation as an ML feature.
    • You want to cluster or visualize a reaction set yourself, downstream of the platform.

    Use similarity search (rxnfp_similarity) when:

    • You want the most similar known reactions to a novel transformation, ranked by cosine similarity.
    • You are chaining from Reaction Classifier's low-confidence fallback path.

    Use Reaction Classifier instead when:

    • You need named reaction categories (e.g., "Suzuki coupling").
    • You need atom mapping or reaction templates.
    • You need condition suggestions from literature.

    Limitations

    • Fingerprints encode the overall transformation but may not distinguish subtle regiochemistry differences.
    • Very long reaction SMILES are truncated at the tokenizer's limit, which may lose information.
    • rxnfp_similarity searches a fixed reference index (built from ORDerly reaction data); it does not compute a pairwise matrix across an arbitrary set of reactions you submit.
    • The model was trained primarily on organic chemistry reactions; inorganic and enzymatic reactions may produce less meaningful fingerprints.

    Citations

    Schwaller P, Probst D, Vaucher AC, Nair VH, Kreutter D, Laino T, Reymond JL. Mapping the Space of Chemical Reactions Using Attention-Based Neural Networks. Nat Mach Intell. 2021;3:144-152. doi: 10.1038/s42256-020-00284-w

    Chat Usage

    Example Prompts

    • "Generate a reaction fingerprint for CC(=O)Cl.OCC>>CC(=O)OCC"
    • "Find the most similar reaction in the database to this novel transformation"

    Workflow Chaining

    • Feeds into: ML feature engineering, similarity search
    • Accepts from: AiZynthFinder (retrosynthetic step SMILES), Reaction Classifier (low-confidence fallback)

    FAQ

    Was this page helpful?

    On this page

    On this page

    Loading...