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

IRingSet org::openscience::cdk::ringsearch::AllRingsFinder::findAllRings ( IAtomContainer  atomContainer,
Integer  maxRingSize 
) throws CDKException [inline]

Returns a ringset containing all rings up to a provided maximum size in a given AtomContainer

Parameters:
atomContainerThe AtomContainer to be searched for rings
maxRingSizeMaximum ring size to consider. Provides a possible breakout from recursion for complex compounds.
Returns:
A RingSet with all rings in the AtomContainer
Exceptions:
CDKExceptionAn exception thrown if something goes wrong or if the timeout limit is reached

Definition at line 105 of file AllRingsFinder.java.

References org::openscience::cdk::interfaces::IRingSet::add(), org::openscience::cdk::interfaces::IChemObject::getBuilder(), org::openscience::cdk::graph::SpanningTree::getCyclicFragmentsContainer(), org::openscience::cdk::interfaces::IMoleculeSet::molecules(), org::openscience::cdk::interfaces::IChemObjectBuilder::newRingSet(), and org::openscience::cdk::graph::ConnectivityChecker::partitionIntoMolecules().

  {
        startTime = System.currentTimeMillis();
        SpanningTree spanningTree = new SpanningTree(atomContainer);
        IAtomContainer ringSystems = spanningTree.getCyclicFragmentsContainer();
        Iterator separateRingSystem = ConnectivityChecker.partitionIntoMolecules(ringSystems).molecules().iterator();
        IRingSet resultSet = atomContainer.getBuilder().newRingSet();
        while (separateRingSystem.hasNext()) {
            resultSet.add(findAllRingsInIsolatedRingSystem((IMolecule)separateRingSystem.next(), maxRingSize));
        }
        return resultSet;
  }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index