find_aromatic_cycles_in_sgraph

alternate Aromatic cycles on an existing bond graph; skips unit-cell bond detection. Use compute_aromatic_cycles instead.

analyze.find_aromatic_cycles_in_sgraph(
    sgraph,
    default_ring_sizes=[5, 6, 7, 8, 9],
)

Find all aromatic cycles in the graph.

Returns a list of lists, where each inner list contains the indices of atoms in an aromatic cycle (all edges are double bonds).

For large graphs (> _MAX_NODES_FOR_EXPANSION), the isomorphism expansion step is skipped because GraphMatcher.subgraph_isomorphisms_iter() is O(|V|^k) on a k-node template and hangs on MOF-scale structures. The unique aromatic cycles (deduplicated by atom membership) are returned directly — they already contain every distinct ring embedding.

Parameters

Name Type Description Default
sgraph The graph object that you want to find aromatic cycles in required
default_ring_sizes The ring sizes to consider [5, 6, 7, 8, 9]

Returns

Name Type Description
A list of lists of nodes that are part of aromatic cycles.