Package rdkit :: Package Chem :: Module rdChemReactions
[hide private]
[frames] | no frames]

Module rdChemReactions

Module containing classes and functions for working with chemical reactions.

Classes [hide private]
  CartesianProductStrategy
CartesianProductStrategy produces a standard walk through all possible reagent combinations:
  ChemicalReaction
A class for storing and applying chemical reactions.
  EnumerateLibrary
EnumerateLibrary This class allows easy enumeration of reactions.
  EnumerateLibraryBase
  EnumerationParams
EnumerationParams Controls some aspects of how the enumeration is performed.
  EnumerationStrategyBase
  EvenSamplePairsStrategy
Randomly sample Pairs evenly from a collection of building blocks This is a good strategy for choosing a relatively small selection of building blocks from a larger set.
  FingerprintType
  ROMolList
  RandomSampleAllBBsStrategy
RandomSampleAllBBsStrategy randomly samples from the reagent sets with the constraint that all building blocks are samples as early as possible.
  RandomSampleStrategy
RandomSampleStrategy simply randomly samples from the reagent sets.
  ReactionFingerprintParams
A class for storing parameters to manipulate the calculation of fingerprints of chemical reactions.
  SanitizeFlags
  VectMolVect
  VectSizeT
  VectorOfStringVectors
Functions [hide private]
 
Compute2DCoordsForReaction(...)
Compute2DCoordsForReaction( (ChemicalReaction)reaction [, (float)spacing=2.0 [, (bool)updateProps=True [, (bool)canonOrient=True [, (int)nFlipsPerSample=0 [, (int)nSample=0 [, (int)sampleSeed=0 [, (bool)permuteDeg4Nodes=False [, (float)bondLength=-1.0]]]]]]]]) -> None : Compute 2D coordinates for a reaction.
 
CreateDifferenceFingerprintForReaction(...)
CreateDifferenceFingerprintForReaction( (ChemicalReaction)reaction [, (ReactionFingerprintParams)ReactionFingerPrintParams=<rdkit.Chem.rdChemReactions.ReactionFingerprintParams object at 0x7fc43f447050>]) -> UIntSparseIntVect : construct a difference fingerprint for a ChemicalReaction by subtracting the reactant fingerprint from the product fingerprint
 
CreateStructuralFingerprintForReaction(...)
CreateStructuralFingerprintForReaction( (ChemicalReaction)reaction [, (ReactionFingerprintParams)ReactionFingerPrintParams=<rdkit.Chem.rdChemReactions.ReactionFingerprintParams object at 0x7fc43f4470d8>]) -> ExplicitBitVect : construct a structural fingerprint for a ChemicalReaction by concatenating the reactant fingerprint and the product fingerprint
bool :

EnumerateLibraryCanSerialize()
Returns True if the EnumerateLibrary is serializable (requires boost serialization
AdjustQueryParameters :

GetChemDrawRxnAdjustParams()
(deprecated, see MatchOnlyAtRgroupsAdjustParams) Returns the chemdraw style adjustment parameters for reactant templates
AdjustQueryParameters :

GetDefaultAdjustParams()
Returns the default adjustment parameters for reactant templates
 
HasAgentTemplateSubstructMatch(...)
HasAgentTemplateSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction) -> bool : tests if the agents of a queryReaction are the same as those of a reaction
 
HasProductTemplateSubstructMatch(...)
HasProductTemplateSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction) -> bool : tests if the products of a queryReaction are substructures of the products of a reaction
 
HasReactantTemplateSubstructMatch(...)
HasReactantTemplateSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction) -> bool : tests if the reactants of a queryReaction are substructures of the reactants of a reaction
 
HasReactionAtomMapping(...)
HasReactionAtomMapping( (ChemicalReaction)arg1) -> bool : tests if a reaction obtains any atom mapping
 
HasReactionSubstructMatch(...)
HasReactionSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction [, (bool)includeAgents=False]) -> bool : tests if the queryReaction is a substructure of a reaction
 
IsReactionTemplateMoleculeAgent(...)
IsReactionTemplateMoleculeAgent( (Mol)molecule, (float)agentThreshold) -> bool : tests if a molecule can be classified as an agent depending on the ratio of mapped atoms and a give threshold
AdjustQueryParameters :

MatchOnlyAtRgroupsAdjustParams()
Only match at the specified rgroup locations in the reactant templates
 
