Interface CyclicVertexSearch


  • public interface CyclicVertexSearch
    Describes a search to identify vertices which belong to elementary cycles and if those cycles are isolated or are part of a fused system. We define a cycle as isolated if it edge disjoint with all other cycles. This corresponds to the isolated and spiro rings of a chemical structures.
    Author:
    John May
    Source code:
    main
    Belongs to CDK module:
    core
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int[] cyclic()
      The set of cyclic vertices.
      boolean cyclic​(int v)
      Returns true if the vertex v is in a cycle.
      boolean cyclic​(int u, int v)
      Is the edge between the two vertices u and v in a cycle?
      int[][] fused()
      Construct the sets of vertices which belong to fused cycle systems (share at least one edge).
      int[][] isolated()
      Construct the sets of vertices which belong to isolated cycles.
      int numCycles()
      Returns the number of cycles (circuit rank, frère jacques number, num SSSR).
      int[] vertexColor()
      Build an indexed lookup of vertex color.
    • Method Detail

      • numCycles

        int numCycles()
        Returns the number of cycles (circuit rank, frère jacques number, num SSSR).
        Returns:
        number of cycles
      • cyclic

        boolean cyclic​(int v)
        Returns true if the vertex v is in a cycle.
        Parameters:
        v - a vertex identifier by index
        Returns:
        whether the vertex is in a cycle
      • cyclic

        boolean cyclic​(int u,
                       int v)
        Is the edge between the two vertices u and v in a cycle?
        Parameters:
        u - a vertex
        v - another vertex
        Returns:
        whether the edge is cycle
      • cyclic

        int[] cyclic()
        The set of cyclic vertices.
        Returns:
        the cyclic vertices of the molecule.
      • isolated

        int[][] isolated()
        Construct the sets of vertices which belong to isolated cycles. Each row in the array describes a set of cyclic vertices which is edge disjoint with all other elementary cycles.
        Returns:
        vertices belonging to the isolated rings
      • fused

        int[][] fused()
        Construct the sets of vertices which belong to fused cycle systems (share at least one edge). Each row in the array describes a set of vertices in a separate fused system. Each fused system is edge disjoint with every other fused system.
        Returns:
        vertices belonging to the fused cycles
      • vertexColor

        int[] vertexColor()
        Build an indexed lookup of vertex color. The vertex color indicates which cycle a given vertex belongs. If a vertex belongs to more then one cycle it is colored '0'. If a vertex belongs to no cycle it is colored '-1'.
        Returns:
        vertex colors