Class AtomContainerSetManipulator

    • Constructor Detail

      • AtomContainerSetManipulator

        public AtomContainerSetManipulator()
    • Method Detail

      • removeAtomAndConnectedElectronContainers

        public static void removeAtomAndConnectedElectronContainers​(IAtomContainerSet set,
                                                                    IAtom atom)
      • 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.
      • 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 for
        atomContainerSet - The collection of IAtomContainer objects