Package org.openscience.cdk.debug
Class DebugBioPolymer
java.lang.Object
org.openscience.cdk.ChemObject
org.openscience.cdk.AtomContainer
org.openscience.cdk.Polymer
org.openscience.cdk.BioPolymer
org.openscience.cdk.debug.DebugBioPolymer
- All Implemented Interfaces:
Serializable,Cloneable,IAtomContainer,IBioPolymer,ICDKObject,IChemObject,IChemObjectListener,IPolymer
Debugging data class.
- Author:
- egonw
- See Also:
-
Field Summary
Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, MARKUSH, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(IAtomContainer atomContainer) Adds all atoms and electronContainers of a given atomcontainer to this container.voidAdds an atom to this container.voidAdds the atom oAtom to a specified Monomer.voidAdds the atom to a specified Strand and a specified Monomer.voidAdds the atom oAtom to a specified Strand, whereas the Monomer is unspecified.voidaddBond(int atom1, int atom2, IBond.Order order) Adds a bond to this container.voidaddBond(int atom1, int atom2, IBond.Order order, IBond.Stereo stereo) Adds a bond to this container.voidAdds a Bond to this AtomContainer.voidaddElectronContainer(IElectronContainer electronContainer) Adds a ElectronContainer to this AtomContainer.voidUse this to add yourself to this IChemObject as a listener.voidaddLonePair(int atomID) Adds a LonePair to this Atom.voidaddLonePair(ILonePair ec) Adds a lone pair to this AtomContainer.voidaddProperties(Map<Object, Object> properties) Sets the properties of this object.voidaddSingleElectron(int atomID) Adds a SingleElectron to this Atom.voidAdds a single electron to this AtomContainer.voidaddStereoElement(IStereoElement parity) Adds a stereo element to this container.atoms()Returns an Iterable for looping over all atoms in this container.bonds()Returns an Iterable for looping over all bonds in this container.clone()Clones thisIChemObject.booleanTrue, if the AtomContainer contains the given atom object.booleanTrue, if the AtomContainer contains the given bond object.booleancontains(IElectronContainer electronContainer) True, if the AtomContainer contains the given ElectronContainer object.booleanTrue, if the AtomContainer contains the given LonePair object.booleanTrue, if the AtomContainer contains the given SingleElectron object.Returns an Iterable for looping over all electron containers in this container.getAtom(int idx) Get the atom at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getAtomCount().intReturns the number of Atoms in this Container.intgetAtomNumber(IAtom atom) Returns the position of a given atom in the atoms array.getBond(int idx) Get the bond at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getBondCount().Returns the bond that connects the two given atoms.intReturns the number of Bonds in this Container.intgetBondNumber(IAtom atom1, IAtom atom2) Returns the position of the bond between two given atoms in the electronContainers array.intgetBondNumber(IBond bond) Returns the position of a given bond in the electronContainers array.doublegetBondOrderSum(IAtom atom) Returns the sum of the bond orders for a given Atom.Returns aIChemObjectBuilderfor the data classes that extend this class.intgetConnectedAtomsCount(IAtom atom) Returns the number of connected atoms (explicit degree) to the specified atom.getConnectedAtomsList(IAtom atom) Returns the atoms connected connected to the specified atom by a bond.intgetConnectedBondsCount(IAtom atom) Returns the number of connected bonds (explicit degree) to the specified atom.getConnectedBondsList(IAtom atom) Returns the bonds connected connected to the specified atom.Returns the electron containers (bonds, radicals, and lone pairs ) connected connected to the specified atom.intReturns the number of lone pairs connected to the specified atom.Returns the lone pairs connected connected to the specified atom.intReturns the number of single electrons connected to the specified atom.Returns the single electrons connected connected to the specified atom.getElectronContainer(int number) Returns the ElectronContainer at positionnumberin the container.intReturns the number of ElectronContainers in this Container.Returns the atom at position 0 in the container.booleangetFlag(int flagType) Returns the value of a given flag.boolean[]getFlags()Returns the whole set of flags.getID()Returns the identifier (ID) of this object.Returns the atom at the last position in the container.intReturns the number of ChemObjectListeners registered with this object.getLonePair(int idx) Get the lone pair at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getLonePairCount().intReturns the number of LonePairs in this Container.intgetLonePairNumber(ILonePair bond) Returns the position of a given lone pair in the lone pair array.getMaximumBondOrder(IAtom atom) Returns the maximum bond order that this atom currently has in the context of this AtomContainer.getMinimumBondOrder(IAtom atom) Returns the minimum bond order that this atom currently has in the context of this AtomContainer.getMonomer(String cName) Retrieves a Monomer object by specifying its name.getMonomer(String monName, String strandName) Retrieves a Monomer object by specifying its name.intReturns the number of monomers present in BioPolymer.Returns a collection of the names of allMonomers in this BioPolymer.Returns a Map with the IChemObject's properties.<T> TgetProperty(Object description) Returns a property for the IChemObject.getSingleElectron(int idx) Get the single electron at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getSingleElectronCount().intReturns the number of the single electrons in this container.intReturns the position of a given single electron in the single electron array.Retrieves a Monomer object by specifying its name.intReturns the number of strands present in the BioPolymer.Returns a collection of the names of allStrands in this BioPolymer.Returns a Map containing the strands in the Polymer.Returns an Iterable for looping over all lone pairs in this container.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.voidremove(IAtomContainer atomContainer) Removes all atoms and electronContainers of a given atomcontainer from this container.voidRemoves all Bonds from this container.voidRemoves electronContainers from this container.voidRemoves all atoms, bonds and stereo elements from this container.voidremoveAtom(IAtom atom) Safely remove an atom from the container.voidremoveAtomOnly(int position) Unsafely remove atom at index.voidremoveAtomOnly(IAtom atom) Unsafely remove atom.removeBond(int pos) Removes the bond at the given position from the AtomContainer.removeBond(IAtom atom1, IAtom atom2) Removes the bond that connects the two given atoms.voidremoveBond(IBond bond) Removes the bond from this container.removeElectronContainer(int position) Removes the bond at the given position from this container.voidremoveElectronContainer(IElectronContainer electronContainer) Removes this ElectronContainer from this container.voidUse this to remove a ChemObjectListener from the ListenerList of this IChemObject.removeLonePair(int pos) Removes the lone pair at the given position from the AtomContainer.voidRemoves the lone pair from the AtomContainer.voidremoveMonomer(String name) Removes a particular monomer, specified by its name.voidremoveProperty(Object description) Removes a property for a IChemObject.removeSingleElectron(int pos) Removes the single electron at the given position from the AtomContainer.voidRemoves the single electron from the AtomContainer.voidremoveStrand(String name) Removes a particular strand, specified by its name.voidSet the atom atidx, the index must have an existing atom and therefore be in the range 0 ≤ idx < mol.getAtomCount().voidSets the array of atoms of this AtomContainer.voidsetFlag(int flagType, boolean flagValue) Sets the value of some flag.voidsetFlags(boolean[] flagsNew) Sets the whole set of flags.voidSets the identifier (ID) of this object.voidsetProperty(Object description, Object property) Sets a property for a IChemObject.Returns an Iterable for looping over all single electrons in this container.voidCalled by objects to notify objects that implemented this interface and registered with them as ChemObjectListeners.Returns the stereo elements defined for this atom container.Methods inherited from class org.openscience.cdk.BioPolymer
toStringMethods inherited from class org.openscience.cdk.AtomContainer
addBond, getConnectedBondsCount, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, newAtom, newAtom, newBond, removeAtom, removeAtomAndConnectedElectronContainers, setBonds, setStereoElements, setTitle, shallowCopyMethods inherited from class org.openscience.cdk.ChemObject
clear, compare, flags, getFlagValue, getNotification, getProperty, is, set, setNotification, setPropertiesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openscience.cdk.interfaces.IAtomContainer
addBond, getConnectedBondsCount, getTitle, indexOf, indexOf, indexOf, indexOf, isEmpty, newAtom, newAtom, newAtom, newAtom, newBond, newBond, removeAtom, removeAtomAndConnectedElectronContainers, setBonds, setStereoElements, setTitleMethods inherited from interface org.openscience.cdk.interfaces.IChemObject
clear, flags, getFlagValue, getNotification, getProperty, is, set, setNotification, setProperties, toString
-
Constructor Details
-
DebugBioPolymer
public DebugBioPolymer()
-
-
Method Details
-
addStereoElement
Adds a stereo element to this container.- Specified by:
addStereoElementin interfaceIAtomContainer- Overrides:
addStereoElementin classAtomContainer- Parameters:
parity- The newIStereoElementfor this container- See Also:
-
stereoElements
Returns the stereo elements defined for this atom container.- Specified by:
stereoElementsin interfaceIAtomContainer- Overrides:
stereoElementsin classAtomContainer- Returns:
- An
IterableofIStereoElements. - See Also:
-
setAtoms
Sets the array of atoms of this AtomContainer.- Specified by:
setAtomsin interfaceIAtomContainer- Overrides:
setAtomsin classAtomContainer- Parameters:
atoms- The array of atoms to be assigned to this AtomContainer- See Also:
-
setAtom
Set the atom atidx, the index must have an existing atom and therefore be in the range 0 ≤ idx < mol.getAtomCount().- Specified by:
setAtomin interfaceIAtomContainer- Overrides:
setAtomin classAtomContainer- Parameters:
number- The index of the atom to be set.atom- The atom to be stored at positionidx- See Also:
-
getAtom
Get the atom at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getAtomCount().- Specified by:
getAtomin interfaceIAtomContainer- Overrides:
getAtomin classAtomContainer- Parameters:
idx- atom index- Returns:
- the atom stored at the index
- See Also:
-
getBond
Get the bond at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getBondCount().- Specified by:
getBondin interfaceIAtomContainer- Overrides:
getBondin classAtomContainer- Parameters:
idx- bond index- Returns:
- the bond stored at the index
-
getLonePair
Get the lone pair at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getLonePairCount().- Specified by:
getLonePairin interfaceIAtomContainer- Overrides:
getLonePairin classAtomContainer- Parameters:
idx- lone pair index- Returns:
- the lone pair stored at the index
-
getSingleElectron
Get the single electron at the specified idx, the index should be in the range 0 ≤ idx <IAtomContainer.getSingleElectronCount().- Specified by:
getSingleElectronin interfaceIAtomContainer- Overrides:
getSingleElectronin classAtomContainer- Parameters:
idx- single electron index- Returns:
- the single electron stored at the index
-
atoms
Returns an Iterable for looping over all atoms in this container.- Specified by:
atomsin interfaceIAtomContainer- Overrides:
atomsin classAtomContainer- Returns:
- An Iterable with the atoms in this container
-
bonds
Returns an Iterable for looping over all bonds in this container.- Specified by:
bondsin interfaceIAtomContainer- Overrides:
bondsin classAtomContainer- Returns:
- An Iterable with the bonds in this container
-
lonePairs
Returns an Iterable for looping over all lone pairs in this container.- Specified by:
lonePairsin interfaceIAtomContainer- Overrides:
lonePairsin classAtomContainer- Returns:
- An Iterable with the lone pairs in this container
-
singleElectrons
Returns an Iterable for looping over all single electrons in this container.- Specified by:
singleElectronsin interfaceIAtomContainer- Overrides:
singleElectronsin classAtomContainer- Returns:
- An Iterable with the single electrons in this container
-
electronContainers
Returns an Iterable for looping over all electron containers in this container.- Specified by:
electronContainersin interfaceIAtomContainer- Overrides:
electronContainersin classAtomContainer- Returns:
- An Iterable with the electron containers in this container
-
getFirstAtom
Returns the atom at position 0 in the container.- Specified by:
getFirstAtomin interfaceIAtomContainer- Overrides:
getFirstAtomin classAtomContainer- Returns:
- The atom at position 0 .
-
getLastAtom
Returns the atom at the last position in the container.- Specified by:
getLastAtomin interfaceIAtomContainer- Overrides:
getLastAtomin classAtomContainer- Returns:
- The atom at the last position
-
getAtomNumber
Returns the position of a given atom in the atoms array. It returns -1 if the atom atom does not exist.- Specified by:
getAtomNumberin interfaceIAtomContainer- Overrides:
getAtomNumberin classAtomContainer- Parameters:
atom- The atom to be sought- Returns:
- The Position of the atom in the atoms array in [0,..].
-
getBondNumber
Returns the position of the bond between two given atoms in the electronContainers array. It returns -1 if the bond does not exist.- Specified by:
getBondNumberin interfaceIAtomContainer- Overrides:
getBondNumberin classAtomContainer- Parameters:
atom1- The first atomatom2- The second atom- Returns:
- The Position of the bond between a1 and a2 in the electronContainers array.
-
getBondNumber
Returns the position of a given bond in the electronContainers array. It returns -1 if the bond does not exist.- Specified by:
getBondNumberin interfaceIAtomContainer- Overrides:
getBondNumberin classAtomContainer- Parameters:
bond- The bond to be sought- Returns:
- The Position of the bond in the electronContainers array in [0,..].
-
getLonePairNumber
Returns the position of a given lone pair in the lone pair array. It returns -1 if the lone pair does not exist.- Specified by:
getLonePairNumberin interfaceIAtomContainer- Overrides:
getLonePairNumberin classAtomContainer- Parameters:
bond- The lone pair to be sought- Returns:
- The Position of the lone pair in the array..
-
getSingleElectronNumber
Returns the position of a given single electron in the single electron array. It returns -1 if the single electron does not exist.- Specified by:
getSingleElectronNumberin interfaceIAtomContainer- Overrides:
getSingleElectronNumberin classAtomContainer- Parameters:
bond- The single electron to be sought- Returns:
- The Position of the single electron in the array.
-
getElectronContainer
Returns the ElectronContainer at positionnumberin the container.- Specified by:
getElectronContainerin interfaceIAtomContainer- Overrides:
getElectronContainerin classAtomContainer- Parameters:
number- The position of the ElectronContainer to be returned.- Returns:
- The ElectronContainer at position
number. - See Also:
-
getBond
Returns the bond that connects the two given atoms.- Specified by:
getBondin interfaceIAtomContainer- Overrides:
getBondin classAtomContainer- Parameters:
atom1- The first atomatom2- The second atom- Returns:
- The bond that connects the two atoms
-
getAtomCount
public int getAtomCount()Returns the number of Atoms in this Container.- Specified by:
getAtomCountin interfaceIAtomContainer- Overrides:
getAtomCountin classAtomContainer- Returns:
- The number of Atoms in this Container
-
getBondCount
public int getBondCount()Returns the number of Bonds in this Container.- Specified by:
getBondCountin interfaceIAtomContainer- Overrides:
getBondCountin classAtomContainer- Returns:
- The number of Bonds in this Container
-
getLonePairCount
public int getLonePairCount()Returns the number of LonePairs in this Container.- Specified by:
getLonePairCountin interfaceIAtomContainer- Overrides:
getLonePairCountin classAtomContainer- Returns:
- The number of LonePairs in this Container
-
getSingleElectronCount
public int getSingleElectronCount()Returns the number of the single electrons in this container.- Specified by:
getSingleElectronCountin interfaceIAtomContainer- Overrides:
getSingleElectronCountin classAtomContainer- Returns:
- The number of SingleElectron objects of this AtomContainer
-
getElectronContainerCount
public int getElectronContainerCount()Returns the number of ElectronContainers in this Container.- Specified by:
getElectronContainerCountin interfaceIAtomContainer- Overrides:
getElectronContainerCountin classAtomContainer- Returns:
- The number of ElectronContainers in this Container
-
getConnectedAtomsList
Returns the atoms connected connected to the specified atom by a bond.- Specified by:
getConnectedAtomsListin interfaceIAtomContainer- Overrides:
getConnectedAtomsListin classAtomContainer- Parameters:
atom- the atom- Returns:
- connected atoms
-
getConnectedBondsList
Returns the bonds connected connected to the specified atom.- Specified by:
getConnectedBondsListin interfaceIAtomContainer- Overrides:
getConnectedBondsListin classAtomContainer- Parameters:
atom- the atom- Returns:
- connected bonds
-
getConnectedLonePairsList
Returns the lone pairs connected connected to the specified atom.- Specified by:
getConnectedLonePairsListin interfaceIAtomContainer- Overrides:
getConnectedLonePairsListin classAtomContainer- Parameters:
atom- the atom- Returns:
- connected lone pairs
-
getConnectedSingleElectronsList
Returns the single electrons connected connected to the specified atom.- Specified by:
getConnectedSingleElectronsListin interfaceIAtomContainer- Overrides:
getConnectedSingleElectronsListin classAtomContainer- Parameters:
atom- the atom- Returns:
- connected lone pairs
-
getConnectedElectronContainersList
Returns the electron containers (bonds, radicals, and lone pairs ) connected connected to the specified atom.- Specified by:
getConnectedElectronContainersListin interfaceIAtomContainer- Overrides:
getConnectedElectronContainersListin classAtomContainer- Parameters:
atom- the atom- Returns:
- connected lone pairs
-
getConnectedAtomsCount
Returns the number of connected atoms (explicit degree) to the specified atom. This does not include bonds to implicit hydrogens.- Specified by:
getConnectedAtomsCountin interfaceIAtomContainer- Overrides:
getConnectedAtomsCountin classAtomContainer- Parameters:
atom- the atom- Returns:
- number of connected bonds
-
getConnectedBondsCount
Returns the number of connected bonds (explicit degree) to the specified atom. This does not include bonds to implicit hydrogens.- Specified by:
getConnectedBondsCountin interfaceIAtomContainer- Overrides:
getConnectedBondsCountin classAtomContainer- Parameters:
atom- the atom- Returns:
- number of connected bonds
-
getConnectedLonePairsCount
Returns the number of lone pairs connected to the specified atom.- Specified by:
getConnectedLonePairsCountin interfaceIAtomContainer- Overrides:
getConnectedLonePairsCountin classAtomContainer- Parameters:
atom- the atom- Returns:
- number of connected bonds
-
getConnectedSingleElectronsCount
Returns the number of single electrons connected to the specified atom.- Specified by:
getConnectedSingleElectronsCountin interfaceIAtomContainer- Overrides:
getConnectedSingleElectronsCountin classAtomContainer- Parameters:
atom- the atom- Returns:
- number of connected bonds
-
getBondOrderSum
Returns the sum of the bond orders for a given Atom.- Specified by:
getBondOrderSumin interfaceIAtomContainer- Overrides:
getBondOrderSumin classAtomContainer- Parameters:
atom- The atom- Returns:
- The number of bondorders for this atom
-
getMaximumBondOrder
Returns the maximum bond order that this atom currently has in the context of this AtomContainer. If the atom has no bonds but does have implicit hydrogens the minimum bond order isIBond.Order.SINGLE, otherwise the bond is unsetIBond.Order.UNSET.- Specified by:
getMaximumBondOrderin interfaceIAtomContainer- Overrides:
getMaximumBondOrderin classAtomContainer- Parameters:
atom- The atom- Returns:
- The maximum bond order that this atom currently has
-
getMinimumBondOrder
Returns the minimum bond order that this atom currently has in the context of this AtomContainer. If the atom has no bonds but does have implicit hydrogens the minimum bond order isIBond.Order.SINGLE, otherwise the bond is unsetIBond.Order.UNSET.- Specified by:
getMinimumBondOrderin interfaceIAtomContainer- Overrides:
getMinimumBondOrderin classAtomContainer- Parameters:
atom- The atom- Returns:
- The minimum bond order that this atom currently has
-
add
Adds all atoms and electronContainers of a given atomcontainer to this container.- Specified by:
addin interfaceIAtomContainer- Overrides:
addin classAtomContainer- Parameters:
atomContainer- The atomcontainer to be added
-
addAtom
Adds an atom to this container.- Specified by:
addAtomin interfaceIAtomContainer- Specified by:
addAtomin interfaceIBioPolymer- Specified by:
addAtomin interfaceIPolymer- Overrides:
addAtomin classAtomContainer- Parameters:
atom- The atom to be added to this container
-
addBond
Adds a Bond to this AtomContainer.- Specified by:
addBondin interfaceIAtomContainer- Overrides:
addBondin classAtomContainer- Parameters:
bond- The bond to added to this container
-
addLonePair
Adds a lone pair to this AtomContainer.- Specified by:
addLonePairin interfaceIAtomContainer- Overrides:
addLonePairin classAtomContainer- Parameters:
ec- The LonePair to added to this container
-
addSingleElectron
Adds a single electron to this AtomContainer.- Specified by:
addSingleElectronin interfaceIAtomContainer- Overrides:
addSingleElectronin classAtomContainer- Parameters:
ec- The SingleElectron to added to this container
-
addElectronContainer
Adds a ElectronContainer to this AtomContainer.- Specified by:
addElectronContainerin interfaceIAtomContainer- Overrides:
addElectronContainerin classAtomContainer- Parameters:
electronContainer- The ElectronContainer to added to this container
-
remove
Removes all atoms and electronContainers of a given atomcontainer from this container.- Specified by:
removein interfaceIAtomContainer- Overrides:
removein classAtomContainer- Parameters:
atomContainer- The atomcontainer to be removed
-
removeElectronContainer
Removes the bond at the given position from this container.- Specified by:
removeElectronContainerin interfaceIAtomContainer- Overrides:
removeElectronContainerin classAtomContainer- Parameters:
position- The position of the bond in the electronContainers array- Returns:
- the IElectronContainer that was removed
-
removeElectronContainer
Removes this ElectronContainer from this container.- Specified by:
removeElectronContainerin interfaceIAtomContainer- Overrides:
removeElectronContainerin classAtomContainer- Parameters:
electronContainer- The electronContainer to be removed
-
removeAtomOnly
public void removeAtomOnly(int position) Unsafely remove atom at index.
Removes the atom at the given position from the AtomContainer. Note that the electronContainers are unaffected: you also have to take care of removing all electronContainers to this atom from the container manually.- Specified by:
removeAtomOnlyin interfaceIAtomContainer- Overrides:
removeAtomOnlyin classAtomContainer- Parameters:
position- The position of the atom to be removed.
-
removeAtomOnly
Unsafely remove atom.
Removes the given atom from the AtomContainer. Note that the electronContainers are unaffected: you also have to take care of removeing all electronContainers to this atom from the container.- Specified by:
removeAtomOnlyin interfaceIAtomContainer- Overrides:
removeAtomOnlyin classAtomContainer- Parameters:
atom- The atom to be removed
-
removeBond
Removes the bond at the given position from the AtomContainer.- Specified by:
removeBondin interfaceIAtomContainer- Overrides:
removeBondin classAtomContainer- Parameters:
pos- The position of the bond to be removed.- Returns:
- the bond at the given position
-
removeBond
Removes the bond that connects the two given atoms.- Specified by:
removeBondin interfaceIAtomContainer- Overrides:
removeBondin classAtomContainer- Parameters:
atom1- The first atomatom2- The second atom- Returns:
- The bond that connects the two atoms
-
removeBond
Removes the bond from this container.- Specified by:
removeBondin interfaceIAtomContainer- Overrides:
removeBondin classAtomContainer- Parameters:
bond- The bond to be removed.
-
removeLonePair
Removes the lone pair at the given position from the AtomContainer.- Specified by:
removeLonePairin interfaceIAtomContainer- Overrides:
removeLonePairin classAtomContainer- Parameters:
pos- The position of the LonePair to be removed.- Returns:
- The removed ILonePair.
-
removeLonePair
Removes the lone pair from the AtomContainer.- Specified by:
removeLonePairin interfaceIAtomContainer- Overrides:
removeLonePairin classAtomContainer- Parameters:
ec- The LonePair to be removed.
-
removeSingleElectron
Removes the single electron at the given position from the AtomContainer.- Specified by:
removeSingleElectronin interfaceIAtomContainer- Overrides:
removeSingleElectronin classAtomContainer- Parameters:
pos- The position of the SingleElectron to be removed.- Returns:
- The removed ISingleElectron
-
removeSingleElectron
Removes the single electron from the AtomContainer.- Specified by:
removeSingleElectronin interfaceIAtomContainer- Overrides:
removeSingleElectronin classAtomContainer- Parameters:
ec- The SingleElectron to be removed.
-
removeAtom
Safely remove an atom from the container.
Removes a single atom from the container updating all internal state to be consistent. All bonds connected to the atom will be deleted as well as all stereo elements. If multiple atoms/bonds are being deleted they should be gathered into a single transaction and removed withIAtomContainer.remove(IAtomContainer).
If you are removing hydrogens one of the utility methods (e.g. AtomContainerManipulator.removeHydrogens(IAtomContainer)) is preferable.- Specified by:
removeAtomin interfaceIAtomContainer- Overrides:
removeAtomin classAtomContainer- Parameters:
atom- the atom to be removed
-
removeAllElements
public void removeAllElements()Removes all atoms, bonds and stereo elements from this container.- Specified by:
removeAllElementsin interfaceIAtomContainer- Overrides:
removeAllElementsin classAtomContainer
-
removeAllElectronContainers
public void removeAllElectronContainers()Removes electronContainers from this container.- Specified by:
removeAllElectronContainersin interfaceIAtomContainer- Overrides:
removeAllElectronContainersin classAtomContainer
-
removeAllBonds
public void removeAllBonds()Removes all Bonds from this container.- Specified by:
removeAllBondsin interfaceIAtomContainer- Overrides:
removeAllBondsin classAtomContainer
-
addBond
Adds a bond to this container.- Specified by:
addBondin interfaceIAtomContainer- Overrides:
addBondin classAtomContainer- Parameters:
atom1- Id of the first atom of the Bond in [0,..]atom2- Id of the second atom of the Bond in [0,..]order- Bondorderstereo- Stereochemical orientation
-
addBond
Adds a bond to this container.- Specified by:
addBondin interfaceIAtomContainer- Parameters:
atom1- Id of the first atom of the Bond in [0,..]atom2- Id of the second atom of the Bond in [0,..]order- Bondorder
-
addLonePair
public void addLonePair(int atomID) Adds a LonePair to this Atom.- Specified by:
addLonePairin interfaceIAtomContainer- Overrides:
addLonePairin classAtomContainer- Parameters:
atomID- The atom number to which the LonePair is added in [0,..]
-
addSingleElectron
public void addSingleElectron(int atomID) Adds a SingleElectron to this Atom.- Specified by:
addSingleElectronin interfaceIAtomContainer- Overrides:
addSingleElectronin classAtomContainer- Parameters:
atomID- The atom number to which the SingleElectron is added in [0,..]
-
contains
True, if the AtomContainer contains the given atom object.- Specified by:
containsin interfaceIAtomContainer- Overrides:
containsin classAtomContainer- Parameters:
atom- the atom this AtomContainer is searched for- Returns:
- True, if the AtomContainer contains the given atom object
-
contains
True, if the AtomContainer contains the given bond object.- Specified by:
containsin interfaceIAtomContainer- Overrides:
containsin classAtomContainer- Parameters:
bond- the bond this AtomContainer is searched for- Returns:
- True, if the AtomContainer contains the given bond object
-
contains
True, if the AtomContainer contains the given LonePair object.- Specified by:
containsin interfaceIAtomContainer- Overrides:
containsin classAtomContainer- Parameters:
ec- the LonePair this AtomContainer is searched for- Returns:
- True, if the AtomContainer contains the given LonePair object
-
contains
True, if the AtomContainer contains the given SingleElectron object.- Specified by:
containsin interfaceIAtomContainer- Overrides:
containsin classAtomContainer- Parameters:
ec- the SingleElectron this AtomContainer is searched for- Returns:
- True, if the AtomContainer contains the given SingleElectron object
-
contains
True, if the AtomContainer contains the given ElectronContainer object.- Specified by:
containsin interfaceIAtomContainer- Overrides:
containsin classAtomContainer- Parameters:
electronContainer- ElectronContainer that is searched for- Returns:
- True, if the AtomContainer contains the given bond object
-
addListener
Use this to add yourself to this IChemObject as a listener. In order to do so, you must implement the ChemObjectListener Interface.- Specified by:
addListenerin interfaceIChemObject- Overrides:
addListenerin classChemObject- Parameters:
col- the ChemObjectListener- See Also:
-
getListenerCount
public int getListenerCount()Returns the number of ChemObjectListeners registered with this object.- Specified by:
getListenerCountin interfaceIChemObject- Overrides:
getListenerCountin classChemObject- Returns:
- the number of registered listeners.
-
removeListener
Use this to remove a ChemObjectListener from the ListenerList of this IChemObject. It will then not be notified of change in this object anymore.- Specified by:
removeListenerin interfaceIChemObject- Overrides:
removeListenerin classChemObject- Parameters:
col- The ChemObjectListener to be removed- See Also:
-
notifyChanged
public void notifyChanged()This should be triggered by an method that changes the content of an object to that the registered listeners can react to it.- Specified by:
notifyChangedin interfaceIChemObject- Overrides:
notifyChangedin classChemObject
-
notifyChanged
This should be triggered by an method that changes the content of an object to that the registered listeners can react to it. This is a version of notifyChanged() which allows to propagate a change event while preserving the original origin.- Specified by:
notifyChangedin interfaceIChemObject- Overrides:
notifyChangedin classChemObject- Parameters:
evt- A ChemObjectChangeEvent pointing to the source of where the change happened
-
setProperty
Sets a property for a IChemObject.- Specified by:
setPropertyin interfaceIChemObject- Overrides:
setPropertyin classChemObject- Parameters:
description- An object description of the property (most likely a unique string)property- An object with the property itself- See Also:
-
removeProperty
Removes a property for a IChemObject.- Specified by:
removePropertyin interfaceIChemObject- Overrides:
removePropertyin classChemObject- Parameters:
description- The object description of the property (most likely a unique string)- See Also:
-
getProperty
Returns a property for the IChemObject.- Specified by:
getPropertyin interfaceIChemObject- Overrides:
getPropertyin classChemObject- Type Parameters:
T- generic return type- Parameters:
description- An object description of the property (most likely a unique string)- Returns:
- The object containing the property. Returns null if propert is not set.
- See Also:
-
getProperties
Returns a Map with the IChemObject's properties.- Specified by:
getPropertiesin interfaceIChemObject- Overrides:
getPropertiesin classChemObject- Returns:
- The object's properties as an Hashtable
- See Also:
-
getID
Returns the identifier (ID) of this object.- Specified by:
getIDin interfaceIChemObject- Overrides:
getIDin classChemObject- Returns:
- a String representing the ID value
- See Also:
-
setID
Sets the identifier (ID) of this object.- Specified by:
setIDin interfaceIChemObject- Overrides:
setIDin classChemObject- Parameters:
identifier- a String representing the ID value- See Also:
-
setFlag
public void setFlag(int flagType, boolean flagValue) Sets the value of some flag. The flag is a mask from a given CDKConstant (e.g.IChemObject.AROMATICorIChemObject.VISITED). The flags are intrinsic internal properties and should not be used to store custom values, please useIChemObject.setProperty(Object, Object).// set this chem object to be aromatic chemObject.setFlag(CDKConstants.ISAROMATIC, Boolean.TRUE); // ... // indicate we have visited this chem object chemObject.setFlag(CDKConstants.VISITED, Boolean.TRUE);- Specified by:
setFlagin interfaceIChemObject- Overrides:
setFlagin classChemObject- Parameters:
flagType- flag to set the value forflagValue- value to assign to flag- See Also:
-
getFlag
public boolean getFlag(int flagType) Returns the value of a given flag. The flag is a mask from a given CDKConstant (e.g.IChemObject.AROMATIC).if(chemObject.getFlag(CDKConstants.ISAROMATIC)){ // handle aromatic flag on this chem object }- Specified by:
getFlagin interfaceIChemObject- Overrides:
getFlagin classChemObject- Parameters:
flagType- flag to retrieve the value of- Returns:
- true if the flag
flag_typeis set - See Also:
-
addProperties
Sets the properties of this object.- Specified by:
addPropertiesin interfaceIChemObject- Overrides:
addPropertiesin classChemObject- Parameters:
properties- a Hashtable specifying the property values- See Also:
-
setFlags
public void setFlags(boolean[] flagsNew) Sets the whole set of flags.- Specified by:
setFlagsin interfaceIChemObject- Overrides:
setFlagsin classChemObject- Parameters:
flagsNew- the new flags.- See Also:
-
getFlags
public boolean[] getFlags()Returns the whole set of flags.- Specified by:
getFlagsin interfaceIChemObject- Overrides:
getFlagsin classChemObject- Returns:
- the flags.
- See Also:
-
clone
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:
clonein interfaceIAtomContainer- Specified by:
clonein interfaceIBioPolymer- Specified by:
clonein interfaceIChemObject- Specified by:
clonein interfaceIPolymer- Overrides:
clonein classBioPolymer- Returns:
- The cloned object
- Throws:
CloneNotSupportedException- if the IChemObject cannot be cloned
-
getBuilder
Returns aIChemObjectBuilderfor the data classes that extend this class.- Specified by:
getBuilderin interfaceICDKObject- Overrides:
getBuilderin classChemObject- Returns:
- The
IChemObjectBuildermatching thisICDKObject
-
stateChanged
Called by objects to notify objects that implemented this interface and registered with them as ChemObjectListeners.- Specified by:
stateChangedin interfaceIChemObjectListener- Overrides:
stateChangedin classAtomContainer- Parameters:
event- a ChemObjectChangeEvent object
-
addAtom
Adds the atom oAtom to a specified Monomer. -
getMonomerCount
public int getMonomerCount()Returns the number of monomers present in BioPolymer.- Specified by:
getMonomerCountin interfaceIBioPolymer- Specified by:
getMonomerCountin interfaceIPolymer- Overrides:
getMonomerCountin classBioPolymer- Returns:
- number of monomers
-
getMonomer
Retrieves a Monomer object by specifying its name.- Specified by:
getMonomerin interfaceIPolymer- Overrides:
getMonomerin classPolymer- Parameters:
cName- The name of the monomer to look for- Returns:
- The Monomer object which was asked for
-
getMonomerNames
Returns a collection of the names of allMonomers in this BioPolymer.- Specified by:
getMonomerNamesin interfaceIBioPolymer- Specified by:
getMonomerNamesin interfaceIPolymer- Overrides:
getMonomerNamesin classBioPolymer- Returns:
- a
Collectionof all the monomer names.
-
removeMonomer
Removes a particular monomer, specified by its name.- Specified by:
removeMonomerin interfaceIPolymer- Overrides:
removeMonomerin classPolymer- Parameters:
name- The name of the monomer to remove
-
addAtom
Adds the atom oAtom to a specified Strand, whereas the Monomer is unspecified. Hence the atom will be added to a Monomer of type UNKNOWN in the specified Strand.- Specified by:
addAtomin interfaceIBioPolymer- Overrides:
addAtomin classBioPolymer- Parameters:
oAtom- The atom to addoStrand- The strand the atom belongs to
-
addAtom
Adds the atom to a specified Strand and a specified Monomer.- Specified by:
addAtomin interfaceIBioPolymer- Overrides:
addAtomin classBioPolymer- Parameters:
oAtom- The atom to addoMonomer- The monomer the atom belongs tooStrand- The strand the atom belongs to
-
getMonomer
Retrieves a Monomer object by specifying its name. [You have to specify the strand to enable monomers with the same name in different strands. There is at least one such case: every strand contains a monomer called "".]- Specified by:
getMonomerin interfaceIBioPolymer- Overrides:
getMonomerin classBioPolymer- Parameters:
monName- The name of the monomer to look forstrandName- The name of the strand to look for- Returns:
- The Monomer object which was asked for
-
getStrandCount
public int getStrandCount()Returns the number of strands present in the BioPolymer.- Specified by:
getStrandCountin interfaceIBioPolymer- Overrides:
getStrandCountin classBioPolymer- Returns:
- number of strands
-
getStrand
Retrieves a Monomer object by specifying its name.- Specified by:
getStrandin interfaceIBioPolymer- Overrides:
getStrandin classBioPolymer- Parameters:
cName- The name of the monomer to look for- Returns:
- The Monomer object which was asked for
-
getStrandNames
Returns a collection of the names of allStrands in this BioPolymer.- Specified by:
getStrandNamesin interfaceIBioPolymer- Overrides:
getStrandNamesin classBioPolymer- Returns:
- a
Collectionof all the strand names.
-
removeStrand
Removes a particular strand, specified by its name.- Specified by:
removeStrandin interfaceIBioPolymer- Overrides:
removeStrandin classBioPolymer- Parameters:
name- name of the strand to remove
-
getStrands
Returns a Map containing the strands in the Polymer.- Specified by:
getStrandsin interfaceIBioPolymer- Overrides:
getStrandsin classBioPolymer- Returns:
- hashtable containing the monomers in the strand.
-