PreprocessReaction(...)
PreprocessReaction( (ChemicalReaction)reaction [, (dict)queries={} [, (str)propName='molFileValue']]) -> object : A function for preprocessing reactions with more specific queries.
 
ReactionFromMolecule(...)
ReactionFromMolecule( (Mol)arg1) -> ChemicalReaction : construct a ChemicalReaction from an molecule if the RXN role property of the molecule is set
 
ReactionFromRxnBlock(...)
ReactionFromRxnBlock( (str)arg1) -> ChemicalReaction : construct a ChemicalReaction from an string in MDL rxn format
 
ReactionFromRxnFile(...)
ReactionFromRxnFile( (str)arg1) -> ChemicalReaction : construct a ChemicalReaction from an MDL rxn file
 
ReactionFromSmarts(...)
ReactionFromSmarts( (str)SMARTS [, (dict)replacements={} [, (bool)useSmiles=False]]) -> ChemicalReaction : construct a ChemicalReaction from a reaction SMARTS string.
 
ReactionToMolecule(...)
ReactionToMolecule( (ChemicalReaction)reaction) -> Mol : construct a molecule for a ChemicalReaction with RXN role property set
 
ReactionToRxnBlock(...)
ReactionToRxnBlock( (ChemicalReaction)reaction [, (bool)separateAgents=False]) -> str : construct a string in MDL rxn format for a ChemicalReaction
 
ReactionToSmarts(...)
ReactionToSmarts( (ChemicalReaction)reaction) -> str : construct a reaction SMARTS string for a ChemicalReaction
 
ReactionToSmiles(...)
ReactionToSmiles( (ChemicalReaction)reaction [, (bool)canonical=True]) -> str : construct a reaction SMILES string for a ChemicalReaction
 
ReduceProductToSideChains(...)
ReduceProductToSideChains( (Mol)product [, (bool)addDummyAtoms=True]) -> Mol : reduce the product of a reaction to the side chains added by the reaction.
 
RemoveMappingNumbersFromReactions(...)
RemoveMappingNumbersFromReactions( (ChemicalReaction)reaction) -> None : Removes the mapping numbers from the molecules of a reaction
 
SanitizeRxn(...)
SanitizeRxn( (ChemicalReaction)rxn [, (int)sanitizeOps=4294967295 [, (AdjustQueryParameters)params=<rdkit.Chem.rdmolops.AdjustQueryParameters object at 0x7fc4408928c0> [, (bool)catchErrors=False]]]) -> SanitizeFlags : A function for preprocessing reactions with more specific queries.
 
UpdateProductsStereochemistry(...)
UpdateProductsStereochemistry( (ChemicalReaction)reaction) -> None : Caution: This is an expert-user function which will change a property (molInversionFlag) of your products.
Variables [hide private]
  SANITIZE_ADJUST_REACTANTS = rdkit.Chem.rdChemReactions.Sanitiz...
  SANITIZE_ALL = rdkit.Chem.rdChemReactions.SanitizeFlags.SANITI...
  SANITIZE_ATOM_MAPS = rdkit.Chem.rdChemReactions.SanitizeFlags....
  SANITIZE_MERGEHS = rdkit.Chem.rdChemReactions.SanitizeFlags.SA...
  SANITIZE_NONE = rdkit.Chem.rdChemReactions.SanitizeFlags.SANIT...
  SANITIZE_RGROUP_NAMES = rdkit.Chem.rdChemReactions.SanitizeFla...
  __package__ = None
hash(x)
Function Details [hide private]

Compute2DCoordsForReaction(...)

 

Compute2DCoordsForReaction( (ChemicalReaction)reaction [, (float)spacing=2.0 [, (bool)updateProps=True [, (bool)canonOrient=True [, (int)nFlipsPerSample=0 [, (int)nSample=0 [, (int)sampleSeed=0 [, (bool)permuteDeg4Nodes=False [, (float)bondLength=-1.0]]]]]]]]) -> None :
    Compute 2D coordinates for a reaction. 
      ARGUMENTS: 
    
         reaction - the reaction of interest
         spacing - the amount of space left between components of the reaction
         canonOrient - orient the reactants and products in a canonical way
         updateProps - if set, properties such as conjugation and
            hybridization will be calculated for the reactant and product
            templates before generating coordinates. This should result in
            better depictions, but can lead to errors in some cases.
         nFlipsPerSample - number of rotatable bonds that are
                    flipped at random at a time.
         nSample - Number of random samplings of rotatable bonds.
         sampleSeed - seed for the random sampling process.
         permuteDeg4Nodes - allow permutation of bonds at a degree 4
                     node during the sampling process 
         bondLength - change the default bond length for depiction 
    
    

    C++ signature :
        void Compute2DCoordsForReaction(RDKit::ChemicalReaction {lvalue} [,double=2.0 [,bool=True [,bool=True [,unsigned int=0 [,unsigned int=0 [,int=0 [,bool=False [,double=-1.0]]]]]]]])

