3
* $Author: kaihartmann $
4
* $Date: 2007-01-05 17:31:35 +0100 (Fri, 05 Jan 2007) $
7
* Copyright (C) 2006-2007 Egon Willighagen <egonw@users.sf.net>
9
* Contact: cdk-devel@lists.sourceforge.net
11
* This program is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Lesser General Public License
13
* as published by the Free Software Foundation; either version 2.1
14
* of the License, or (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License for more details.
21
* You should have received a copy of the GNU Lesser General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25
package org.openscience.cdk.interfaces;
28
* A set of AtomContainers.
31
* @cdk.module interfaces
33
public interface IAtomContainerSet extends IChemObject {
36
* Adds an atomContainer to this container.
38
* @param atomContainer The atomContainer to be added to this container
40
public void addAtomContainer(IAtomContainer atomContainer);
43
* Removes an AtomContainer from this container.
45
* @param atomContainer The atomContainer to be removed from this container
47
public void removeAtomContainer(IAtomContainer atomContainer);
50
* Removes all AtomContainer from this container.
52
public void removeAllAtomContainers();
55
* Removes an AtomContainer from this container.
57
* @param pos The position of the AtomContainer to be removed from this container
59
public void removeAtomContainer(int pos);
62
* Replace the AtomContainer at a specific position (array has to be large enough).
64
* @param position position in array for AtomContainer
65
* @param container the replacement AtomContainer
67
public void replaceAtomContainer(int position, IAtomContainer container);
70
* Sets the coefficient of a AtomContainer to a given value.
72
* @param container The AtomContainer for which the multiplier is set
73
* @param multiplier The new multiplier for the AtomContatiner
74
* @return true if multiplier has been set
75
* @see #getMultiplier(IAtomContainer)
77
public boolean setMultiplier(IAtomContainer container, double multiplier);
80
* Sets the coefficient of a AtomContainer to a given value.
82
* @param position The position of the AtomContainer for which the multiplier is
84
* @param multiplier The new multiplier for the AtomContatiner at
85
* <code>position</code>
86
* @see #getMultiplier(int)
88
public void setMultiplier(int position, double multiplier);
91
* Returns an array of double with the stoichiometric coefficients
94
* @return The multipliers for the AtomContainer's in this set
95
* @see #setMultipliers
97
public double[] getMultipliers();
100
* Sets the multipliers of the AtomContainers.
102
* @param newMultipliers The new multipliers for the AtomContainers in this set
103
* @return true if multipliers have been set.
104
* @see #getMultipliers
106
public boolean setMultipliers(double[] newMultipliers);
109
* Adds an atomContainer to this container with the given
112
* @param atomContainer The atomContainer to be added to this container
113
* @param multiplier The multiplier of this atomContainer
115
public void addAtomContainer(IAtomContainer atomContainer, double multiplier);
118
* Adds all atomContainers in the AtomContainerSet to this container.
120
* @param atomContainerSet The AtomContainerSet
122
public void add(IAtomContainerSet atomContainerSet);
125
* Get an iterator for this AtomContainerSet.
127
* @return A new Iterator for this AtomContainerSet.
129
public java.util.Iterator atomContainers();
132
* Returns the AtomContainer at position <code>number</code> in the
135
* @param number The position of the AtomContainer to be returned.
136
* @return The AtomContainer at position <code>number</code> .
138
public IAtomContainer getAtomContainer(int number);
141
* Returns the multiplier for the AtomContainer at position <code>number</code> in the
144
* @param number The position of the multiplier of the AtomContainer to be returned.
145
* @return The multiplier for the AtomContainer at position <code>number</code> .
146
* @see #setMultiplier(int, double)
148
public double getMultiplier(int number);
151
* Returns the multiplier of the given AtomContainer.
153
* @param container The AtomContainer for which the multiplier is given
154
* @return -1, if the given molecule is not a container in this set
155
* @see #setMultiplier(IAtomContainer, double)
157
public double getMultiplier(IAtomContainer container);
160
* Returns the number of AtomContainers in this Container.
162
* @return The number of AtomContainers in this Container
164
public int getAtomContainerCount();