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

Class ChemicalReaction

 object --+    
          |    
??.instance --+
              |
             ChemicalReaction

A class for storing and applying chemical reactions.

Sample Usage:
>>> rxn = rdChemReactions.ReactionFromSmarts('[C:1](=[O:2])O.[N:3]>>[C:1](=[O:2])[N:3]')
>>> reacts = (Chem.MolFromSmiles('C(=O)O'),Chem.MolFromSmiles('CNC'))
>>> products = rxn.RunReactants(reacts)
>>> len(products)
1
>>> len(products[0])
1
>>> Chem.MolToSmiles(products[0])
'CN(C)C=O'

Instance Methods [hide private]
 
AddAgentTemplate(...)
AddAgentTemplate( (ChemicalReaction)arg1, (Mol)arg2) -> int : adds a agent (a Molecule)
 
AddProductTemplate(...)
AddProductTemplate( (ChemicalReaction)arg1, (Mol)arg2) -> int : adds a product (a Molecule)
 
AddReactantTemplate(...)
AddReactantTemplate( (ChemicalReaction)arg1, (Mol)arg2) -> int : adds a reactant (a Molecule) to the reaction
 
AddRecursiveQueriesToReaction(...)
AddRecursiveQueriesToReaction( (ChemicalReaction)reaction [, (dict)queries={} [, (str)propName='molFileValue' [, (bool)getLabels=False]]]) -> object : adds recursive queries and returns reactant labels
 
GetAgentTemplate(...)
GetAgentTemplate( (ChemicalReaction)self, (int)which) -> Mol : returns one of our agent templates
 
GetNumAgentTemplates(...)
GetNumAgentTemplates( (ChemicalReaction)arg1) -> int : returns the number of agents this reaction expects
 
GetNumProductTemplates(...)
GetNumProductTemplates( (ChemicalReaction)arg1) -> int : returns the number of products this reaction generates
 
GetNumReactantTemplates(...)
GetNumReactantTemplates( (ChemicalReaction)arg1) -> int : returns the number of reactants this reaction expects
 
GetProductTemplate(...)
GetProductTemplate( (ChemicalReaction)self, (int)which) -> Mol : returns one of our product templates
 
GetReactantTemplate(...)
GetReactantTemplate( (ChemicalReaction)self, (int)which) -> Mol : returns one of our reactant templates
 
GetReactingAtoms(...)
GetReactingAtoms( (ChemicalReaction)self [, (bool)mappedAtomsOnly=False]) -> object : returns a sequence of sequences with the atoms that change in the reaction
 
Initialize(...)
Initialize( (ChemicalReaction)arg1) -> None : initializes the reaction so that it can be used
 
IsInitialized(...)
IsInitialized( (ChemicalReaction)arg1) -> bool : checks if the reaction is ready for use
 
IsMoleculeAgent(...)
IsMoleculeAgent( (ChemicalReaction)arg1, (Mol)arg2) -> bool : returns whether or not the molecule has a substructure match to one of the agents.
 
IsMoleculeProduct(...)
IsMoleculeProduct( (ChemicalReaction)arg1, (Mol)arg2) -> bool : returns whether or not the molecule has a substructure match to one of the products.
 
IsMoleculeReactant(...)
IsMoleculeReactant( (ChemicalReaction)arg1, (Mol)arg2) -> bool : returns whether or not the molecule has a substructure match to one of the reactants.
 
RemoveUnmappedProductTemplates(...)
RemoveUnmappedProductTemplates( (ChemicalReaction)self [, (float)thresholdUnmappedAtoms=0.2 [, (bool)moveToAgentTemplates=True [, (AtomPairsParameters)targetList=None]]]) -> None : Removes molecules with an atom mapping ratio below thresholdUnmappedAtoms from product templates to the agent templates or to a given targetList
 
RemoveUnmappedReactantTemplates(...)
RemoveUnmappedReactantTemplates( (ChemicalReaction)self [, (float)thresholdUnmappedAtoms=0.2 [, (bool)moveToAgentTemplates=True [, (AtomPairsParameters)targetList=None]]]) -> None : Removes molecules with an atom mapping ratio below thresholdUnmappedAtoms from reactant templates to the agent templates or to a given targetList
 
RunReactants(...)
RunReactants( (ChemicalReaction)arg1, (tuple)arg2) -> object : apply the reaction to a sequence of reactant molecules and return the products as a tuple of tuples
 
ToBinary(...)
ToBinary( (ChemicalReaction)arg1) -> object : Returns a binary string representation of the reaction.
 
