RDKit
Open-source cheminformatics and machine learning.
|
Class containing a fragment of a molecule that has already been embedded. More...
#include <EmbeddedFrag.h>
Public Member Functions | |
EmbeddedFrag () | |
Default constructor. | |
EmbeddedFrag (unsigned int aid, const RDKit::ROMol *mol) | |
Initializer 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, bool useRingTemplates) | |
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) |
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 fragment belongs 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) |
Transform 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, bool flipEnd=true) |
Flip atoms on one side of a bond - used in removing collisions. | |
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=nullptr, double mimicDmatWt=0.0, bool permuteDeg4Nodes=false) |
void | removeCollisionsBondFlip () |
void | removeCollisionsOpenAngles () |
Remove collision by opening angles at the offending atoms. | |
void | removeCollisionsShortenBonds () |
void | setupNewNeighs () |
helpers functions 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 () |
Class containing a fragment of a molecule that has already been embedded.
Definition at line 146 of file EmbeddedFrag.h.
|
inline |
Default constructor.
Definition at line 153 of file EmbeddedFrag.h.
RDDepict::EmbeddedFrag::EmbeddedFrag | ( | unsigned int | aid, |
const RDKit::ROMol * | mol | ||
) |
Initializer 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 correctness. Also this fragment is less ready (to expand and add new neighbors) than when using other constructors. This is because:
RDDepict::EmbeddedFrag::EmbeddedFrag | ( | const RDKit::ROMol * | mol, |
const RDKit::VECT_INT_VECT & | fusedRings, | ||
bool | useRingTemplates | ||
) |
Initializer from a set of fused rings.
ARGUMENTS:
mol | the molecule of interest |
fusedRings | a vector of rings, each ring is a list of atom ids |
useRingTemplates | whether to use ring system templates for generating initial coordinates |
|
explicit |
Initializer for a cis/trans system using the double bond.
ARGUMENTS:
dblBond | the double bond that is involved in the cis/trans configuration |
void RDDepict::EmbeddedFrag::addNonRingAtom | ( | unsigned int | aid, |
unsigned int | toAid | ||
) |
Add a new non-ring atom to this object.
void RDDepict::EmbeddedFrag::canonicalizeOrientation | ( | ) |
void RDDepict::EmbeddedFrag::computeBox | ( | ) |
compute a box that encloses the fragment
void RDDepict::EmbeddedFrag::computeDistMat | ( | DOUBLE_SMART_PTR & | dmat | ) |
void RDDepict::EmbeddedFrag::expandEfrag | ( | RDKit::INT_LIST & | nratms, |
std::list< EmbeddedFrag > & | efrags | ||
) |
Expand this embedded system by adding neighboring 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
std::vector< PAIR_I_I > RDDepict::EmbeddedFrag::findCollisions | ( | const double * | dmat, |
bool | includeBonds = 1 |
||
) |
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:
aid | the atom id of interest |
RETURNS:
NOTE: by definition we can have only one neighbor in the embedded system.
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.
void RDDepict::EmbeddedFrag::flipAboutBond | ( | unsigned int | bondId, |
bool | flipEnd = true |
||
) |
Flip atoms on one side of a bond - used in removing collisions.
ARGUMENTS:
bondId | - the bond used as the mirror to flip |
flipEnd | - flip the atoms at the end of the bond |
|
inline |
Definition at line 365 of file EmbeddedFrag.h.
|
inline |
Definition at line 367 of file EmbeddedFrag.h.
|
inline |
Definition at line 364 of file EmbeddedFrag.h.
|
inline |
Definition at line 366 of file EmbeddedFrag.h.
|
inline |
Definition at line 298 of file EmbeddedFrag.h.
References PRECONDITION.
|
inline |
Definition at line 289 of file EmbeddedFrag.h.
|
inline |
Get the molecule that this embedded fragment belongs to.
Definition at line 261 of file EmbeddedFrag.h.
|
inline |
If this fragment done for the final embedding.
Definition at line 258 of file EmbeddedFrag.h.
|
inline |
Mark this fragment to be done for final embedding.
Definition at line 255 of file EmbeddedFrag.h.
void RDDepict::EmbeddedFrag::mergeFragsWithComm | ( | std::list< EmbeddedFrag > & | efrags | ) |
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:
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 |
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:
embObj | another EmbeddedFrag object to be merged with this object |
commAtms | a vector of ids of the common atoms |
double RDDepict::EmbeddedFrag::mimicDistMatAndDensityCostFunc | ( | const DOUBLE_SMART_PTR * | dmat, |
double | mimicDmatWt | ||
) |
void RDDepict::EmbeddedFrag::openAngles | ( | const double * | dmat, |
unsigned int | aid1, | ||
unsigned int | aid2 | ||
) |
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 = nullptr , |
||
double | mimicDmatWt = 0.0 , |
||
bool | permuteDeg4Nodes = false |
||
) |
void RDDepict::EmbeddedFrag::Reflect | ( | const RDGeom::Point2D & | loc1, |
const RDGeom::Point2D & | loc2 | ||
) |
void RDDepict::EmbeddedFrag::removeCollisionsBondFlip | ( | ) |
Remove collisions in a structure by flipping rotatable 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 functions to
make list of neighbors for each atom in the embedded system that still need to be embedded
|
inline |
the number of atoms in the embedded system
Definition at line 307 of file EmbeddedFrag.h.
void RDDepict::EmbeddedFrag::Transform | ( | const RDGeom::Transform2D & | trans | ) |
Transform this object to a new coordinates system.
ARGUMENTS:
trans | : the transformation that need to be applied to the atoms in this object |
|
inline |
Definition at line 291 of file EmbeddedFrag.h.
void RDDepict::EmbeddedFrag::updateNewNeighs | ( | unsigned int | aid | ) |
update the unembedded neighbor atom list for a specified atom