Loading...
Searching...
No Matches
RDKit::RingInfo Class Reference

`#include <RingInfo.h>`

## Public Types

typedef std::vector< int > | MemberType
typedef std::vector< MemberType > | DataType
typedef std::vector< int > | INT_VECT
typedef std::vector< INT_VECT > | VECT_INT_VECT

## Public Member Functions

| RingInfo ()
| RingInfo (const RingInfo &other)=default
RingInfo & | operator= (const RingInfo &other)=default
| RingInfo (RingInfo &&other) noexcept=default
RingInfo & | operator= (RingInfo &&other) noexcept=default
bool | isInitialized () const
| checks to see if we've been properly initialized
void | initialize (RDKit::FIND_RING_TYPE ringType=FIND_RING_TYPE_OTHER_OR_UNKNOWN)
| does initialization
RDKit::FIND_RING_TYPE | getRingType () const
void | reset ()
| blows out all current data and de-initializes
bool | isFindFastOrBetter () const
bool | isSssrOrBetter () const
bool | isSymmSssr () const
unsigned int | addRing (const INT_VECT &atomIndices, const INT_VECT &bondIndices)
| adds a ring to our data
Atom information
INT_VECT | atomRingSizes (unsigned int idx) const
bool | isAtomInRingOfSize (unsigned int idx, unsigned int size) const
| returns whether or not the atom with index `idx` is in a `size` - ring.
unsigned int | numAtomRings (unsigned int idx) const
| returns the number of rings atom `idx` is involved in
unsigned int | minAtomRingSize (unsigned int idx) const
| returns the size of the smallest ring atom `idx` is involved in
const VECT_INT_VECT & | atomRings () const
const INT_VECT & | atomMembers (unsigned int idx) const
bool | areAtomsInSameRing (unsigned int idx1, unsigned int idx2) const
bool | areAtomsInSameRingOfSize (unsigned int idx1, unsigned int idx2, unsigned int size) const
Bond information
INT_VECT | bondRingSizes (unsigned int idx) const
bool | isBondInRingOfSize (unsigned int idx, unsigned int size) const
| returns whether or not the bond with index `idx` is in a `size` - ring.
unsigned int | numBondRings (unsigned int idx) const
| returns the number of rings bond `idx` is involved in
unsigned int | minBondRingSize (unsigned int idx) const
| returns the size of the smallest ring bond `idx` is involved in
unsigned int | numRings () const
| returns the total number of rings
const VECT_INT_VECT & | bondRings () const
const INT_VECT & | bondMembers (unsigned int idx) const
bool | areBondsInSameRing (unsigned int idx1, unsigned int idx2) const
bool | areBondsInSameRingOfSize (unsigned int idx1, unsigned int idx2, unsigned int size) const
bool | isRingFused (unsigned int ringIdx)
| returns whether ring with index `ringIdx` is fused with other rings.
bool | areRingsFused (unsigned int ring1Idx, unsigned int ring2Idx)
unsigned int | numFusedBonds (unsigned int ringIdx)
unsigned int | numFusedRingNeighbors (unsigned int ringIdx)
std::vector< unsigned int > | fusedRingNeighbors (unsigned int ringIdx)

## Friends

class | MolPickler

## Detailed Description

Definition at line 38 of file RingInfo.h.

## Member Typedef Documentation

## DataType

typedef std::vector<MemberType> RDKit::RingInfo::DataType

Definition at line 43 of file RingInfo.h.

## INT_VECT

typedef std::vector<int> RDKit::RingInfo::INT_VECT

Definition at line 44 of file RingInfo.h.

## MemberType

typedef std::vector<int> RDKit::RingInfo::MemberType

Definition at line 42 of file RingInfo.h.

## VECT_INT_VECT

typedef std::vector<INT_VECT> RDKit::RingInfo::VECT_INT_VECT

Definition at line 45 of file RingInfo.h.

## Constructor & Destructor Documentation

## RingInfo() [1/3]

RDKit::RingInfo::RingInfo | ( |  | ) |

inline

Definition at line 47 of file RingInfo.h.

Referenced by operator=(), operator=(), RingInfo(), and RingInfo().

## RingInfo() [2/3]

RDKit::RingInfo::RingInfo | ( | const RingInfo & | other | ) |

default

References RingInfo().

## RingInfo() [3/3]

RDKit::RingInfo::RingInfo | ( | RingInfo && | other | ) |

default noexcept

References RingInfo().

## Member Function Documentation

## addRing()

unsigned int RDKit::RingInfo::addRing | ( | const INT_VECT & | atomIndices,
|  | const INT_VECT & | bondIndices )

adds a ring to our data

