Overview
RxnMapper is a model-backed atom-mapping resource for chemical reaction representations. Its README describes mapping information learned by an ALBERT model trained without supervision on a large reaction dataset. The documented task is to establish atom correspondences in supplied reactions, rather than to predict products from reactants. It therefore fits a reaction-data preparation or analysis workflow in which the reaction is already represented as SMILES.
The Python interface accepts a list of reaction SMILES through RXNMapper and its get_attention_guided_atom_maps method. Results contain an atom-mapped reaction under mapped_rxn and a numerical confidence value. The examples show reactant-side mixtures and product structures, with atom identifiers assigned across the reaction. A separate BatchedMapper interface handles batching automatically and offers either mapped strings or dictionaries containing mapping information.
The basic mapping capability is described for valid reaction SMILES. For batch processing, the README documents non-raising error handling: an invalid example produces >> or an empty dictionary rather than an exception. Downstream processing should therefore distinguish those fallback outputs from usable mappings. The excerpts do not establish confidence calibration, accuracy on a particular chemistry domain, or throughput. The repository also links a publication, browser demo, and data location; its code licence should not be treated as evidence of terms for separately hosted data, model weights, or services.
Key Features
- Attention-guided atom mapping based on an ALBERT model trained without supervision on chemical reactions.
- Python mapping interface accepting lists of reaction SMILES and returning `mapped_rxn` and `confidence` fields.
- Automatic batching through `BatchedMapper`, with a configurable `batch_size`.
- Separate batch methods for mapped reaction strings and dictionaries containing mapping information.
- Documented batch error handling that returns `>>` or an empty dictionary for an invalid reaction instead of raising an exception.
Use Cases
- Intended evaluation: prepare atom-mapped reaction records for downstream cheminformatics analyses that require reactant–product atom correspondences.
- Intended evaluation: process a reaction collection in batches and separate failed mappings from usable outputs before further analysis.
- Intended evaluation: compare returned mappings and confidence values with expert-checked reactions from a target chemistry domain, without assuming the scores are calibrated.
How to Use
- Read the official README to confirm the input format and choose between the basic and batched interfaces. The demo provides a separate route for trying the resource.
- Follow the README’s pip or source-installation instructions in a suitable Python environment. Its RDKit extra can be omitted when RDKit is already available; no compatibility range is established by the source excerpts.
- Prepare a small list of valid reaction SMILES containing the supplied reactant and product structures. Begin with records whose expected atom correspondences can be inspected independently.
- Use
RXNMapperwithget_attention_guided_atom_maps, then inspect the returnedmapped_rxnandconfidencefields. For automatic batching, chooseBatchedMapperand eithermap_reactionsormap_reactions_with_infoaccording to the desired output format. - Check batch results for
>>or empty dictionaries before downstream use. As an intended evaluation step, compare mappings against curated examples; consult the linked publication for scientific context.