Interface IReaction

  • All Superinterfaces:
    Cloneable, ICDKObject, IChemObject
    All Known Implementing Classes:
    DebugReaction, Reaction, Reaction

    public interface IReaction
    extends IChemObject
    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>
    Source code:
    main
    Belongs to CDK module:
    interfaces
    Keywords:
    reaction
    Created on:
    2003-02-13
    • Method Detail

      • 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
      • setReactants

        void setReactants​(IAtomContainerSet reactants)
        Assigns a IAtomContaineSet to the reactants in this reaction.
        Parameters:
        reactants - The new set of reactants
        See Also:
        getReactants()
      • setProducts

        void setProducts​(IAtomContainerSet products)
        Assigns a IAtomContaineSet to the products of this reaction.
        Parameters:
        products - The new set of products
        See Also:
        getProducts()
      • addReactant

        void addReactant​(IAtomContainer reactant)
        Adds a reactant to this reaction.
        Parameters:
        reactant - Molecule added as reactant to this reaction
        See Also:
        getReactants()
      • addAgent

        void addAgent​(IAtomContainer agent)
        Adds an agent to this reaction.
        Parameters:
        agent - Molecule added as agent to this reaction
        See Also:
        getAgents()
      • addReactant

        void addReactant​(IAtomContainer reactant,
                         Double coefficient)
        Adds a reactant to this reaction with a stoichiometry coefficient.
        Parameters:
        reactant - Molecule added as reactant to this reaction
        coefficient - Stoichiometry coefficient for this molecule
        See Also:
        getReactants()
      • addProduct

        void addProduct​(IAtomContainer product)
        Adds a product to this reaction.
        Parameters:
        product - Molecule added as product to this reaction
        See Also:
        getProducts()
      • addProduct

        void addProduct​(IAtomContainer product,
                        Double coefficient)
        Adds a product to this reaction.
        Parameters:
        product - Molecule added as product to this reaction
        coefficient - Stoichiometry coefficient for this molecule
        See Also:
        getProducts()
      • 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:
        setReactantCoefficients(java.lang.Double[])
      • 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:
        setProductCoefficients(java.lang.Double[])
      • setReactantCoefficients

        boolean setReactantCoefficients​(Double[] coefficients)
        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:
        getReactantCoefficients()
      • setProductCoefficients

        boolean setProductCoefficients​(Double[] coefficients)
        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:
        getProductCoefficients()
      • setDirection

        void setDirection​(IReaction.Direction direction)
        Sets the direction of the reaction.
        Parameters:
        direction - The new reaction direction
        See Also:
        getDirection()
      • addMapping

        void addMapping​(IMapping mapping)
        Adds a mapping between the reactant and product side to this Reaction.
        Parameters:
        mapping - Mapping to add.
        See Also:
        mappings()
      • 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:
        mappings()
      • getMapping

        IMapping getMapping​(int pos)
        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.