Parameters

  atomIndices | the integer indices of the atoms involved in the ring
  bondIndices | the integer indices of the bonds involved in the ring, this must be the same size as `atomIndices`.

Returns
  the number of rings

Notes:

- the object must be initialized before calling this

## areAtomsInSameRing()

bool RDKit::RingInfo::areAtomsInSameRing | ( | unsigned int | idx1,
|  | unsigned int | idx2 ) const

inline

returns whether or not atoms with indices `idx1` and `idx2` belong to the same ring.

Notes:

- the object must be initialized before calling this

Definition at line 144 of file RingInfo.h.

References areAtomsInSameRingOfSize().

## areAtomsInSameRingOfSize()

bool RDKit::RingInfo::areAtomsInSameRingOfSize | ( | unsigned int | idx1,
|  | unsigned int | idx2,
|  | unsigned int | size ) const

returns whether or not atoms with indices `idx1` and `idx2` belong to the same ring of size `size`.

Notes:

- the object must be initialized before calling this

Referenced by areAtomsInSameRing().

## areBondsInSameRing()

bool RDKit::RingInfo::areBondsInSameRing | ( | unsigned int | idx1,
|  | unsigned int | idx2 ) const

inline

returns whether or not bonds with indices `idx1` and `idx2` belong to the same ring.

Notes:

- the object must be initialized before calling this

Definition at line 221 of file RingInfo.h.

References areBondsInSameRingOfSize().

## areBondsInSameRingOfSize()

bool RDKit::RingInfo::areBondsInSameRingOfSize | ( | unsigned int | idx1,
|  | unsigned int | idx2,
|  | unsigned int | size ) const

returns whether or not bonds with indices `idx1` and `idx2` belong to the same ring of size `size`.

Notes:

- the object must be initialized before calling this

Referenced by areBondsInSameRing().

## areRingsFused()

bool RDKit::RingInfo::areRingsFused | ( | unsigned int | ring1Idx,
|  | unsigned int | ring2Idx )

returns whether rings with indices `ring1Idx` and `ring2Idx` have at least one bond in common.

Notes:

- the object must be initialized before calling this

## atomMembers()

const INT_VECT & RDKit::RingInfo::atomMembers | ( | unsigned int | idx | ) | const

returns our `atom-members` vector for atom idx (i.e., a vector of ints reporting the ring indices that atom idx is member of), or an empty vector if the atom is not in any ring.

Notes:

- the object must be initialized before calling this

## atomRings()

const VECT_INT_VECT & RDKit::RingInfo::atomRings | ( |  | ) | const

inline

returns our `atom-rings` vectors, i.e. a vector of int vectors reporting the atom indices which are part of each ring

Notes:

- the object must be initialized before calling this

Definition at line 126 of file RingInfo.h.

## atomRingSizes()

INT_VECT RDKit::RingInfo::atomRingSizes | ( | unsigned int | idx | ) | const

returns a vector with sizes of the rings that atom with index `idx` is in.

Notes:

- the object must be initialized before calling this

## bondMembers()

const INT_VECT & RDKit::RingInfo::bondMembers | ( | unsigned int | idx | ) | const

returns our `bond-members` vector for bond idx (i.e., a vector of ints reporting the ring indices that bond idx is member of), or an empty vector if the bond is not in any ring.

Notes:

- the object must be initialized before calling this

## bondRings()

const VECT_INT_VECT & RDKit::RingInfo::bondRings | ( |  | ) | const

inline

returns our `bond-rings` vectors, i.e. a vector of int vectors reporting the bond indices which are part of each ring

Notes:

- the object must be initialized before calling this

Definition at line 203 of file RingInfo.h.

## bondRingSizes()

INT_VECT RDKit::RingInfo::bondRingSizes | ( | unsigned int | idx | ) | const

returns a vector with sizes of the rings that bond with index `idx` is in.

Notes:

- the object must be initialized before calling this

## fusedRingNeighbors()

std::vector< unsigned int > RDKit::RingInfo::fusedRingNeighbors | ( | unsigned int | ringIdx | ) |

returns the indices of rings which have at least one bond in common with ring with index `ringIdx`.

Notes:

- the object must be initialized before calling this

## getRingType()

RDKit::FIND_RING_TYPE RDKit::RingInfo::getRingType | ( |  | ) | const

inline

Definition at line 57 of file RingInfo.h.

## initialize()

void RDKit::RingInfo::initialize | ( | RDKit::FIND_RING_TYPE | ringType = FIND_RING_TYPE_OTHER_OR_UNKNOWN | ) |

does initialization

References RDKit::FIND_RING_TYPE_OTHER_OR_UNKNOWN.

## isAtomInRingOfSize()

