public class Reaction extends ChemObject implements Serializable, IReaction, Cloneable
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.
IReaction.Direction| Modifier and Type | Field and Description |
|---|---|
protected IAtomContainerSet |
agents
These are the used solvent, catalysts etc that normally appear above
the reaction arrow
|
protected int |
growArraySize |
protected IMapping[] |
map |
protected int |
mappingCount |
protected IAtomContainerSet |
products |
protected IAtomContainerSet |
reactants |
| Constructor and Description |
|---|
Reaction()
Constructs an empty, forward reaction.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAgent(IAtomContainer agent)
Adds an agent to this reaction.
|
void |
addMapping(IMapping mapping)
Adds a mapping between the reactant and product side to this
Reaction.
|
void |
addProduct(IAtomContainer product)
Adds a product to this reaction.
|
void |
addProduct(IAtomContainer product,
Double coefficient)
Adds a product to this reaction.
|
void |
addReactant(IAtomContainer reactant)
Adds a reactant to this reaction.
|
void |
addReactant(IAtomContainer reactant,
Double coefficient)
Adds a reactant to this reaction with a stoichiometry coefficient.
|
Object |
clone()
Clones this
Reaction and its content. |
IAtomContainerSet |
getAgents()
Returns a MoleculeSet containing the agents in this reaction.
|
IReaction.Direction |
getDirection()
Returns the direction of the reaction.
|
IMapping |
getMapping(int pos)
Retrieves a mapping between the reactant and product side to this
Reaction.
|
int |
getMappingCount()
Get the number of mappings between the reactant and product side to this
Reaction.
|
Double |
getProductCoefficient(IAtomContainer product)
Returns the stoichiometry coefficient of the given product.
|
Double[] |
getProductCoefficients()
Returns an array of double with the stoichiometric coefficients
of the products.
|
int |
getProductCount()
Returns the number of products in this reaction.
|
IAtomContainerSet |
getProducts()
Returns a MoleculeSet containing the products of this reaction.
|
Double |
getReactantCoefficient(IAtomContainer reactant)
Returns the stoichiometry coefficient of the given reactant.
|
Double[] |
getReactantCoefficients()
Returns an array of double with the stoichiometric coefficients
of the reactants.
|
int |
getReactantCount()
Returns the number of reactants in this reaction.
|
IAtomContainerSet |
getReactants()
Returns a MoleculeSet containing the reactants in this reaction.
|
Iterable<IMapping> |
mappings()
Returns the mappings between the reactant and the product side.
|
void |
removeMapping(int pos)
Removes a mapping between the reactant and product side to this
Reaction.
|
void |
setDirection(IReaction.Direction direction)
Sets the direction of the reaction.
|
boolean |
setProductCoefficient(IAtomContainer product,
Double coefficient)
Sets the coefficient of a a product to a given value.
|
boolean |
setProductCoefficients(Double[] coefficients)
Sets the coefficient of the products.
|
void |
setProducts(IAtomContainerSet setOfMolecules)
Assigns a MoleculeSet to the products of this reaction.
|
boolean |
setReactantCoefficient(IAtomContainer reactant,
Double coefficient)
Sets the coefficient of a a reactant to a given value.
|
boolean |
setReactantCoefficients(Double[] coefficients)
Sets the coefficients of the reactants.
|
void |
setReactants(IAtomContainerSet setOfMolecules)
Assigns a MoleculeSet to the reactants in this reaction.
|
String |
toString()
Returns a one line string representation of this Atom.
|
addListener, addProperties, compare, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopyequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setPropertygetBuilderprotected int growArraySize
protected IAtomContainerSet reactants
protected IAtomContainerSet products
protected IAtomContainerSet agents
protected IMapping[] map
protected int mappingCount
public int getReactantCount()
getReactantCount in interface IReactionpublic int getProductCount()
getProductCount in interface IReactionpublic IAtomContainerSet getReactants()
getReactants in interface IReactionIReaction.setReactants(org.openscience.cdk.interfaces.IAtomContainerSet)public void setReactants(IAtomContainerSet setOfMolecules)
setReactants in interface IReactionsetOfMolecules - The new set of reactantsgetReactants()public IAtomContainerSet getProducts()
getProducts in interface IReactionIReaction.setProducts(org.openscience.cdk.interfaces.IAtomContainerSet)public void setProducts(IAtomContainerSet setOfMolecules)
setProducts in interface IReactionsetOfMolecules - The new set of productsgetProducts()public IAtomContainerSet getAgents()
getAgents in interface IReactionaddAgent(org.openscience.cdk.interfaces.IAtomContainer)public Iterable<IMapping> mappings()
mappings in interface IReactionaddMapping(org.openscience.cdk.interfaces.IMapping)public void addReactant(IAtomContainer reactant)
addReactant in interface IReactionreactant - Molecule added as reactant to this reactiongetReactants()public void addAgent(IAtomContainer agent)
addAgent in interface IReactionagent - Molecule added as agent to this reactiongetAgents()public void addReactant(IAtomContainer reactant, Double coefficient)
addReactant in interface IReactionreactant - Molecule added as reactant to this reactioncoefficient - Stoichiometry coefficient for this moleculegetReactants()public void addProduct(IAtomContainer product)
addProduct in interface IReactionproduct - Molecule added as product to this reactiongetProducts()public void addProduct(IAtomContainer product, Double coefficient)
addProduct in interface IReactionproduct - Molecule added as product to this reactioncoefficient - Stoichiometry coefficient for this moleculegetProducts()public Double getReactantCoefficient(IAtomContainer reactant)
getReactantCoefficient in interface IReactionreactant - Reactant for which the coefficient is returned.setReactantCoefficient(org.openscience.cdk.interfaces.IAtomContainer, java.lang.Double)public Double getProductCoefficient(IAtomContainer product)
getProductCoefficient in interface IReactionproduct - Product for which the coefficient is returned.setProductCoefficient(org.openscience.cdk.interfaces.IAtomContainer, java.lang.Double)public boolean setReactantCoefficient(IAtomContainer reactant, Double coefficient)
setReactantCoefficient in interface IReactionreactant - Reactant for which the coefficient is setcoefficient - The new coefficient for the given reactantgetReactantCoefficient(org.openscience.cdk.interfaces.IAtomContainer)public boolean setProductCoefficient(IAtomContainer product, Double coefficient)
setProductCoefficient in interface IReactionproduct - Product for which the coefficient is setcoefficient - The new coefficient for the given productgetProductCoefficient(org.openscience.cdk.interfaces.IAtomContainer)public Double[] getReactantCoefficients()
getReactantCoefficients in interface IReactionsetReactantCoefficients(java.lang.Double[])public Double[] getProductCoefficients()
getProductCoefficients in interface IReactionsetProductCoefficients(java.lang.Double[])public boolean setReactantCoefficients(Double[] coefficients)
setReactantCoefficients in interface IReactioncoefficients - An array of double's containing the coefficients of the reactantsgetReactantCoefficients()public boolean setProductCoefficients(Double[] coefficients)
setProductCoefficients in interface IReactioncoefficients - An array of double's containing the coefficients of the productsgetProductCoefficients()public void setDirection(IReaction.Direction direction)
setDirection in interface IReactiondirection - The new reaction directiongetDirection()public IReaction.Direction getDirection()
getDirection in interface IReactionIReaction.Direction,
setDirection(org.openscience.cdk.interfaces.IReaction.Direction)public void addMapping(IMapping mapping)
addMapping in interface IReactionmapping - Mapping to add.mappings()public void removeMapping(int pos)
removeMapping in interface IReactionpos - Position of the Mapping to remove.mappings()public IMapping getMapping(int pos)
getMapping in interface IReactionpos - Position of Mapping to get.public int getMappingCount()
getMappingCount in interface IReactionpublic String toString()
toString in interface IChemObjecttoString in class Objectpublic Object clone() throws CloneNotSupportedException
Reaction and its content.clone in interface IChemObjectclone in class ChemObjectCloneNotSupportedException - if the IChemObject cannot be clonedCopyright © 2021. All rights reserved.