![]() |
Chemical Data Processing Library Python API - Version 1.2.3
|
Inheritance diagram for CDPL.Chem.Reaction:Classes | |
| class | ComponentSequence |
Public Member Functions | |
| None | __init__ () |
| Initializes the Reaction instance. | |
| None | clear () |
| Removes all components and clears all properties of the reaction. | |
| Molecule | addComponent (int role) |
| Creates a new reaction component with the specified role. More... | |
| bool | containsComponent (Molecule mol) |
| Tells whether the specified molecule is a component of this reaction. More... | |
| int | getComponentRole (Molecule mol) |
| Returns the reaction role of the specified component. More... | |
| int | getComponentIndex (Molecule mol) |
| Returns the index of the specified reaction component. More... | |
| int | getNumComponents (int role) |
| Returns the number of reaction components with the specified role. More... | |
| int | getNumComponents () |
| Returns the number of reaction components. More... | |
| Molecule | getComponent (int idx, int role) |
| Returns a reference to the reaction component at index idx in the list of components with the specified role. More... | |
| Molecule | getComponent (int idx) |
| Returns a reference to the reaction component at index idx. More... | |
| None | removeComponents (int role) |
| Removes all components with the specified role. More... | |
| None | removeComponent (int idx, int role) |
| Removes the reaction component at index idx in the list of components with the specified role. More... | |
| None | removeComponent (int idx) |
| Removes the reaction component at the specified index. More... | |
| None | swapComponentRoles (int role1, int role2) |
| Swaps the reaction roles of the component sets specified by role1 and role2. More... | |
| Reaction | clone () |
| Creates a copy of the current reaction state. More... | |
| None | copy (Reaction rxn) |
| Replaces the current set of reaction components and properties by a copy of the components and properties of the reaction rxn. More... | |
| Reaction | assign (Reaction rxn) |
| Replaces the current set of reaction components and properties by a copy of the components and properties of the reaction rxn. More... | |
| ComponentSequence | getReactants () |
| ComponentSequence | getAgents () |
| ComponentSequence | getProducts () |
| None | invokeCopyPostprocessingFunctions (Reaction src_rxn) |
| tuple | __getstate__ () |
| Molecule | __getitem__ (int idx) |
| Base.Any | __getitem__ (Base.LookupKey key) |
| None | __delitem__ (int idx) |
| bool | __delitem__ (Base.LookupKey key) |
| bool | __contains__ (Molecule mol) |
Returns the result of the membership test operation mol in self. More... | |
| bool | __contains__ (Base.LookupKey key) |
Returns the result of the membership test operation key in self. More... | |
| None | __setitem__ (Base.LookupKey key, Base.Any value) |
| int | __len__ () |
Public Member Functions inherited from CDPL.Base.PropertyContainer | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| int | getNumProperties () |
| Returns the number of property entries. More... | |
| Any | getPropertyOrDefault (LookupKey key, Any def_value) |
| list | getPropertyKeys () |
| list | getPropertyValues () |
| list | getProperties () |
| Returns a reference to itself. More... | |
| None | setProperty (LookupKey key, Any value) |
| bool | removeProperty (LookupKey key) |
| Clears the value of the property specified by key. More... | |
| Any | getProperty (LookupKey key, bool throw_=False) |
| Returns the value of the property specified by key. More... | |
| bool | isPropertySet (LookupKey key) |
| Tells whether or not a value has been assigned to the property specified by key. More... | |
| None | clearProperties () |
| Clears all property values. | |
| None | addProperties (PropertyContainer cntnr) |
Adds the property value entries in the PropertyContainer instance cntnr. More... | |
| None | copyProperties (PropertyContainer cntnr) |
| Replaces the current set of properties by a copy of the entries in cntnr. More... | |
| None | swap (PropertyContainer cntnr) |
| Exchanges the properties of this container with the properties of the container cntnr. More... | |
| Any | __getitem__ (LookupKey key) |
| bool | __contains__ (LookupKey key) |
Returns the result of the membership test operation key in self. More... | |
| None | __setitem__ (LookupKey key, Any value) |
| bool | __delitem__ (LookupKey key) |
Static Public Member Functions | |
| None | registerCopyPostprocessingFunction (VoidMoleculeMolecularGraphFunctor func) |
Properties | |
| reactants = property(getReactants) | |
| agents = property(getAgents) | |
| products = property(getProducts) | |
| numComponents = property(getNumComponents) | |
Properties inherited from CDPL.Base.PropertyContainer | |
| objectID = property(getObjectID) | |
| propertyKeys = property(getPropertyKeys) | |
| propertyValues = property(getPropertyValues) | |
| properties = property(getProperties) | |
| numProperties = property(getNumProperties) | |
| Molecule CDPL.Chem.Reaction.addComponent | ( | int | role | ) |
Creates a new reaction component with the specified role.
| role | A flag specifying the reaction role of the new component (see namespace Chem.ReactionRole). |
| Base.ValueError | if the value of role is not Chem.ReactionRole.REACTANT, Chem.ReactionRole.AGENT or Chem.ReactionRole.PRODUCT. |
Reimplemented in CDPL.Chem.BasicReaction.
| bool CDPL.Chem.Reaction.containsComponent | ( | Molecule | mol | ) |
Tells whether the specified molecule is a component of this reaction.
| mol | The molecule to look for. |
True if the specified molecule is a component of this reaction, and False otherwise. | int CDPL.Chem.Reaction.getComponentRole | ( | Molecule | mol | ) |
Returns the reaction role of the specified component.
If the specified molecule is not a component of this reaction, Chem.ReactionRole.NONE will be returned.
| mol | The component for which to return the reaction role. |
| int CDPL.Chem.Reaction.getComponentIndex | ( | Molecule | mol | ) |
Returns the index of the specified reaction component.
| mol | The component for which to return the index. |
| Base.ItemNotFound | if the specified molecule is not a component of this reaction. |
| int CDPL.Chem.Reaction.getNumComponents | ( | int | role | ) |
Returns the number of reaction components with the specified role.
| role | A flag that specifies the reaction role (see namespace Chem.ReactionRole). |
| Base.ValueError | if the value of role is not equal to Chem.ReactionRole.REACTANT, Chem.ReactionRole.AGENT or Chem.ReactionRole.PRODUCT. |
| int CDPL.Chem.Reaction.getNumComponents | ( | ) |
Returns the number of reaction components.
| Molecule CDPL.Chem.Reaction.getComponent | ( | int | idx, |
| int | role | ||
| ) |
Returns a reference to the reaction component at index idx in the list of components with the specified role.
| idx | The zero-based index of the reaction component to return. |
| role | A flag indicating the reaction role of the component (see namespace Chem.ReactionRole). |
| Base.IndexError | if the number of components with the specified role is zero or idx is not in the range [0, getNumComponents(role) - 1]. Base.ValueError if the value of role is not equal to Chem.ReactionRole.REACTANT, Chem.ReactionRole.AGENT or Chem.ReactionRole.PRODUCT. |
| Molecule CDPL.Chem.Reaction.getComponent | ( | int | idx | ) |
Returns a reference to the reaction component at index idx.
| idx | The zero-based index of the reaction component to return. |
| Base.IndexError | if the number of components is zero or idx is not in the range [0, getNumComponents() - 1]. |
| None CDPL.Chem.Reaction.removeComponents | ( | int | role | ) |
Removes all components with the specified role.
| role | A flag specifying the reaction role of the components to remove (see namespace Chem.ReactionRole). |
| Base.ValueError | if the value of role is not Chem.ReactionRole.REACTANT, Chem.ReactionRole.AGENT or Chem.ReactionRole.PRODUCT. |
| None CDPL.Chem.Reaction.removeComponent | ( | int | idx, |
| int | role | ||
| ) |
Removes the reaction component at index idx in the list of components with the specified role.
| idx | The zero-based index of the component to remove. |
| role | The reaction role of the components |
| Base.IndexError | if the number of components with the specified role is zero or idx is not in the range [0, getNumComponents(role) - 1]. Base.ValueError if the value of role is not Chem.ReactionRole.REACTANT, Chem.ReactionRole.AGENT or Chem.ReactionRole.PRODUCT. |
| None CDPL.Chem.Reaction.removeComponent | ( | int | idx | ) |
Removes the reaction component at the specified index.
| idx | The zero-based index of the component to remove. |
| Base.IndexError | if the number of components is zero or idx is not in the range [0, getNumComponents() - 1]. |
| None CDPL.Chem.Reaction.swapComponentRoles | ( | int | role1, |
| int | role2 | ||
| ) |
Swaps the reaction roles of the component sets specified by role1 and role2.
If role1 is equal to role2, the method has no effect.
| role1 | A flag specifying the reaction role of the first component set (see namespace Chem.ReactionRole). |
| role2 | A flag specifying the reaction role of the second component set (see namespace Chem.ReactionRole). |
| Base.ValueError | if the value of role1 and/or role2 is not equal to Chem.ReactionRole.REACTANT, Chem.ReactionRole.AGENT or Chem.ReactionRole.PRODUCT. |
| Reaction CDPL.Chem.Reaction.clone | ( | ) |
Creates a copy of the current reaction state.
| None CDPL.Chem.Reaction.copy | ( | Reaction | rxn | ) |
Replaces the current set of reaction components and properties by a copy of the components and properties of the reaction rxn.
| rxn | The reaction to copy. |
Reimplemented in CDPL.Chem.BasicReaction.
Replaces the current set of reaction components and properties by a copy of the components and properties of the reaction rxn.
Internally calls copy() to perform the actual work.
| rxn | The reaction to copy. |
Reimplemented in CDPL.Chem.BasicReaction.
| ComponentSequence CDPL.Chem.Reaction.getReactants | ( | ) |
| ComponentSequence CDPL.Chem.Reaction.getAgents | ( | ) |
| ComponentSequence CDPL.Chem.Reaction.getProducts | ( | ) |
|
static |
| func |
| None CDPL.Chem.Reaction.invokeCopyPostprocessingFunctions | ( | Reaction | src_rxn | ) |
| src_rxn |
| tuple CDPL.Chem.Reaction.__getstate__ | ( | ) |
| arg1 |
| Molecule CDPL.Chem.Reaction.__getitem__ | ( | int | idx | ) |
| idx |
| Base.Any CDPL.Chem.Reaction.__getitem__ | ( | Base.LookupKey | key | ) |
| key |
| None CDPL.Chem.Reaction.__delitem__ | ( | int | idx | ) |
| idx |
| bool CDPL.Chem.Reaction.__delitem__ | ( | Base.LookupKey | key | ) |
| key |
| bool CDPL.Chem.Reaction.__contains__ | ( | Molecule | mol | ) |
Returns the result of the membership test operation mol in self.
| mol | The value to test for membership. |
| bool CDPL.Chem.Reaction.__contains__ | ( | Base.LookupKey | key | ) |
Returns the result of the membership test operation key in self.
| key | The value to test for membership. |
| None CDPL.Chem.Reaction.__setitem__ | ( | Base.LookupKey | key, |
| Base.Any | value | ||
| ) |
| key | |
| value |
| int CDPL.Chem.Reaction.__len__ | ( | ) |
Reimplemented from CDPL.Base.PropertyContainer.