RDCode: RDDepict::EmbeddedFrag Class Reference

# RDDepict::EmbeddedFrag Class Reference

Class containing a fragment of a molecule that has already been embedded. More...

`#include <EmbeddedFrag.h>`

List of all members.

## Public Member Functions
| EmbeddedFrag ()
| Default constructor.
| EmbeddedFrag (unsigned int aid, const RDKit::ROMol *mol)
| Intializer from a single atom id.
| EmbeddedFrag (const RDKit::ROMol *mol, const RDGeom::INT_POINT2D_MAP &coordMap)
| Constructor when the coordinates have been specified for a set of atoms.
| EmbeddedFrag (const RDKit::ROMol *mol, const RDKit::VECT_INT_VECT &fusedRings)
| Initializer from a set of fused rings.
| EmbeddedFrag (const RDKit::Bond *dblBond)
| Initializer for a cis/trans system using the double bond.
void | expandEfrag (RDKit::INT_LIST &nratms, std::list< EmbeddedFrag > &efrags)
| Expand this embedded system by adding negihboring atoms or other embedded systems.
void | addNonRingAtom (unsigned int aid, unsigned int toAid)
| Add a new non-ring atom to this object.
void | mergeNoCommon (EmbeddedFrag &embObj, unsigned int toAid, unsigned int nbrAid)
| Merge this embedded object with another embedded fragment.
void | mergeWithCommon (EmbeddedFrag &embObj, RDKit::INT_VECT &commAtms)
| Merge this embedded object with another embedded fragment.
void | mergeFragsWithComm (std::list< EmbeddedFrag > &efrags)
void | markDone ()
| Mark this fragment to be done for final embedding.
bool | isDone ()
| If this fragment done for the final embedding.
const RDKit::ROMol * | getMol () const
| Get the molecule that this embedded fragmetn blongs to.
RDKit::INT_VECT | findCommonAtoms (const EmbeddedFrag &efrag2)
| Find the common atom ids between this fragment and a second one.
int | findNeighbor (unsigned int aid)
| Find a neighbor to a non-ring atom among the already embedded atoms.
void | Transform (const RDGeom::Transform2D &trans)
| Tranform this object to a new coordinates system.
void | Reflect (const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
const INT_EATOM_MAP & | GetEmbeddedAtoms () const
void | Translate (const RDGeom::Point2D &shift)
EmbeddedAtom | GetEmbeddedAtom (unsigned int aid) const
int | Size () const
| the number of atoms in the embedded system
void | computeBox ()
| compute a box that encloses the fragment
void | flipAboutBond (unsigned int bondId)
| Flip atoms on one side of a bond - used in removing colissions.
void | openAngles (const double *dmat, unsigned int aid1, unsigned int aid2)
std::vector< PAIR_I_I > | findCollisions (const double *dmat, bool includeBonds=1)
void | computeDistMat (DOUBLE_SMART_PTR &dmat)
double | mimicDistMatAndDensityCostFunc (const DOUBLE_SMART_PTR *dmat, double mimicDmatWt)
void | permuteBonds (unsigned int aid, unsigned int aid1, unsigned int aid2)
void | randomSampleFlipsAndPermutations (unsigned int nBondsPerSample=3, unsigned int nSamples=100, int seed=100, const DOUBLE_SMART_PTR *dmat=0, double mimicDmatWt=0.0, bool permuteDeg4Nodes=false)
void | removeCollisionsBondFlip ()
void | removeCollisionsOpenAngles ()
| Remove collision by opening angles at the offending atoms.
void | removeCollisionsShortenBonds ()
| Remove collisions by shortening bonds along the shortest path between the atoms.
void | setupNewNeighs ()
| helpers funtions to
void | updateNewNeighs (unsigned int aid)
| update the unembedded neighbor atom list for a specified atom
int | findNumNeigh (const RDGeom::Point2D &pt, double radius)
| Find all atoms in this embedded system that are within a specified distant of a point.
double | getBoxPx ()
double | getBoxNx ()
double | getBoxPy ()
double | getBoxNy ()
void | canonicalizeOrientation ()

## Detailed Description

Class containing a fragment of a molecule that has already been embedded.

Definition at line 130 of file EmbeddedFrag.h.

## Constructor & Destructor Documentation

RDDepict::EmbeddedFrag::EmbeddedFrag | ( |  | ) | `[inline]`

Default constructor.

Definition at line 136 of file EmbeddedFrag.h.

RDDepict::EmbeddedFrag::EmbeddedFrag | ( | unsigned int | aid,
|  | const RDKit::ROMol * | mol |
| ) |  |  |

Intializer from a single atom id.

A single Embedded Atom with this atom ID is added and placed at the origin

RDDepict::EmbeddedFrag::EmbeddedFrag | ( | const RDKit::ROMol * | mol,
|  | const RDGeom::INT_POINT2D_MAP & | coordMap |
| ) |  |  |

Constructor when the coordinates have been specified for a set of atoms.

This simply initialized a set of EmbeddedAtom to have the same coordinates as the one's specified. No testing is done to verify any kind of ocrrectlness. Also this fragment is less ready (to expand and add new neighbors) than when using other constructors. This is because:

- the user may have specified coords for only a part of the atoms in a fused ring systems in which case we need to find these atoms and merge these ring systems to this fragment
- The atoms are not yet aware of their neighbor (what is left to add etc.) this again depends on atoms properly so that new neighbors can be added to them

RDDepict::EmbeddedFrag::EmbeddedFrag | ( | const RDKit::ROMol * | mol,
|  | const RDKit::VECT_INT_VECT & | fusedRings |
| ) |  |  |

Initializer from a set of fused rings.

ARGUMENTS:

Parameters:

  | mol | the molecule of interest
  | fusedRings | a vector of rings, each ring is a list of atom ids

RDDepict::EmbeddedFrag::EmbeddedFrag | ( | const RDKit::Bond * | dblBond | ) | `[explicit]`

Initializer for a cis/trans system using the double bond.

ARGUMENTS:

Parameters:

  | dblBond | the double bond that is involed in the cis/trans configuration

## Member Function Documentation

void RDDepict::EmbeddedFrag::expandEfrag | ( | RDKit::INT_LIST & | nratms,
|  | std::list< EmbeddedFrag > & | efrags |
| ) |  |  |

Expand this embedded system by adding negihboring atoms or other embedded systems.

Note that both nratms and efrags are modified in this function as we start merging them with the current fragment

void RDDepict::EmbeddedFrag::addNonRingAtom | ( | unsigned int | aid,
|  | unsigned int | toAid |
| ) |  |  |

Add a new non-ring atom to this object.

void RDDepict::EmbeddedFrag::mergeNoCommon | ( | EmbeddedFrag & | embObj,
|  | unsigned int | toAid,
|  | unsigned int | nbrAid |
| ) |  |  |

Merge this embedded object with another embedded fragment.

The transformation (rotation + translation required to attached the passed in object will be computed and applied. The coordinates of the atoms in this object will remain fixed We will assume that there are no common atoms between the two fragments to start with

ARGUMENTS:

Parameters:

  | embObj | another EmbeddedFrag object to be merged with this object
  | toAid | the atom in this embedded fragment to which the new object will be attached
  | nbrAid | the atom in the other fragment to attach to
  | mol | the molecule of interest

void RDDepict::EmbeddedFrag::mergeWithCommon | ( | EmbeddedFrag & | embObj,
|  | RDKit::INT_VECT & | commAtms |
| ) |  |  |

Merge this embedded object with another embedded fragment.

The transformation (rotation + translation required to attached the passed in object will be computed and applied. The coordinates of the atoms in this object will remain fixed This already know there are a atoms in common and we will use them to merge things

ARGUMENTS:

Parameters:

  | embObj | another EmbeddedFrag object to be merged with this object
  | commAtms | a vector of ids of the common atoms
  | mol | the molecule of interest

void RDDepict::EmbeddedFrag::mergeFragsWithComm | ( | std::list< EmbeddedFrag > & | efrags | ) |

void RDDepict::EmbeddedFrag::markDone | ( |  | ) | `[inline]`

Mark this fragment to be done for final embedding.

Definition at line 229 of file EmbeddedFrag.h.

bool RDDepict::EmbeddedFrag::isDone | ( |  | ) | `[inline]`

If this fragment done for the final embedding.

Definition at line 234 of file EmbeddedFrag.h.

const RDKit::ROMol* RDDepict::EmbeddedFrag::getMol | ( |  | ) | const`[inline]`

Get the molecule that this embedded fragmetn blongs to.

Definition at line 239 of file EmbeddedFrag.h.

RDKit::INT_VECT RDDepict::EmbeddedFrag::findCommonAtoms | ( | const EmbeddedFrag & | efrag2 | ) |

Find the common atom ids between this fragment and a second one.

int RDDepict::EmbeddedFrag::findNeighbor | ( | unsigned int | aid | ) |

Find a neighbor to a non-ring atom among the already embedded atoms.

ARGUMENTS:

Parameters:

  | aid | the atom id of interest
  | mol | molecule object

RETURNS:

Returns:
  the id of the atom if we found a neighbor -1 otherwise

NOTE: by definition we can have only one neighbor in the embdded system.

void RDDepict::EmbeddedFrag::Transform | ( | const RDGeom::Transform2D & | trans | ) |

Tranform this object to a new coordinates system.

ARGUMENTS:

Parameters:

  | trans | : the transformation that need to be applied to the atoms in this object

void RDDepict::EmbeddedFrag::Reflect | ( | const RDGeom::Point2D & | loc1,
|  | const RDGeom::Point2D & | loc2 |
| ) |  |  |

const INT_EATOM_MAP& RDDepict::EmbeddedFrag::GetEmbeddedAtoms | ( |  | ) | const`[inline]`

Definition at line 268 of file EmbeddedFrag.h.

void RDDepict::EmbeddedFrag::Translate | ( | const RDGeom::Point2D & | shift | ) | `[inline]`

Definition at line 272 of file EmbeddedFrag.h.

EmbeddedAtom RDDepict::EmbeddedFrag::GetEmbeddedAtom | ( | unsigned int | aid | ) | const`[inline]`

Definition at line 279 of file EmbeddedFrag.h.

References PRECONDITION.

int RDDepict::EmbeddedFrag::Size | ( |  | ) | const`[inline]`

the number of atoms in the embedded system

Definition at line 288 of file EmbeddedFrag.h.

void RDDepict::EmbeddedFrag::computeBox | ( |  | ) |

compute a box that encloses the fragment

void RDDepict::EmbeddedFrag::flipAboutBond | ( | unsigned int | bondId | ) |

Flip atoms on one side of a bond - used in removing colissions.

ARGUMENTS:

Parameters:

  | mol | - molecule involved in the frgament
  | bondId | - the bond used as the mirror to flip

void RDDepict::EmbeddedFrag::openAngles | ( | const double * | dmat,
|  | unsigned int | aid1,
|  | unsigned int | aid2 |
| ) |  |  |

std::vector<PAIR_I_I> RDDepict::EmbeddedFrag::findCollisions | ( | const double * | dmat,
|  | bool | includeBonds = `1` |
| ) |  |  |

void RDDepict::EmbeddedFrag::computeDistMat | ( | DOUBLE_SMART_PTR & | dmat | ) |

double RDDepict::EmbeddedFrag::mimicDistMatAndDensityCostFunc | ( | const DOUBLE_SMART_PTR * | dmat,
|  | double | mimicDmatWt |
| ) |  |  |

void RDDepict::EmbeddedFrag::permuteBonds | ( | unsigned int | aid,
|  | unsigned int | aid1,
|  | unsigned int | aid2 |
| ) |  |  |

void RDDepict::EmbeddedFrag::randomSampleFlipsAndPermutations | ( | unsigned int | nBondsPerSample = `3`,
|  | unsigned int | nSamples = `100`,
|  | int | seed = `100`,
|  | const DOUBLE_SMART_PTR * | dmat = `0`,
|  | double | mimicDmatWt = `0.0`,
|  | bool | permuteDeg4Nodes = `false` |
| ) |  |  |

void RDDepict::EmbeddedFrag::removeCollisionsBondFlip | ( |  | ) |

Remove collisions in a structure by flipping rotable bonds along the shortest path between two colliding atoms

void RDDepict::EmbeddedFrag::removeCollisionsOpenAngles | ( |  | ) |

Remove collision by opening angles at the offending atoms.

void RDDepict::EmbeddedFrag::removeCollisionsShortenBonds | ( |  | ) |

Remove collisions by shortening bonds along the shortest path between the atoms.

void RDDepict::EmbeddedFrag::setupNewNeighs | ( |  | ) |

helpers funtions to

make list of neighbors for each atom in the embedded system that still need to be embedded

void RDDepict::EmbeddedFrag::updateNewNeighs | ( | unsigned int | aid | ) |

update the unembedded neighbor atom list for a specified atom

int RDDepict::EmbeddedFrag::findNumNeigh | ( | const RDGeom::Point2D & | pt,
|  | double | radius |
| ) |  |  |

Find all atoms in this embedded system that are within a specified distant of a point.

double RDDepict::EmbeddedFrag::getBoxPx | ( |  | ) | `[inline]`

Definition at line 345 of file EmbeddedFrag.h.

double RDDepict::EmbeddedFrag::getBoxNx | ( |  | ) | `[inline]`

Definition at line 346 of file EmbeddedFrag.h.

double RDDepict::EmbeddedFrag::getBoxPy | ( |  | ) | `[inline]`

Definition at line 347 of file EmbeddedFrag.h.

double RDDepict::EmbeddedFrag::getBoxNy | ( |  | ) | `[inline]`

Definition at line 348 of file EmbeddedFrag.h.

void RDDepict::EmbeddedFrag::canonicalizeOrientation | ( |  | ) |

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

- EmbeddedFrag.h