CreateDifferenceFingerprintForReaction(...)

 

CreateDifferenceFingerprintForReaction( (ChemicalReaction)reaction [, (ReactionFingerprintParams)ReactionFingerPrintParams=<rdkit.Chem.rdChemReactions.ReactionFingerprintParams object at 0x7fc43f447050>]) -> UIntSparseIntVect :
    construct a difference fingerprint for a ChemicalReaction by subtracting the reactant fingerprint from the product fingerprint

    C++ signature :
        RDKit::SparseIntVect<unsigned int>* CreateDifferenceFingerprintForReaction(RDKit::ChemicalReaction [,RDKit::ReactionFingerprintParams=<rdkit.Chem.rdChemReactions.ReactionFingerprintParams object at 0x7fc43f447050>])

CreateStructuralFingerprintForReaction(...)

 

CreateStructuralFingerprintForReaction( (ChemicalReaction)reaction [, (ReactionFingerprintParams)ReactionFingerPrintParams=<rdkit.Chem.rdChemReactions.ReactionFingerprintParams object at 0x7fc43f4470d8>]) -> ExplicitBitVect :
    construct a structural fingerprint for a ChemicalReaction by concatenating the reactant fingerprint and the product fingerprint

    C++ signature :
        ExplicitBitVect* CreateStructuralFingerprintForReaction(RDKit::ChemicalReaction [,RDKit::ReactionFingerprintParams=<rdkit.Chem.rdChemReactions.ReactionFingerprintParams object at 0x7fc43f4470d8>])

EnumerateLibraryCanSerialize()

 
    Returns True if the EnumerateLibrary is serializable (requires boost serialization

    C++ signature :
        bool EnumerateLibraryCanSerialize()

Returns:
bool :

GetChemDrawRxnAdjustParams()

 
    (deprecated, see MatchOnlyAtRgroupsAdjustParams)
        Returns the chemdraw style adjustment parameters for reactant templates

    C++ signature :
        RDKit::MolOps::AdjustQueryParameters GetChemDrawRxnAdjustParams()

Returns:
AdjustQueryParameters :

GetDefaultAdjustParams()

 
    Returns the default adjustment parameters for reactant templates

    C++ signature :
        RDKit::MolOps::AdjustQueryParameters GetDefaultAdjustParams()

Returns:
AdjustQueryParameters :

HasAgentTemplateSubstructMatch(...)

 

HasAgentTemplateSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction) -> bool :
    tests if the agents of a queryReaction are the same as those of a reaction

    C++ signature :
        bool HasAgentTemplateSubstructMatch(RDKit::ChemicalReaction,RDKit::ChemicalReaction)

HasProductTemplateSubstructMatch(...)

 

HasProductTemplateSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction) -> bool :
    tests if the products of a queryReaction are substructures of the products of a reaction

    C++ signature :
        bool HasProductTemplateSubstructMatch(RDKit::ChemicalReaction,RDKit::ChemicalReaction)

HasReactantTemplateSubstructMatch(...)

 

HasReactantTemplateSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction) -> bool :
    tests if the reactants of a queryReaction are substructures of the reactants of a reaction

    C++ signature :
        bool HasReactantTemplateSubstructMatch(RDKit::ChemicalReaction,RDKit::ChemicalReaction)

HasReactionAtomMapping(...)

 

HasReactionAtomMapping( (ChemicalReaction)arg1) -> bool :
    tests if a reaction obtains any atom mapping

    C++ signature :
        bool HasReactionAtomMapping(RDKit::ChemicalReaction)

HasReactionSubstructMatch(...)

 

