How asad/reactiondecoder works
Project type and purpose
• This is an open-source, Java/Maven-based command-line & API toolkit (“Reaction Decoder Tool – RDT”) for chemical reaction analysis. It provides three core functions:
a. Atom–Atom Mapping (AAM)
b. Reaction Annotation (identify bond changes & reaction centres)
c. Reaction Comparison (compute reaction similarity)
High-level layers and directories
• Presentation/CLI layer
• uk.ac.ebi.aamtool (“ReactionDecoder”, “Annotator”, “CommandLineOptions”)
• Standardization & parsing
• org.openscience.cdk.smiles, uk.ac.ebi.aamtool.ChemicalFormatParser, StandardizeReaction
• Mapping engine
• org.openscience.smsd (algorithms: McGregor, MCS+, VF2, r-graph, etc.)
• uk.ac.ebi.reactionblast.mapping (GameTheory, block mapping, cache…)
• Mechanism analysis
• uk.ac.ebi.reactionblast.mechanism (bond‐change calculators, reaction centre annotator)
• Fingerprinting & similarity
• uk.ac.ebi.reactionblast.fingerprints & signature
• IO & data layer
• tools/rxnfile (RXN reader/writer), interfaces/IDataSource, IDataStore
• External dependency
• CDK (org.openscience.cdk) for molecular objects
• Test suite
• src/test/java – unit/integration tests for mapping and AAM
Core components and interactions
1. User invokes java –jar ReactionDecoder.jar → CLI Parser (CommandLineOptions)
2. CLI dispatches to one of three jobs: AAM, ANNOTATE, COMPARE
3. Input reader (SMILES or RXN) using IO layer → produces CDK IReaction/IAtomContainer
4. StandardizeReaction normalizes molecules (2D/3D, stereochemistry)
5. Mapping engine (ReactionMechanismTool):
– Calls SMSD algorithms (McGregor, MCS+, VF2, r-graph) and/or GameTheoryMapper
– Produces MappingSolution containing the mapped IReaction
6. MechanismTool inspects MappingSolution → calculates bond changes, reaction centres
7. For COMPARE: two mapped reactions feed into fingerprint/signature generators → similarity score
8. Output formatter (TEXT, XML) writes result to console or file
Diagramming conventions
• Clear labels: use the package name or functional name (e.g., “Mapping Engine”)
• Rectangles (CLI / UI) – Blue