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 Type
    Method
    Description
    find(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

      Cycles find(IAtomContainer molecule) throws Intractable
      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

      Cycles find(IAtomContainer molecule, int length) throws Intractable
      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

      Cycles find(IAtomContainer molecule, int[][] graph, int length) throws Intractable
      Find the cycles of the provided molecule when an adjacent relation (graph) is already available. The graph can be obtained through GraphUtil.toAdjList(IAtomContainer), for convenience find(IAtomContainer, int) will automatically create the graph.
      Parameters:
      molecule - input structure
      graph - adjacency list representation for fast traversal
      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.