Skip to main content

find_sssr_from_adj

Function find_sssr_from_adj 

Source
pub fn find_sssr_from_adj(
    adj: &HashMap<i32, Vec<i32>>,
    bonds: impl IntoIterator<Item = (i32, i32)>,
    max_size: usize,
) -> Vec<Ring>
Expand description

Practical SSSR from adjacency + undirected bonds.

Unique shortest cycles through each bond, then a greedy cover that prefers smaller rings. Depiction uses this (aromatic circles, interiors). Align uses find_relevant_rings_from_adj instead. max_size is inclusive.