HasReactionSubstructMatch( (ChemicalReaction)reaction, (ChemicalReaction)queryReaction [, (bool)includeAgents=False]) -> bool :
    tests if the queryReaction is a substructure of a reaction

    C++ signature :
        bool HasReactionSubstructMatch(RDKit::ChemicalReaction,RDKit::ChemicalReaction [,bool=False])

IsReactionTemplateMoleculeAgent(...)

 

IsReactionTemplateMoleculeAgent( (Mol)molecule, (float)agentThreshold) -> bool :
    tests if a molecule can be classified as an agent depending on the ratio of mapped atoms and a give threshold

    C++ signature :
        bool IsReactionTemplateMoleculeAgent(RDKit::ROMol,double)

MatchOnlyAtRgroupsAdjustParams()

 
    Only match at the specified rgroup locations in the reactant templates

    C++ signature :
        RDKit::MolOps::AdjustQueryParameters MatchOnlyAtRgroupsAdjustParams()

Returns:
AdjustQueryParameters :

PreprocessReaction(...)

 

PreprocessReaction( (ChemicalReaction)reaction [, (dict)queries={} [, (str)propName='molFileValue']]) -> object :
    A function for preprocessing reactions with more specific queries.
    Queries are indicated by labels on atoms (molFileAlias property by default)
    When these labels are found, more specific queries are placed on the atoms.
    By default, the available quieries come from 
      FilterCatalog.GetFlattenedFunctionalGroupHierarchy(True)
    
    
    Sample Usage:
      >>> from rdkit import Chem, RDConfig
      >>> from rdkit.Chem import MolFromSmiles, AllChem
      >>> from rdkit.Chem.rdChemReactions import PreprocessReaction
      >>> import os
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','boronic1.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      >>> nWarn
      0
      >>> nError
      0
      >>> nReacts
      2
      >>> nProds
      1
      >>> reactantLabels
      (((0, 'halogen.bromine.aromatic'),), ((1, 'boronicacid'),))
    
      If there are functional group labels in the input reaction (via atoms with molFileValue properties),
      the corresponding atoms will have queries added to them so that they only match such things. We can
      see this here:
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> r1 = rxn.GetReactantTemplate(0)
      >>> m1 = Chem.MolFromSmiles('CCBr')
      >>> m2 = Chem.MolFromSmiles('c1ccccc1Br')
      
      These both match because the reaction file itself just has R1-Br:
      >>> m1.HasSubstructMatch(r1)
      True
      >>> m2.HasSubstructMatch(r1)
      True
    
      After preprocessing, we only match the aromatic Br:
      >>> d = PreprocessReaction(rxn)
      >>> m1.HasSubstructMatch(r1)
      False
      >>> m2.HasSubstructMatch(r1)
      True
    
      We also support or queries in the values field (separated by commas):
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','azide_reaction.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> reactantLabels = PreprocessReaction(rxn)[-1]
      >>> reactantLabels
      (((1, 'azide'),), ((1, 'carboxylicacid,acidchloride'),))
      >>> m1 = Chem.MolFromSmiles('CC(=O)O')
      >>> m2 = Chem.MolFromSmiles('CC(=O)Cl')
      >>> m3 = Chem.MolFromSmiles('CC(=O)N')
      >>> r2 = rxn.GetReactantTemplate(1)
      >>> m1.HasSubstructMatch(r2)
      True
      >>> m2.HasSubstructMatch(r2)
      True
      >>> m3.HasSubstructMatch(r2)
      False
    
      unrecognized final group types are returned as None:
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','bad_value1.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      Traceback (most recent call last):
        ...
      RuntimeError: KeyErrorException
    
      One unrecognized group type in a comma-separated list makes the whole thing fail:
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','bad_value2.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      Traceback (most recent call last):
        ...
      RuntimeError: KeyErrorException
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','bad_value3.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      Traceback (most recent call last):
        ...
      RuntimeError: KeyErrorException
      >>> rxn = rdChemReactions.ChemicalReaction()
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      >>> reactantLabels
      ()
      >>> reactantLabels == ()
      True
    

    C++ signature :
        boost::python::api::object PreprocessReaction(RDKit::ChemicalReaction {lvalue} [,boost::python::dict={} [,std::string='molFileValue']])

ReactionFromMolecule(...)

 