Validate(...)
Validate( (ChemicalReaction)self [, (bool)silent=False]) -> tuple : checks the reaction for potential problems, returns (numWarnings,numErrors)
 
__getinitargs__(...)
__getinitargs__( (ChemicalReaction)arg1) -> tuple :
 
__init__(...)
__init__( (object)arg1) -> None : Constructor, takes no arguments
 
__reduce__(...)
helper for pickle
 
_getImplicitPropertiesFlag(...)
_getImplicitPropertiesFlag( (ChemicalReaction)self) -> bool : EXPERT USER: returns whether or not the reaction can have implicit properties
 
_setImplicitPropertiesFlag(...)
_setImplicitPropertiesFlag( (ChemicalReaction)self, (bool)val) -> None : EXPERT USER: indicates that the reaction can have implicit properties

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 96
  __safe_for_unpickling__ = True
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

AddAgentTemplate(...)

 

AddAgentTemplate( (ChemicalReaction)arg1, (Mol)arg2) -> int :
    adds a agent (a Molecule)

    C++ signature :
        unsigned int AddAgentTemplate(RDKit::ChemicalReaction {lvalue},boost::shared_ptr<RDKit::ROMol>)

AddProductTemplate(...)

 

AddProductTemplate( (ChemicalReaction)arg1, (Mol)arg2) -> int :
    adds a product (a Molecule)

    C++ signature :
        unsigned int AddProductTemplate(RDKit::ChemicalReaction {lvalue},boost::shared_ptr<RDKit::ROMol>)

AddReactantTemplate(...)

 

AddReactantTemplate( (ChemicalReaction)arg1, (Mol)arg2) -> int :
    adds a reactant (a Molecule) to the reaction

    C++ signature :
        unsigned int AddReactantTemplate(RDKit::ChemicalReaction {lvalue},boost::shared_ptr<RDKit::ROMol>)

AddRecursiveQueriesToReaction(...)

 

AddRecursiveQueriesToReaction( (ChemicalReaction)reaction [, (dict)queries={} [, (str)propName='molFileValue' [, (bool)getLabels=False]]]) -> object :
    adds recursive queries and returns reactant labels

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

GetAgentTemplate(...)

 

GetAgentTemplate( (ChemicalReaction)self, (int)which) -> Mol :
    returns one of our agent templates

    C++ signature :
        RDKit::ROMol* GetAgentTemplate(RDKit::ChemicalReaction const*,unsigned int)

GetNumAgentTemplates(...)

 

GetNumAgentTemplates( (ChemicalReaction)arg1) -> int :
    returns the number of agents this reaction expects

    C++ signature :
        unsigned int GetNumAgentTemplates(RDKit::ChemicalReaction {lvalue})

GetNumProductTemplates(...)

 

GetNumProductTemplates( (ChemicalReaction)arg1) -> int :
    returns the number of products this reaction generates

    C++ signature :
        unsigned int GetNumProductTemplates(RDKit::ChemicalReaction {lvalue})

GetNumReactantTemplates(...)

 

GetNumReactantTemplates( (ChemicalReaction)arg1) -> int :
    returns the number of reactants this reaction expects

    C++ signature :
        unsigned int GetNumReactantTemplates(RDKit::ChemicalReaction {lvalue})

GetProductTemplate(...)

 

GetProductTemplate( (ChemicalReaction)self, (int)which) -> Mol :
    returns one of our product templates

    C++ signature :
        RDKit::ROMol* GetProductTemplate(RDKit::ChemicalReaction const*,unsigned int)

GetReactantTemplate(...)

 

GetReactantTemplate( (ChemicalReaction)self, (int)which) -> Mol :
    returns one of our reactant templates

    C++ signature :
        RDKit::ROMol* GetReactantTemplate(RDKit::ChemicalReaction const*,unsigned int)

GetReactingAtoms(...)

 

GetReactingAtoms( (ChemicalReaction)self [, (bool)mappedAtomsOnly=False]) -> object :
    returns a sequence of sequences with the atoms that change in the reaction

    C++ signature :
        boost::python::api::object GetReactingAtoms(RDKit::ChemicalReaction [,bool=False])

Initialize(...)

 

Initialize( (ChemicalReaction)arg1) -> None :
    initializes the reaction so that it can be used

    C++ signature :
        void Initialize(RDKit::ChemicalReaction {lvalue})

IsInitialized(...)

 

IsInitialized( (ChemicalReaction)arg1) -> bool :
    checks if the reaction is ready for use

    C++ signature :
        bool IsInitialized(RDKit::ChemicalReaction {lvalue})