bool RDKit::RingInfo::isAtomInRingOfSize | ( | unsigned int | idx,
|  | unsigned int | size ) const

returns whether or not the atom with index `idx` is in a `size` - ring.

Notes:

- the object must be initialized before calling this

Referenced by RDKit::queryAtomIsInRingOfSize(), and RDKit::queryAtomIsInRingOfSize().

## isBondInRingOfSize()

bool RDKit::RingInfo::isBondInRingOfSize | ( | unsigned int | idx,
|  | unsigned int | size ) const

returns whether or not the bond with index `idx` is in a `size` - ring.

Notes:

- the object must be initialized before calling this

Referenced by RDKit::queryBondIsInRingOfSize().

## isFindFastOrBetter()

bool RDKit::RingInfo::isFindFastOrBetter | ( |  | ) | const

inline

Definition at line 61 of file RingInfo.h.

References RDKit::FIND_RING_TYPE_FAST, RDKit::FIND_RING_TYPE_SSSR, and RDKit::FIND_RING_TYPE_SYMM_SSSR.

## isInitialized()

bool RDKit::RingInfo::isInitialized | ( |  | ) | const

inline

checks to see if we've been properly initialized

Definition at line 53 of file RingInfo.h.

## isRingFused()

bool RDKit::RingInfo::isRingFused | ( | unsigned int | ringIdx | ) |

returns whether ring with index `ringIdx` is fused with other rings.

Notes:

- the object must be initialized before calling this

## isSssrOrBetter()

bool RDKit::RingInfo::isSssrOrBetter | ( |  | ) | const

inline

Definition at line 67 of file RingInfo.h.

References RDKit::FIND_RING_TYPE_SSSR, and RDKit::FIND_RING_TYPE_SYMM_SSSR.

## isSymmSssr()

bool RDKit::RingInfo::isSymmSssr | ( |  | ) | const

inline

Definition at line 72 of file RingInfo.h.

References RDKit::FIND_RING_TYPE_SYMM_SSSR.

## minAtomRingSize()

unsigned int RDKit::RingInfo::minAtomRingSize | ( | unsigned int | idx | ) | const

returns the size of the smallest ring atom `idx` is involved in

Notes:

- the object must be initialized before calling this

Referenced by RDKit::queryAtomMinRingSize().

## minBondRingSize()

unsigned int RDKit::RingInfo::minBondRingSize | ( | unsigned int | idx | ) | const

returns the size of the smallest ring bond `idx` is involved in

Notes:

- the object must be initialized before calling this

Referenced by RDKit::queryBondMinRingSize().

## numAtomRings()

unsigned int RDKit::RingInfo::numAtomRings | ( | unsigned int | idx | ) | const

returns the number of rings atom `idx` is involved in

Notes:

- the object must be initialized before calling this

Referenced by RDKit::queryIsAtomInNRings(), and RDKit::queryIsAtomInRing().

## numBondRings()

unsigned int RDKit::RingInfo::numBondRings | ( | unsigned int | idx | ) | const

returns the number of rings bond `idx` is involved in

Notes:

- the object must be initialized before calling this

Referenced by RDKit::queryAtomHasRingBond(), RDKit::queryAtomRingBondCount(), RDKit::queryIsBondInNRings(), and RDKit::queryIsBondInRing().

## numFusedBonds()

unsigned int RDKit::RingInfo::numFusedBonds | ( | unsigned int | ringIdx | ) |

returns the number of bonds shared with other rings in ring with index `ringIdx`.

Notes:

- the object must be initialized before calling this

## numFusedRingNeighbors()

unsigned int RDKit::RingInfo::numFusedRingNeighbors | ( | unsigned int | ringIdx | ) |

returns the number of rings which have at least one bond in common with ring with index `ringIdx`.

Notes:

- the object must be initialized before calling this

## numRings()

unsigned int RDKit::RingInfo::numRings | ( |  | ) | const

returns the total number of rings

Notes:

- the object must be initialized before calling this
- if the RDKit has been built with URF support, this returns the number of ring families.

## operator=() [1/2]

RingInfo & RDKit::RingInfo::operator= | ( | const RingInfo & | other | ) |

default

References RingInfo().

## operator=() [2/2]

RingInfo & RDKit::RingInfo::operator= | ( | RingInfo && | other | ) |

default noexcept

References RingInfo().

## reset()

void RDKit::RingInfo::reset | ( |  | ) |

blows out all current data and de-initializes

## Friends And Related Symbol Documentation

## MolPickler

friend class MolPickler

friend

Definition at line 39 of file RingInfo.h.

References MolPickler.

Referenced by MolPickler.

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

- RingInfo.h