NuriKit v0.1.0b2
Loading...
Searching...
No Matches
nuri::RingSetsFinder< MoleculeLike > Class Template Reference

Wrapper class of the common routines of find_sssr() and find_relevant_rings(). More...

#include <nuri/algo/rings.h>

Public Member Functions

 RingSetsFinder (const MoleculeLike &mol, int max_size=-1)
 Construct a new Rings Finder object.
 RingSetsFinder (const RingSetsFinder &)=delete
RingSetsFinderoperator= (const RingSetsFinder &)=delete
 RingSetsFinder (RingSetsFinder &&) noexcept
RingSetsFinderoperator= (RingSetsFinder &&) noexcept
 ~RingSetsFinder () noexcept
Rings find_relevant_rings () const
 Find the relevant rings of the molecule.
Rings find_sssr () const
 Find the SSSR of the molecule.

Detailed Description

template<class MoleculeLike>
class nuri::RingSetsFinder< MoleculeLike >

Wrapper class of the common routines of find_sssr() and find_relevant_rings().

See also
nuri::find_relevant_rings(), nuri::find_sssr()

Formally, SSSR (smallest set of smallest rings) is a minimum cycle basis of the molecular graph. As discussed in many literatures, there is no unique SSSR for a given molecular graph (even for simple molecules such as 2-oxabicyclo[2.2.2]octane), and the SSSR is often counter-intuitive. For example, the SSSR of cubane (although unique, due to symmetry reasons) contains only five rings, which is not most chemists would expect.

On the other hand, union of all SSSRs, sometimes called the relevant rings in the literatures, is unique for a given molecule, and is the "all smallest rings" of the molecule, chemically speaking. It is more appropriate for most applications than SSSR.

We provide two functions along with this class to find the relevant rings and SSSR, respectively. If both are needed, it is recommended to construct this class first, and call find_relevant_rings() and find_sssr() member functions instead of calling the free functions directly.

This is based on the algorithm described in the following paper: Vismara, P. Electron. J. Comb. 1997, 4 (1), R9. DOI: 10.37236/1294

Time complexity: theoretically \(\mathcal{O}(\nu E^3)\), where \(\nu = \mathcal{O}(E)\) is size of SSSR. For most molecules, however, this is \(\mathcal{O}(V^3)\).

Constructor & Destructor Documentation

◆ RingSetsFinder() [1/3]

template<class MoleculeLike>
nuri::RingSetsFinder< MoleculeLike >::RingSetsFinder ( const MoleculeLike & mol,
int max_size = -1 )
explicit

Construct a new Rings Finder object.

Parameters
molA molecule.
max_sizeMaximum size of the rings to be found. If negative, all rings are found.

◆ RingSetsFinder() [2/3]

template<class MoleculeLike>
nuri::RingSetsFinder< MoleculeLike >::RingSetsFinder ( const RingSetsFinder< MoleculeLike > & )
delete

◆ RingSetsFinder() [3/3]

template<class MoleculeLike>
nuri::RingSetsFinder< MoleculeLike >::RingSetsFinder ( RingSetsFinder< MoleculeLike > && )
noexcept

◆ ~RingSetsFinder()

template<class MoleculeLike>
nuri::RingSetsFinder< MoleculeLike >::~RingSetsFinder ( )
noexcept

Member Function Documentation

◆ find_relevant_rings()

template<class MoleculeLike>
Rings nuri::RingSetsFinder< MoleculeLike >::find_relevant_rings ( ) const

Find the relevant rings of the molecule.

Returns
The relevant rings of the molecule.
See also
nuri::find_relevant_rings()

◆ find_sssr()

template<class MoleculeLike>
Rings nuri::RingSetsFinder< MoleculeLike >::find_sssr ( ) const

Find the SSSR of the molecule.

Returns
The smallest set of smallest rings (SSSR) of the molecule.
See also
nuri::find_sssr()
Note
This function does not guarantee that the returned set is unique, nor that the result is reproducible even for the same molecule.

◆ operator=() [1/2]

template<class MoleculeLike>
RingSetsFinder & nuri::RingSetsFinder< MoleculeLike >::operator= ( const RingSetsFinder< MoleculeLike > & )
delete

◆ operator=() [2/2]

template<class MoleculeLike>
RingSetsFinder & nuri::RingSetsFinder< MoleculeLike >::operator= ( RingSetsFinder< MoleculeLike > && )
noexcept

The documentation for this class was generated from the following file: