rdkit.Chem.rdChemReactions.ChemicalReaction

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]
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 |
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 |
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 |
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 |
Validate(...) Validate( (ChemicalReaction)self [, (bool)silent=False]) -> tuple : checks the reaction for potential problems, returns (numWarnings,numErrors) |
__init__(...) __init__( (object)arg1) -> None : |
__reduce__(...) helper for pickle |
Inherited from `unreachable.instance`: `__new__` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]
| __instance_size__ = `36`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### 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>)

### 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})

### 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})

### 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)

### 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])

### __init__(...) (Constructor) |
    __init__( (object)arg1) -> None :

        C++ signature :
            void __init__(_object*)
Overrides: object.__init__

### __reduce__(...) |
    helper for pickle
Overrides: object.__reduce__ (inherited documentation)