OpenStructure
Public Member Functions
RingFinder Class Reference

#include <ring_finder.hh>

Public Member Functions

 RingFinder (mol::EntityHandle &eh)
 
void PerceiveRings ()
 
mol::EntityView GetRings ()
 
int GetRingAtomCount ()
 
int GetRingBondCount ()
 
bool RingsPerceived ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RingFinder()

Member Function Documentation

◆ GetRingAtomCount()

int GetRingAtomCount ( )

Get number of atoms belonging to rings.

◆ GetRingBondCount()

int GetRingBondCount ( )

Get number of bonds belonging to rings.

◆ GetRings()

mol::EntityView GetRings ( )

Get an EntityView, containing all atoms and bonds belonging to rings.

◆ PerceiveRings()

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.

◆ RingsPerceived()

bool RingsPerceived ( )

Check if rings have been perceived.


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