Toolkit-agnostic reaction mapping engine with CDK adapter. Deterministic, no training data required.
1. Atom Atom Mapping (AAM) Tool
2. Reaction Annotator (Extract Bond Changes, Identify & Mark Reaction Centres)
3. Reaction Comparator (Reaction Similarity based on the Bond Changes, Reaction Centres or Substructures)
Author: Dr. Syed Asad Rahman e-mail: asad.rahman@bioinceptionlabs.com
a) You could download the latest RDT release version from the github.
b) Compile the core code using maven:
use pom.xml and mvn commands to build your project
1) mvn clean compile (compile only)
2) mvn clean test (compile and run tests)
3) mvn clean install -DskipTests=true (install, skip tests)
4) mvn clean install (install with tests)
5) mvn -P local clean install -DskipTests=true (fat jar, skip tests)
6) mvn -P local clean install (fat jar with tests)
import com.bioinceptionlabs.reactionblast.api.RDT;
import com.bioinceptionlabs.reactionblast.api.ReactionResult;
public class Example {
public static void main(String[] args) {
// One-line reaction mapping — no CDK knowledge needed
ReactionResult result = RDT.map("CC(=O)O.OCC>>CC(=O)OCC.O");
System.out.println("Mapped: " + result.getMappedSmiles());
System.out.println("Bond changes: " + result.getTotalBondChanges());
System.out.println("Formed/cleaved: " + result.getFormedCleavedBonds());
System.out.println("Order changes: " + result.getOrderChangedBonds());
}
}For users who need CDK-level control:
import org.openscience.cdk.interfaces.IReaction;
import org.openscience.cdk.silent.SilentChemObjectBuilder;
import org.openscience.cdk.smiles.SmilesParser;
import com.bioinceptionlabs.reactionblast.mechanism.ReactionMechanismTool;
import com.bioinceptionlabs.reactionblast.tools.StandardizeReaction;
public class AdvancedExample {
public static void main(String[] args) throws Exception {
SmilesParser sp = new SmilesParser(SilentChemObjectBuilder.getInstance());
IReaction rxn = sp.parseReactionSmiles("CC(=O)C=C.CC=CC=C>>CC1CC(CC=C1)C(C)=O");
rxn.setID("DielsAlder");
ReactionMechanismTool rmt = new ReactionMechanismTool(
rxn, true, true, false, true, false, new StandardizeReaction());
System.out.println("Algorithm: " + rmt.getSelectedSolution().getAlgorithmID());
}
}For users who want to swap CDK with RDKit/OpenBabel:
import com.bioinceptionlabs.reactionblast.model.*;
import com.bioinceptionlabs.reactionblast.cdk.CDKToolkit;
// Register toolkit once at startup
ChemToolkit.register(new CDKToolkit());
// Parse and map using toolkit-agnostic types
ReactionGraph rxn = ChemToolkit.get().parseReactionSmiles("CC>>CC");
// ... pass to ReactionMechanismTool(rxn, true, true)The package namespace has changed from uk.ac.ebi to com.bioinceptionlabs in v3.0.0.
Maven dependency
<!-- Old (v2.x) -->
<groupId>uk.ac.ebi.rdt</groupId>
<!-- New (v3.2.0+) -->
<groupId>com.bioinceptionlabs</groupId>Import changes
Replace imports in your code:
| Old (v2.x) | New (v3.0.0) |
|---|---|
uk.ac.ebi.aamtool.* |
com.bioinceptionlabs.aamtool.* |
uk.ac.ebi.reactionblast.* |
com.bioinceptionlabs.reactionblast.* |
uk.ac.ebi.centres.* |
com.bioinceptionlabs.centres.* |
A simple find-and-replace of uk.ac.ebi with com.bioinceptionlabs in your import statements is sufficient. The API itself is unchanged.
RDT is released under the GNU Lesser General Public License (LGPL) version 3.0.
Author: Syed Asad Rahman
e-mail: asad.rahman@bioinceptionlabs.com
BioInception
Note: The copyright of this software belongs to the author
and BioInception.
| Metric | Value |
|---|---|
| Mapping speed | 3.4 reactions/sec (USPTO 50K) |
| Test suite | 148 tests, 100% pass |
| Test time | ~90s (6.5x faster than v2.x) |
| Codebase | 77 files (reduced from 345) |
| Deterministic | Yes (no ML training needed) |
Primary citation:
SA Rahman, G Torrance, L Baldacci, SM Cuesta, F Fenninger, N Gopal, S Choudhary, JW May, GL Holliday, C Steinbeck and JM Thornton: Reaction Decoder Tool (RDT): Extracting Features from Chemical Reactions, Bioinformatics (2016)
doi: 10.1093/bioinformatics/btw096
EC-BLAST citation:
SA Rahman, S Cuesta, N Furnham, GL Holliday and JM Thornton: EC-BLAST: a tool to automatically search and compare enzyme reactions, Nature Methods (2014)
Related work:
M Leber: Kodierung enzymatischer Reaktionen (Encoding Enzymatic Reactions), Dissertation, University of Cologne (2008) - R-matrix canonicalization and R-strings for reaction comparison
AAM using SMILES
java -jar rdt-3.2.0-jar-with-dependencies.jar -Q SMI -q "CC(O)CC(=O)OC(C)CC(O)=O.O[H]>>[H]OC(=O)CC(C)O.CC(O)CC(O)=O" -g -c -j AAM -f TEXT
AAM using SMILES (accept mapping with no bond changes -b)
java -jar rdt-3.2.0-jar-with-dependencies.jar -Q SMI -q "O=C(O)C(N)CC(=O)N.O=C(O)C(N)CS>>C(N)(CC(=O)N)C(=O)O.O=C(O)C(N)CS" -b -g -c -j AAM -f TEXT
java -jar rdt-3.2.0-jar-with-dependencies.jar -Q SMI -q "CC(O)CC(=O)OC(C)CC(O)=O.O[H]>>[H]OC(=O)CC(C)O.CC(O)CC(O)=O" -g -c -j ANNOTATE -f XML
Compare Reactions using SMILES with precomputed AAM mappings
java -jar rdt-3.2.0-jar-with-dependencies.jar -Q RXN -q example/ReactionDecoder_mapped.rxn -T RXN -t example/ReactionDecoder_mapped.rxn -j COMPARE -f BOTH -u
Compare Reactions using RXN files
java -jar rdt-3.2.0-jar-with-dependencies.jar -Q RXN -q example/ReactionDecoder_mapped.rxn -T RXN -t example/ReactionDecoder_mapped.rxn -j COMPARE -f BOTH