Package org.openscience.cdk.interfaces
Interface IReaction
- All Superinterfaces:
Cloneable,ICDKObject,IChemObject,Iterable<IAtomContainer>
- All Known Implementing Classes:
DebugReaction,Reaction,Reaction
Represents the idea of a chemical reaction. The reaction consists of
a set of reactants and a set of products.
The class mostly represents abstract reactions, such as 2D diagrams, and is not intended to represent reaction trajectories. Such can better be represented with a ChemSequence.
- Author:
- Egon Willighagen <elw38@cam.ac.uk>
- Keywords:
- reaction
- Created on:
- 2003-02-13
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumPermissible reaction directions. -
Field Summary
Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, MARKUSH, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAgent(IAtomContainer agent) Adds an agent to this reaction.voidaddMapping(IMapping mapping) Adds a mapping between the reactant and product side to this Reaction.voidaddProduct(IAtomContainer product) Adds a product to this reaction.voidaddProduct(IAtomContainer product, Double coefficient) Adds a product to this reaction.voidaddReactant(IAtomContainer reactant) Adds a reactant to this reaction.voidaddReactant(IAtomContainer reactant, Double coefficient) Adds a reactant to this reaction with a stoichiometry coefficient.intReturns the number of agents in this reaction.Returns a IAtomContaineSet containing the agents in this reaction.Returns theIReaction.Directionof the reaction.getMapping(int pos) Retrieves a mapping between the reactant and product side to this Reaction.intGet the number of mappings between the reactant and product side to this Reaction.getProductCoefficient(IAtomContainer product) Returns the stoichiometry coefficient of the given product.Double[]Returns an array of double with the stoichiometric coefficients of the products.intReturns the number of products in this reaction.Returns a IAtomContaineSet containing the products of this reaction.getReactantCoefficient(IAtomContainer reactant) Returns the stoichiometry coefficient of the given reactant.Double[]Returns an array of double with the stoichiometric coefficients of the reactants.intReturns the number of reactants in this reaction.Returns a IAtomContaineSet containing the reactants in this reaction.default Iterator<IAtomContainer>iterator()An iterator for all the containers in this reaction.mappings()Returns the mappings between the reactant and the product side.voidremoveMapping(int pos) Removes a mapping between the reactant and product side to this Reaction.voidsetDirection(IReaction.Direction direction) Sets the direction of the reaction.booleansetProductCoefficient(IAtomContainer product, Double coefficient) Sets the coefficient of a a product to a given value.booleansetProductCoefficients(Double[] coefficients) Sets the coefficient of the products.voidsetProducts(IAtomContainerSet products) Assigns a IAtomContaineSet to the products of this reaction.booleansetReactantCoefficient(IAtomContainer reactant, Double coefficient) Sets the coefficient of a a reactant to a given value.booleansetReactantCoefficients(Double[] coefficients) Sets the coefficients of the reactants.voidsetReactants(IAtomContainerSet reactants) Assigns a IAtomContaineSet to the reactants in this reaction.Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilderMethods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clear, clone, flags, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toStringMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getReactantCount
int getReactantCount()Returns the number of reactants in this reaction.- Returns:
- The number of reactants in this reaction
-
getProductCount
int getProductCount()Returns the number of products in this reaction.- Returns:
- The number of products in this reaction
-
getAgentCount
int getAgentCount()Returns the number of agents in this reaction.- Returns:
- The number of agents in this reaction
-
getReactants
IAtomContainerSet getReactants()Returns a IAtomContaineSet containing the reactants in this reaction.- Returns:
- A IAtomContaineSet containing the reactants in this reaction
- See Also:
-
setReactants
Assigns a IAtomContaineSet to the reactants in this reaction.- Parameters:
reactants- The new set of reactants- See Also:
-
getProducts
IAtomContainerSet getProducts()Returns a IAtomContaineSet containing the products of this reaction.- Returns:
- A IAtomContaineSet containing the products in this reaction
- See Also:
-
setProducts
Assigns a IAtomContaineSet to the products of this reaction.- Parameters:
products- The new set of products- See Also:
-
getAgents
IAtomContainerSet getAgents()Returns a IAtomContaineSet containing the agents in this reaction.- Returns:
- A IAtomContaineSet containing the agents in this reaction
- See Also:
-
iterator
An iterator for all the containers in this reaction. The containers will be provided reactants then agents, then products.- Specified by:
iteratorin interfaceIterable<IAtomContainer>- Returns:
- the iterator
-
mappings
Returns the mappings between the reactant and the product side.- Returns:
- An
Iterableto the Mappings. - See Also:
-
addReactant
Adds a reactant to this reaction.- Parameters:
reactant- Molecule added as reactant to this reaction- See Also:
-
addAgent
Adds an agent to this reaction.- Parameters:
agent- Molecule added as agent to this reaction- See Also:
-
addReactant
Adds a reactant to this reaction with a stoichiometry coefficient.- Parameters:
reactant- Molecule added as reactant to this reactioncoefficient- Stoichiometry coefficient for this molecule- See Also:
-
addProduct
Adds a product to this reaction.- Parameters:
product- Molecule added as product to this reaction- See Also:
-
addProduct
Adds a product to this reaction.- Parameters:
product- Molecule added as product to this reactioncoefficient- Stoichiometry coefficient for this molecule- See Also:
-
getReactantCoefficient
Returns the stoichiometry coefficient of the given reactant.- Parameters:
reactant- Reactant for which the coefficient is returned.- Returns:
- -1, if the given molecule is not a product in this Reaction
- See Also:
-
getProductCoefficient
Returns the stoichiometry coefficient of the given product.- Parameters:
product- Product for which the coefficient is returned.- Returns:
- -1, if the given molecule is not a product in this Reaction
- See Also:
-
setReactantCoefficient
Sets the coefficient of a a reactant to a given value.- Parameters:
reactant- Reactant for which the coefficient is setcoefficient- The new coefficient for the given reactant- Returns:
- true if Molecule has been found and stoichiometry has been set.
- See Also:
-
setProductCoefficient
Sets the coefficient of a a product to a given value.- Parameters:
product- Product for which the coefficient is setcoefficient- The new coefficient for the given product- Returns:
- true if Molecule has been found and stoichiometry has been set.
- See Also:
-
getReactantCoefficients
Double[] getReactantCoefficients()Returns an array of double with the stoichiometric coefficients of the reactants.- Returns:
- An array of double's containing the coefficients of the reactants
- See Also:
-
getProductCoefficients
Double[] getProductCoefficients()Returns an array of double with the stoichiometric coefficients of the products.- Returns:
- An array of double's containing the coefficients of the products
- See Also:
-
setReactantCoefficients
Sets the coefficients of the reactants.- Parameters:
coefficients- An array of double's containing the coefficients of the reactants- Returns:
- true if coefficients have been set.
- See Also:
-
setProductCoefficients
Sets the coefficient of the products.- Parameters:
coefficients- An array of double's containing the coefficients of the products- Returns:
- true if coefficients have been set.
- See Also:
-
setDirection
Sets the direction of the reaction.- Parameters:
direction- The new reaction direction- See Also:
-
getDirection
IReaction.Direction getDirection()Returns theIReaction.Directionof the reaction.- Returns:
- The direction of this reaction (FORWARD, BACKWARD or BIDIRECTIONAL).
- See Also:
-
addMapping
Adds a mapping between the reactant and product side to this Reaction.- Parameters:
mapping- Mapping to add.- See Also:
-
removeMapping
void removeMapping(int pos) Removes a mapping between the reactant and product side to this Reaction.- Parameters:
pos- Position of the Mapping to remove.- See Also:
-
getMapping
Retrieves a mapping between the reactant and product side to this Reaction.- Parameters:
pos- Position of Mapping to get.- Returns:
- the mapping identified by the specified position
-
getMappingCount
int getMappingCount()Get the number of mappings between the reactant and product side to this Reaction.- Returns:
- Number of stored Mappings.
-