IsMoleculeAgent(...)

 

IsMoleculeAgent( (ChemicalReaction)arg1, (Mol)arg2) -> bool :
    returns whether or not the molecule has a substructure match to one of the agents.

    C++ signature :
        bool IsMoleculeAgent(RDKit::ChemicalReaction,RDKit::ROMol)

IsMoleculeProduct(...)

 

IsMoleculeProduct( (ChemicalReaction)arg1, (Mol)arg2) -> bool :
    returns whether or not the molecule has a substructure match to one of the products.

    C++ signature :
        bool IsMoleculeProduct(RDKit::ChemicalReaction,RDKit::ROMol)

IsMoleculeReactant(...)

 

IsMoleculeReactant( (ChemicalReaction)arg1, (Mol)arg2) -> bool :
    returns whether or not the molecule has a substructure match to one of the reactants.

    C++ signature :
        bool IsMoleculeReactant(RDKit::ChemicalReaction,RDKit::ROMol)

RemoveUnmappedProductTemplates(...)

 

RemoveUnmappedProductTemplates( (ChemicalReaction)self [, (float)thresholdUnmappedAtoms=0.2 [, (bool)moveToAgentTemplates=True [, (AtomPairsParameters)targetList=None]]]) -> None :
    Removes molecules with an atom mapping ratio below thresholdUnmappedAtoms from product templates to the agent templates or to a given targetList

    C++ signature :
        void RemoveUnmappedProductTemplates(RDKit::ChemicalReaction* [,double=0.2 [,bool=True [,boost::python::api::object=None]]])

RemoveUnmappedReactantTemplates(...)

 

RemoveUnmappedReactantTemplates( (ChemicalReaction)self [, (float)thresholdUnmappedAtoms=0.2 [, (bool)moveToAgentTemplates=True [, (AtomPairsParameters)targetList=None]]]) -> None :
    Removes molecules with an atom mapping ratio below thresholdUnmappedAtoms from reactant templates to the agent templates or to a given targetList

    C++ signature :
        void RemoveUnmappedReactantTemplates(RDKit::ChemicalReaction* [,double=0.2 [,bool=True [,boost::python::api::object=None]]])

RunReactants(...)

 

RunReactants( (ChemicalReaction)arg1, (tuple)arg2) -> object :
    apply the reaction to a sequence of reactant molecules and return the products as a tuple of tuples

    C++ signature :
        _object* RunReactants(RDKit::ChemicalReaction*,boost::python::tuple)

RunReactants( (ChemicalReaction)arg1, (list)arg2) -> object :
    apply the reaction to a sequence of reactant molecules and return the products as a tuple of tuples

    C++ signature :
        _object* RunReactants(RDKit::ChemicalReaction*,boost::python::list)

ToBinary(...)

 

ToBinary( (ChemicalReaction)arg1) -> object :
    Returns a binary string representation of the reaction.

    C++ signature :
        boost::python::api::object ToBinary(RDKit::ChemicalReaction)

Validate(...)

 

Validate( (ChemicalReaction)self [, (bool)silent=False]) -> tuple :
    checks the reaction for potential problems, returns (numWarnings,numErrors)

    C++ signature :
        boost::python::tuple Validate(RDKit::ChemicalReaction const* [,bool=False])

__getinitargs__(...)

 

__getinitargs__( (ChemicalReaction)arg1) -> tuple :

    C++ signature :
        boost::python::tuple __getinitargs__(RDKit::ChemicalReaction)

__init__(...)
(Constructor)

 

__init__( (object)arg1) -> None :
    Constructor, takes no arguments

    C++ signature :
        void __init__(_object*)

__init__( (object)arg1, (str)arg2) -> None :

    C++ signature :
        void __init__(_object*,std::string)

Overrides: object.__init__

__reduce__(...)

 
helper for pickle

Overrides: object.__reduce__
(inherited documentation)

_getImplicitPropertiesFlag(...)

 

_getImplicitPropertiesFlag( (ChemicalReaction)self) -> bool :
    EXPERT USER: returns whether or not the reaction can have implicit properties

    C++ signature :
        bool _getImplicitPropertiesFlag(RDKit::ChemicalReaction {lvalue})

_setImplicitPropertiesFlag(...)

 

_setImplicitPropertiesFlag( (ChemicalReaction)self, (bool)val) -> None :
    EXPERT USER: indicates that the reaction can have implicit properties

    C++ signature :
        void _setImplicitPropertiesFlag(RDKit::ChemicalReaction {lvalue},bool)