Class AtomContainerSetManipulator
- java.lang.Object
-
- org.openscience.cdk.tools.manipulator.AtomContainerSetManipulator
-
public class AtomContainerSetManipulator extends Object
- See Also:
ChemModelManipulator
- Source code:
- main
- Belongs to CDK module:
- standard
-
-
Constructor Summary
Constructors Constructor Description AtomContainerSetManipulator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
containsByID(IAtomContainerSet atomContainerSet, String id)
Tells if an AtomContainerSet contains at least one AtomContainer with the same ID as atomContainer.static List<IAtomContainer>
getAllAtomContainers(IAtomContainerSet set)
Returns all the AtomContainer's of a MoleculeSet.static List<IChemObject>
getAllChemObjects(IAtomContainerSet set)
Does not recursively return the contents of the AtomContainer.static List<String>
getAllIDs(IAtomContainerSet set)
static int
getAtomCount(IAtomContainerSet set)
static int
getBondCount(IAtomContainerSet set)
static IAtomContainer
getRelevantAtomContainer(IAtomContainerSet containerSet, IAtom atom)
static IAtomContainer
getRelevantAtomContainer(IAtomContainerSet containerSet, IBond bond)
static double
getTotalCharge(IAtomContainerSet set)
static double
getTotalFormalCharge(IAtomContainerSet set)
static int
getTotalHydrogenCount(IAtomContainerSet set)
static void
removeAtomAndConnectedElectronContainers(IAtomContainerSet set, IAtom atom)
static void
removeElectronContainer(IAtomContainerSet set, IElectronContainer electrons)
static void
setAtomProperties(IAtomContainerSet set, Object propKey, Object propVal)
static void
sort(IAtomContainerSet atomContainerSet)
Sorts the IAtomContainers in the given IAtomContainerSet by the following criteria with decreasing priority:
-
-
-
Method Detail
-
getAtomCount
public static int getAtomCount(IAtomContainerSet set)
-
getBondCount
public static int getBondCount(IAtomContainerSet set)
-
removeAtomAndConnectedElectronContainers
public static void removeAtomAndConnectedElectronContainers(IAtomContainerSet set, IAtom atom)
-
removeElectronContainer
public static void removeElectronContainer(IAtomContainerSet set, IElectronContainer electrons)
-
getAllAtomContainers
public static List<IAtomContainer> getAllAtomContainers(IAtomContainerSet set)
Returns all the AtomContainer's of a MoleculeSet.- Parameters:
set
- The collection of IAtomContainer objects- Returns:
- A list of individual IAtomContainer's
-
getTotalCharge
public static double getTotalCharge(IAtomContainerSet set)
- Parameters:
set
- The collection of IAtomContainer objects- Returns:
- The summed charges of all atoms in this set.
-
getTotalFormalCharge
public static double getTotalFormalCharge(IAtomContainerSet set)
- Parameters:
set
- The collection of IAtomContainer objects- Returns:
- The summed formal charges of all atoms in this set.
-
getTotalHydrogenCount
public static int getTotalHydrogenCount(IAtomContainerSet set)
- Parameters:
set
- The collection of IAtomContainer objects- Returns:
- The summed implicit hydrogens of all atoms in this set.
-
getAllIDs
public static List<String> getAllIDs(IAtomContainerSet set)
-
setAtomProperties
public static void setAtomProperties(IAtomContainerSet set, Object propKey, Object propVal)
-
getRelevantAtomContainer
public static IAtomContainer getRelevantAtomContainer(IAtomContainerSet containerSet, IAtom atom)
-
getRelevantAtomContainer
public static IAtomContainer getRelevantAtomContainer(IAtomContainerSet containerSet, IBond bond)
-
getAllChemObjects
public static List<IChemObject> getAllChemObjects(IAtomContainerSet set)
Does not recursively return the contents of the AtomContainer.- Parameters:
set
- The collection of IAtomContainer objects- Returns:
- a list of individual ChemObject's
-
sort
public static void sort(IAtomContainerSet atomContainerSet)
Sorts the IAtomContainers in the given IAtomContainerSet by the following criteria with decreasing priority:
- Compare atom count
- Compare molecular weight (heavy atoms only)
- Compare bond count
- Compare sum of bond orders (heavy atoms only)
If no difference can be found with the above criteria, the IAtomContainers are considered equal.
- Parameters:
atomContainerSet
- The collection of IAtomContainer objects
-
containsByID
public static boolean containsByID(IAtomContainerSet atomContainerSet, String id)
Tells if an AtomContainerSet contains at least one AtomContainer with the same ID as atomContainer. Note this checks getID() for equality, not pointers.- Parameters:
id
- The IAtomContainer to look foratomContainerSet
- The collection of IAtomContainer objects
-
-