Logo Search packages:      
Sourcecode: cdk version File versions  Download package

static void org::openscience::cdk::tools::manipulator::AtomContainerSetManipulator::sort ( IAtomContainerSet  atomContainerSet ) [inline, static]

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:
atomContainerSetThe collection of IAtomContainer objects

Definition at line 235 of file AtomContainerSetManipulator.java.

References getAllAtomContainers().

Referenced by org::openscience::cdk::layout::StructureDiagramGenerator::generateCoordinates().

                                                                {
        List<IAtomContainer> atomContainerList = AtomContainerSetManipulator.getAllAtomContainers(atomContainerSet);
        Collections.sort(atomContainerList, new AtomContainerComparator());
        atomContainerSet.removeAllAtomContainers();
        for (Object anAtomContainerList : atomContainerList)
            atomContainerSet.addAtomContainer((IAtomContainer) anAtomContainerList);
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index