Package org.openscience.cdk.graph
Interface CycleFinder
public interface CycleFinder
Defines a method to find the cycles of a molecule. The distinction between a
cycle and a ring is that cycles are stored as indices (int[]) while rings are
stored as atoms (
IAtom
[]) in a IRing
.- Author:
- John May
- Source code:
- main
- Belongs to CDK module:
- core
-
Method Summary
Modifier and TypeMethodDescriptionfind
(IAtomContainer molecule) Find the cycles of the provided molecule.find
(IAtomContainer molecule, int length) Find the cycles of the provided molecule.find
(IAtomContainer molecule, int[][] graph, int length) Find the cycles of the provided molecule when an adjacent relation (graph) is already available.
-
Method Details
-
find
Find the cycles of the provided molecule.- Parameters:
molecule
- a molecule, can be disconnected.- Returns:
- an instance for querying the cycles (rings) in the molecule
- Throws:
Intractable
- thrown if problem could not be solved within some predefined bounds.
-
find
Find the cycles of the provided molecule.- Parameters:
molecule
- a molecule, can be disconnected.length
- maximum length cycle to find (set to molecule.getAtomCount() for all)- Returns:
- an instance for querying the cycles (rings) in the molecule
- Throws:
Intractable
- thrown if problem could not be solved within some predefined bounds.
-
find
Find the cycles of the provided molecule when an adjacent relation (graph) is already available. The graph can be obtained throughGraphUtil.toAdjList(IAtomContainer)
, for conveniencefind(IAtomContainer, int)
will automatically create the graph.- Parameters:
molecule
- input structuregraph
- adjacency list representation for fast traversallength
- maximum length cycle to find (set to molecule.getAtomCount() for all)- Returns:
- an instance for querying the cycles (rings) in the molecule
- Throws:
Intractable
- thrown if problem could not be solved within some predefined bounds.
-