Package org.openscience.cdk
Class Polymer
- java.lang.Object
-
- org.openscience.cdk.ChemObject
-
- org.openscience.cdk.AtomContainer
-
- org.openscience.cdk.Polymer
-
- All Implemented Interfaces:
Serializable
,Cloneable
,IAtomContainer
,ICDKObject
,IChemObject
,IChemObjectListener
,IPolymer
- Direct Known Subclasses:
BioPolymer
,DebugPolymer
public class Polymer extends AtomContainer implements Serializable, IPolymer
Subclass of Molecule to store Polymer specific attributes that a Polymer has.- Author:
- Edgar Luttmann <edgar@uni-paderborn.de>, Martin Eklund <martin.eklund@farmbio.uu.se>
- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- data
- Keywords:
- polymer
- Created on:
- 2001-08-06
-
-
Field Summary
-
Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED
-
-
Constructor Summary
Constructors Constructor Description Polymer()
Constructs a new Polymer to store the Monomers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAtom(IAtom oAtom, IMonomer oMonomer)
Adds the atom oAtom to a specified Monomer.IPolymer
clone()
Clones thisIChemObject
.IMonomer
getMonomer(String cName)
Retrieves a Monomer object by specifying its name.int
getMonomerCount()
Returns the number of monomers present in the Polymer.Collection<String>
getMonomerNames()
Returns a collection of the names of allMonomer
s in this polymer.void
removeMonomer(String name)
Removes a particular monomer, specified by its name.String
toString()
Returns a one line description of this IChemObject.-
Methods inherited from class org.openscience.cdk.AtomContainer
add, addAtom, addBond, addBond, addBond, addElectronContainer, addLonePair, addLonePair, addSingleElectron, addSingleElectron, addStereoElement, atoms, bonds, contains, contains, contains, contains, contains, electronContainers, getAtom, getAtomCount, getAtomNumber, getBond, getBond, getBondCount, getBondNumber, getBondNumber, getBondOrderSum, getConnectedAtomsCount, getConnectedAtomsList, getConnectedBondsCount, getConnectedBondsCount, getConnectedBondsList, getConnectedElectronContainersList, getConnectedLonePairsCount, getConnectedLonePairsList, getConnectedSingleElectronsCount, getConnectedSingleElectronsList, getElectronContainer, getElectronContainerCount, getFirstAtom, getLastAtom, getLonePair, getLonePairCount, getLonePairNumber, getMaximumBondOrder, getMinimumBondOrder, getSingleElectron, getSingleElectronCount, getSingleElectronNumber, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, lonePairs, newAtom, newAtom, newBond, remove, removeAllBonds, removeAllElectronContainers, removeAllElements, removeAtom, removeAtom, removeAtomAndConnectedElectronContainers, removeAtomOnly, removeAtomOnly, removeBond, removeBond, removeBond, removeElectronContainer, removeElectronContainer, removeLonePair, removeLonePair, removeSingleElectron, removeSingleElectron, setAtom, setAtoms, setBonds, setStereoElements, setTitle, shallowCopy, singleElectrons, stateChanged, stereoElements
-
Methods inherited from class org.openscience.cdk.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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openscience.cdk.interfaces.IAtomContainer
add, addBond, addBond, addBond, addElectronContainer, addLonePair, addLonePair, addSingleElectron, addSingleElectron, addStereoElement, atoms, bonds, contains, contains, contains, contains, contains, electronContainers, getAtom, getAtomCount, getAtomNumber, getBond, getBond, getBondCount, getBondNumber, getBondNumber, getBondOrderSum, getConnectedAtomsCount, getConnectedAtomsList, getConnectedBondsCount, getConnectedBondsCount, getConnectedBondsList, getConnectedElectronContainersList, getConnectedLonePairsCount, getConnectedLonePairsList, getConnectedSingleElectronsCount, getConnectedSingleElectronsList, getElectronContainer, getElectronContainerCount, getFirstAtom, getLastAtom, getLonePair, getLonePairCount, getLonePairNumber, getMaximumBondOrder, getMinimumBondOrder, getSingleElectron, getSingleElectronCount, getSingleElectronNumber, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, lonePairs, newAtom, newAtom, newAtom, newAtom, newBond, newBond, remove, removeAllBonds, removeAllElectronContainers, removeAllElements, removeAtom, removeAtom, removeAtomAndConnectedElectronContainers, removeAtomOnly, removeAtomOnly, removeBond, removeBond, removeBond, removeElectronContainer, removeElectronContainer, removeLonePair, removeLonePair, removeSingleElectron, removeSingleElectron, setAtom, setAtoms, setBonds, setStereoElements, setTitle, singleElectrons, stereoElements
-
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clear, flags, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObjectListener
stateChanged
-
-
-
-
Method Detail
-
addAtom
public void addAtom(IAtom oAtom, IMonomer oMonomer)
Adds the atom oAtom to a specified Monomer.
-
getMonomerCount
public int getMonomerCount()
Returns the number of monomers present in the Polymer.- Specified by:
getMonomerCount
in interfaceIPolymer
- Returns:
- number of monomers
-
getMonomer
public IMonomer getMonomer(String cName)
Retrieves a Monomer object by specifying its name.- Specified by:
getMonomer
in interfaceIPolymer
- Parameters:
cName
- The name of the monomer to look for- Returns:
- The Monomer object which was asked for
-
getMonomerNames
public Collection<String> getMonomerNames()
Returns a collection of the names of allMonomer
s in this polymer.- Specified by:
getMonomerNames
in interfaceIPolymer
- Returns:
- a
Collection
of all the monomer names.
-
removeMonomer
public void removeMonomer(String name)
Removes a particular monomer, specified by its name.- Specified by:
removeMonomer
in interfaceIPolymer
- Parameters:
name
- The name of the monomer to remove
-
toString
public String toString()
Description copied from class:AtomContainer
Returns a one line description of this IChemObject.- Specified by:
toString
in interfaceIChemObject
- Overrides:
toString
in classAtomContainer
- Returns:
- a String representation of this object
-
clone
public IPolymer clone() throws CloneNotSupportedException
Description copied from class:AtomContainer
Clones thisIChemObject
. It clones the identifier, flags, properties and pointer vectors. The ChemObjectListeners are not cloned, and neither is the content of the pointer vectors.- Specified by:
clone
in interfaceIAtomContainer
- Specified by:
clone
in interfaceIChemObject
- Specified by:
clone
in interfaceIPolymer
- Overrides:
clone
in classAtomContainer
- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
- if the IChemObject cannot be cloned
-
-