Class for finding rings in an entity. More...
#include <ring_finder.hh>
Public Member Functions | |
RingFinder (mol::EntityHandle &eh) | |
void | PerceiveRings () |
mol::EntityView | GetRings () |
int | GetRingAtomCount () |
int | GetRingBondCount () |
bool | RingsPerceived () |
Class for finding rings in an entity.
This is an implementation of a depth first search based method to identify all atoms and bonds belonging to rings in an entity. The time complexity is linear. The search for rings is only carried out once and the ring information is stored in generic properties in the entity and it can be obtained as an EntityView.
Definition at line 40 of file ring_finder.hh.
RingFinder | ( | mol::EntityHandle & | eh | ) |
int GetRingAtomCount | ( | ) |
Get number of atoms belonging to rings.
int GetRingBondCount | ( | ) |
Get number of bonds belonging to rings.
mol::EntityView GetRings | ( | ) |
Get an EntityView, containing all atoms and bonds belonging to rings.
void PerceiveRings | ( | ) |
Walk along the path of the entity in a depth first search and identify atoms and bonds which are in rings.
For all atoms and bonds, belonging to a ring, the BoolProp RFinring is set to true. The search for rings is only carried out once. This method does not need to be called explicitly, it will be automatically called if the rings have not yet been identified.
bool RingsPerceived | ( | ) |
Check if rings have been perceived.