ReactionFromMolecule( (Mol)arg1) -> ChemicalReaction :
    construct a ChemicalReaction from an molecule if the RXN role property of the molecule is set

    C++ signature :
        RDKit::ChemicalReaction* ReactionFromMolecule(RDKit::ROMol)

ReactionFromRxnBlock(...)

 

ReactionFromRxnBlock( (str)arg1) -> ChemicalReaction :
    construct a ChemicalReaction from an string in MDL rxn format

    C++ signature :
        RDKit::ChemicalReaction* ReactionFromRxnBlock(std::string)

ReactionFromRxnFile(...)

 

ReactionFromRxnFile( (str)arg1) -> ChemicalReaction :
    construct a ChemicalReaction from an MDL rxn file

    C++ signature :
        RDKit::ChemicalReaction* ReactionFromRxnFile(std::string)

ReactionFromSmarts(...)

 

ReactionFromSmarts( (str)SMARTS [, (dict)replacements={} [, (bool)useSmiles=False]]) -> ChemicalReaction :
    construct a ChemicalReaction from a reaction SMARTS string. 
    see the documentation for rdkit.Chem.MolFromSmiles for an explanation
    of the replacements argument.

    C++ signature :
        RDKit::ChemicalReaction* ReactionFromSmarts(char const* [,boost::python::dict={} [,bool=False]])

ReactionToMolecule(...)

 

ReactionToMolecule( (ChemicalReaction)reaction) -> Mol :
    construct a molecule for a ChemicalReaction with RXN role property set

    C++ signature :
        RDKit::ROMol* ReactionToMolecule(RDKit::ChemicalReaction)

ReactionToRxnBlock(...)

 

ReactionToRxnBlock( (ChemicalReaction)reaction [, (bool)separateAgents=False]) -> str :
    construct a string in MDL rxn format for a ChemicalReaction

    C++ signature :
        std::string ReactionToRxnBlock(RDKit::ChemicalReaction [,bool=False])

ReactionToSmarts(...)

 

ReactionToSmarts( (ChemicalReaction)reaction) -> str :
    construct a reaction SMARTS string for a ChemicalReaction

    C++ signature :
        std::string ReactionToSmarts(RDKit::ChemicalReaction)

ReactionToSmiles(...)

 

ReactionToSmiles( (ChemicalReaction)reaction [, (bool)canonical=True]) -> str :
    construct a reaction SMILES string for a ChemicalReaction

    C++ signature :
        std::string ReactionToSmiles(RDKit::ChemicalReaction [,bool=True])

ReduceProductToSideChains(...)

 

ReduceProductToSideChains( (Mol)product [, (bool)addDummyAtoms=True]) -> Mol :
    reduce the product of a reaction to the side chains added by the reaction.              The output is a molecule with attached wildcards indicating where the product was attached.              The dummy atom has the same reaction-map number as the product atom (if available).

    C++ signature :
        RDKit::ROMol* ReduceProductToSideChains(boost::shared_ptr<RDKit::ROMol> [,bool=True])

RemoveMappingNumbersFromReactions(...)

 

RemoveMappingNumbersFromReactions( (ChemicalReaction)reaction) -> None :
    Removes the mapping numbers from the molecules of a reaction

    C++ signature :
        void RemoveMappingNumbersFromReactions(RDKit::ChemicalReaction)

SanitizeRxn(...)

 

SanitizeRxn( (ChemicalReaction)rxn [, (int)sanitizeOps=4294967295 [, (AdjustQueryParameters)params=<rdkit.Chem.rdmolops.AdjustQueryParameters object at 0x7fc4408928c0> [, (bool)catchErrors=False]]]) -> SanitizeFlags :
    A function for preprocessing reactions with more specific queries.
    Queries are indicated by labels on atoms (molFileAlias property by default)
    When these labels are found, more specific queries are placed on the atoms.
    By default, the available quieries come from 
      FilterCatalog.GetFlattenedFunctionalGroupHierarchy(True)
    
    
    Sample Usage:
      >>> from rdkit import Chem, RDConfig
      >>> from rdkit.Chem import MolFromSmiles, AllChem
      >>> from rdkit.Chem.rdChemReactions import PreprocessReaction
      >>> import os
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','boronic1.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      >>> nWarn
      0
      >>> nError
      0
      >>> nReacts
      2
      >>> nProds
      1
      >>> reactantLabels
      (((0, 'halogen.bromine.aromatic'),), ((1, 'boronicacid'),))
    
      If there are functional group labels in the input reaction (via atoms with molFileValue properties),
      the corresponding atoms will have queries added to them so that they only match such things. We can
      see this here:
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> r1 = rxn.GetReactantTemplate(0)
      >>> m1 = Chem.MolFromSmiles('CCBr')
      >>> m2 = Chem.MolFromSmiles('c1ccccc1Br')
      
      These both match because the reaction file itself just has R1-Br:
      >>> m1.HasSubstructMatch(r1)
      True
      >>> m2.HasSubstructMatch(r1)
      True
    
      After preprocessing, we only match the aromatic Br:
      >>> d = PreprocessReaction(rxn)
      >>> m1.HasSubstructMatch(r1)
      False
      >>> m2.HasSubstructMatch(r1)
      True
    
      We also support or queries in the values field (separated by commas):
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','azide_reaction.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> reactantLabels = PreprocessReaction(rxn)[-1]
      >>> reactantLabels
      (((1, 'azide'),), ((1, 'carboxylicacid,acidchloride'),))
      >>> m1 = Chem.MolFromSmiles('CC(=O)O')
      >>> m2 = Chem.MolFromSmiles('CC(=O)Cl')
      >>> m3 = Chem.MolFromSmiles('CC(=O)N')
      >>> r2 = rxn.GetReactantTemplate(1)
      >>> m1.HasSubstructMatch(r2)
      True
      >>> m2.HasSubstructMatch(r2)
      True
      >>> m3.HasSubstructMatch(r2)
      False
    
      unrecognized final group types are returned as None:
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','bad_value1.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      Traceback (most recent call last):
        ...
      RuntimeError: KeyErrorException
    
      One unrecognized group type in a comma-separated list makes the whole thing fail:
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','bad_value2.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      Traceback (most recent call last):
        ...
      RuntimeError: KeyErrorException
      >>> testFile = os.path.join(RDConfig.RDCodeDir,'Chem','SimpleEnum','test_data','bad_value3.rxn')
      >>> rxn = AllChem.ReactionFromRxnFile(testFile)
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      Traceback (most recent call last):
        ...
      RuntimeError: KeyErrorException
      >>> rxn = rdChemReactions.ChemicalReaction()
      >>> rxn.Initialize()
      >>> nWarn,nError,nReacts,nProds,reactantLabels = PreprocessReaction(rxn)
      >>> reactantLabels
      ()
      >>> reactantLabels == ()
      True
    

    C++ signature :
        RDKit::RxnOps::SanitizeRxnFlags SanitizeRxn(RDKit::ChemicalReaction {lvalue} [,unsigned long=4294967295 [,RDKit::MolOps::AdjustQueryParameters=<rdkit.Chem.rdmolops.AdjustQueryParameters object at 0x7fc4408928c0> [,bool=False]]])

UpdateProductsStereochemistry(...)

 

UpdateProductsStereochemistry( (ChemicalReaction)reaction) -> None :
    Caution: This is an expert-user function which will change a property (molInversionFlag) of your products.          This function is called by default using the RXN or SMARTS parser for reactions and should really only be called if reactions have been constructed some other way.          The function updates the stereochemistry of the product by considering 4 different cases: inversion, retention, removal, and introduction

    C++ signature :
        void UpdateProductsStereochemistry(RDKit::ChemicalReaction*)


Variables Details [hide private]

SANITIZE_ADJUST_REACTANTS

Value:
rdkit.Chem.rdChemReactions.SanitizeFlags.SANITIZE_ADJUST_REACTANTS

SANITIZE_ALL

Value:
rdkit.Chem.rdChemReactions.SanitizeFlags.SANITIZE_ALL

SANITIZE_ATOM_MAPS

Value:
rdkit.Chem.rdChemReactions.SanitizeFlags.SANITIZE_ATOM_MAPS

SANITIZE_MERGEHS

Value:
rdkit.Chem.rdChemReactions.SanitizeFlags.SANITIZE_MERGEHS

SANITIZE_NONE

Value:
rdkit.Chem.rdChemReactions.SanitizeFlags.SANITIZE_NONE

SANITIZE_RGROUP_NAMES

Value:
rdkit.Chem.rdChemReactions.SanitizeFlags.SANITIZE_RGROUP_NAMES