Package CHEM :: Package CombiCDB :: Module ReactionFormatter :: Class ReactionCanonizer
[hide private]
[frames] | no frames]

Class ReactionCanonizer



Given a reaction representation, encoded through one of OpenEye's
standard parsers (SMILES for SMIRKS, SDF for RDF), produce and canonize
a SMIRKS string output for each.

Primarily based on canonical SMILES algorithm, but extra steps to ensure
consistent atom mapping numbers and hydrogen atom mapping.

Known Issues:
-   This actually only works well for "Reaction SMILES" not for full-fledged
    SMIRKS strings.  The difference is, SMIRKS strings can contain SMARTS
    pattern strings that are not directly manageable by OEChem's molecule objects.
-   Symmetric molecules may not yield consistent SMILES when atom-mappings are used.
    If they're symmetric, usually it doesn't matter which branch is chosen,
    since the pieces are equivalent.  With atom-mapping however, such branches
    may be non-equivalent, but OEChem doesn't use atom-mapping to break these ties.



Instance Methods [hide private]
 
__init__(self)
Constructor.
 
canonizeReactionMol(self, reactionMol)
Given an OEMolBase object representing a reaction, modify it's atom mapping contents and number to ensure canonical labeling.
 
canonizeReactionSmiles(self, reactionSmi)
Just create a molecule object representation of the SMILES string and call canonizeReactionMol on it, then return a SMILES representation back.
 
runByMolStream(self, inputMolStream, outputMolStream)
Read through contents of the inputFile, canonize each reactionMol and then write to the outputFile.
 
runByFilename(self, inputFilename, outputFilename)
Read through contents of the inputFile, canonize each reactionMol and then write to the outputfile.
Class Variables [hide private]
  tempMol = OEGraphMol()