Class RingSet
java.lang.Object
org.openscience.cdk.ChemObject
org.openscience.cdk.AtomContainerSet
org.openscience.cdk.RingSet
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<IAtomContainer>, IAtomContainerSet, ICDKObject, IChemObject, IChemObjectListener, IRingSet
- Direct Known Subclasses:
DebugRingSet
Maintains a set of Ring objects.
- See Also:
- Keywords:
- ring, set of
-
Field Summary
Fields inherited from class AtomContainerSet
atomContainerCount, atomContainers, growArraySize, multipliersModifier and TypeFieldDescriptionprotected intNumber of AtomContainers contained by this container.protected IAtomContainer[]Array of AtomContainers.protected intAmount by which the AtomContainers array grows when elements are added and the array is not large enough for that.protected Double[]Defines the number of instances of a certain molecule in the set.Fields inherited from interface IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HIDDEN, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, MARKUSH, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITEDModifier and TypeFieldDescriptionstatic final intFlag that is set if a ChemObject is part of an aliphatic chain.static final intFlag is set if ChemObject is part of an aromatic system.static final intFlag is set if ChemObject is part of a conjugated system.static final intThis flag can be used when depicted structures to hide certain parts, for example the things are abbreviated (display shortcuts).static final intSets to true if the atom is a hydrogen bond acceptor.static final intSets to true if the atom is a hydrogen bond donor.static final intFlag that is set when the ChemObject is part of a ring.static final intFlag is set if a ChemObject is mapped to another ChemObject.static final intFlag to indicate a flattened molecule holds a Markush structure, you can work on it as is or it might make more sense to repack into something sensible like a RGroupQuery.static final intFlag that is set when the ChemObject is part of a ring.static final intFlag that is set if the ChemObject is placed when calculating 2D/3D layouts.static final intFlag is set if a ChemObject has reactive center.static final intFlag used for marking uncertainty of the bond order.static final intFlag is set if an atom could be typed.static final intFlag is set if ChemObject has been visited. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds all rings of another RingSet if they are not already part of this ring set.clone()Clones thisRingSetincluding the Rings.booleanTrue, if at least one of the rings in the ringset contains the given atom.booleancontains(IAtomContainer ring) Checks for presence of a ring in this RingSet.getConnectedRings(IRing ring) Returns all the rings in the RingSet that share one or more atoms with a given ring.Returns a vector of all rings that this atom is part of.Returns a vector of all rings that this bond is part of.toString()Returns the String representation of this RingSet.Methods inherited from class AtomContainerSet
add, addAtomContainer, addAtomContainer, atomContainers, getAtomContainer, getAtomContainerCount, getMultiplier, getMultiplier, getMultipliers, growAtomContainerArray, isEmpty, removeAllAtomContainers, removeAtomContainer, removeAtomContainer, replaceAtomContainer, setMultiplier, setMultiplier, setMultipliers, sortAtomContainers, stateChangedModifier and TypeMethodDescriptionvoidadd(IAtomContainerSet atomContainerSet) Adds all atomContainers in the AtomContainerSet to this container.voidaddAtomContainer(IAtomContainer atomContainer) Adds an atomContainer to this container.voidaddAtomContainer(IAtomContainer atomContainer, double multiplier) Adds an atomContainer to this container with the given multiplier.Get an iterator for this AtomContainerSet.getAtomContainer(int number) Returns the AtomContainer at positionnumberin the container.intReturns the number of AtomContainers in this Container.getMultiplier(int number) Returns the multiplier for the AtomContainer at positionnumberin the container.getMultiplier(IAtomContainer container) Returns the multiplier of the given AtomContainer.Double[]Returns an array of double with the stoichiometric coefficients of the products.protected voidGrows the atomContainer array by a given size.booleanisEmpty()Returns true if this IAtomContainerSet is empty.voidRemoves all AtomContainer from this container.voidremoveAtomContainer(int pos) Removes an AtomContainer from this container.voidremoveAtomContainer(IAtomContainer atomContainer) Removes an AtomContainer from this container.voidreplaceAtomContainer(int position, IAtomContainer container) Replace the AtomContainer at a specific position (array has to be large enough).voidsetMultiplier(int position, Double multiplier) Sets the coefficient of a AtomContainer to a given value.booleansetMultiplier(IAtomContainer container, Double multiplier) Sets the coefficient of a AtomContainer to a given value.booleansetMultipliers(Double[] newMultipliers) Sets the multipliers of the AtomContainers.voidsortAtomContainers(Comparator<IAtomContainer> comparator) Sort the AtomContainers and multipliers using a provided Comparator.voidCalled by objects to which this object has registered as a listener.Methods inherited from class ChemObject
addListener, addProperties, clear, compare, flags, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopyModifier and TypeMethodDescriptionvoidUse this to add yourself to this IChemObject as a listener.voidaddProperties(Map<Object, Object> properties) Sets the properties of this object.voidclear(int flags) Clear the provided flags.booleanCompares a IChemObject with this IChemObject.intflags()Access the current value of the flags for this ChemObject.Returns aIChemObjectBuilderfor the data classes that extend this class.booleangetFlag(int mask) Returns the value of a given flag.boolean[]getFlags()Returns the whole set of flags.Access the internal value used to store the flags.getID()Returns the identifier (ID) of this object.intReturns the number of ChemObjectListeners registered with this object.booleanReturns the flag that indicates whether notification messages are sent around.Returns a Map with the IChemObject's properties.<T> TgetProperty(Object description) Returns a property for the IChemObject.<T> TgetProperty(Object description, Class<T> c) Access a property of the given description and cast the specified class.booleanis(int flags) Test if a flag(s) are set on this ChemObject.voidThis should be triggered by an method that changes the content of an object to that the registered listeners can react to it.voidThis should be triggered by an method that changes the content of an object to that the registered listeners can react to it.voidUse this to remove a ChemObjectListener from the ListenerList of this IChemObject.voidremoveProperty(Object description) Removes a property for a IChemObject.voidset(int flags) Set the provided flags.voidsetFlag(int mask, boolean value) Sets the value of some flag.voidsetFlags(boolean[] flagsNew) Sets the whole set of flags.voidSets the identifier (ID) of this object.voidsetNotification(boolean bool) Set a flag to use or not use notification.voidsetProperties(Map<Object, Object> properties) Set the properties of this object to the provided map (shallow copy).voidsetProperty(Object description, Object property) Sets a property for a IChemObject.Clones thisIChemObject, but preserves references toObjects.Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IAtomContainerSet
iteratorModifier and TypeMethodDescriptiondefault Iterator<IAtomContainer> iterator()Iterator for the containers in this set.Methods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
RingSet
public RingSet()The constructor.
-
-
Method Details
-
getRings
-
getRings
-
getConnectedRings
Returns all the rings in the RingSet that share one or more atoms with a given ring.- Specified by:
getConnectedRingsin interfaceIRingSet- Parameters:
ring- A ring with which all return rings must share one or more atoms- Returns:
- All the rings that share one or more atoms with a given ring.
-
add
Adds all rings of another RingSet if they are not already part of this ring set. If you want to add a single ring to the set useAtomContainerSet.addAtomContainer(org.openscience.cdk.interfaces.IAtomContainer) -
contains
-
contains
Checks for presence of a ring in this RingSet. -
clone
Clones thisRingSetincluding the Rings.- Specified by:
clonein interfaceIChemObject- Overrides:
clonein classAtomContainerSet- Returns:
- The cloned object
- Throws:
CloneNotSupportedException- if the IChemObject cannot be cloned
-
toString
Returns the String representation of this RingSet.- Specified by:
toStringin interfaceIChemObject- Overrides:
toStringin classAtomContainerSet- Returns:
- The String representation of this RingSet
-