![]() |
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. More... | |
EmbeddedFrag (unsigned int aid, const RDKit::ROMol *mol) | |
Intializer from a single atom id. More... | |
EmbeddedFrag (const RDKit::ROMol *mol, const RDGeom::INT_POINT2D_MAP &coordMap) | |
Constructor when the coordinates have been specified for a set of atoms. More... | |
EmbeddedFrag (const RDKit::ROMol *mol, const RDKit::VECT_INT_VECT &fusedRings) | |
Initializer from a set of fused rings. More... | |
EmbeddedFrag (const RDKit::Bond *dblBond) | |
Initializer for a cis/trans system using the double bond. More... | |
void | expandEfrag (RDKit::INT_LIST &nratms, std::list< EmbeddedFrag > &efrags) |
Expand this embedded system by adding negihboring atoms or other embedded systems. More... | |
void | addNonRingAtom (unsigned int aid, unsigned int toAid) |
Add a new non-ring atom to this object. More... | |
void | mergeNoCommon (EmbeddedFrag &embObj, unsigned int toAid, unsigned int nbrAid) |
Merge this embedded object with another embedded fragment. More... | |
void | mergeWithCommon (EmbeddedFrag &embObj, RDKit::INT_VECT &commAtms) |
Merge this embedded object with another embedded fragment. More... | |
void | mergeFragsWithComm (std::list< EmbeddedFrag > &efrags) |
void | markDone () |
Mark this fragment to be done for final embedding. More... | |
bool | isDone () |
If this fragment done for the final embedding. More... | |
const RDKit::ROMol * | getMol () const |
Get the molecule that this embedded fragmetn blongs to. More... | |
RDKit::INT_VECT | findCommonAtoms (const EmbeddedFrag &efrag2) |
Find the common atom ids between this fragment and a second one. More... | |
int | findNeighbor (unsigned int aid) |
Find a neighbor to a non-ring atom among the already embedded atoms. More... | |
void | Transform (const RDGeom::Transform2D &trans) |
Tranform this object to a new coordinates system. More... | |
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 More... | |
void | computeBox () |
compute a box that encloses the fragment More... | |
void | flipAboutBond (unsigned int bondId, bool flipEnd=true) |
Flip atoms on one side of a bond - used in removing colissions. More... | |
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. More... | |
void | removeCollisionsShortenBonds () |
Remove collisions by shortening bonds along the shortest path between the atoms. More... | |
void | setupNewNeighs () |
helpers funtions to More... | |
void | updateNewNeighs (unsigned int aid) |
update the unembedded neighbor atom list for a specified atom More... | |
int | findNumNeigh (const RDGeom::Point2D &pt, double radius) |
Find all atoms in this embedded system that are within a specified distant of a point. More... | |
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 134 of file EmbeddedFrag.h.
|
inline |
Default constructor.
Definition at line 140 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:
RDDepict::EmbeddedFrag::EmbeddedFrag | ( | const RDKit::ROMol * | mol, |
const RDKit::VECT_INT_VECT & | fusedRings | ||
) |
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 |
|
explicit |
Initializer for a cis/trans system using the double bond.
ARGUMENTS:
dblBond | the double bond that is involed 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 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
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 embdded 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 colissions.
ARGUMENTS:
bondId | - the bond used as the mirror to flip |
flipEnd | - flip the atoms at the end of the bond |
|
inline |
Definition at line 350 of file EmbeddedFrag.h.
|
inline |
Definition at line 352 of file EmbeddedFrag.h.
|
inline |
Definition at line 349 of file EmbeddedFrag.h.
|
inline |
Definition at line 351 of file EmbeddedFrag.h.
|
inline |
Definition at line 282 of file EmbeddedFrag.h.
References PRECONDITION.
|
inline |
Definition at line 271 of file EmbeddedFrag.h.
|
inline |
Get the molecule that this embedded fragmetn blongs to.
Definition at line 243 of file EmbeddedFrag.h.
|
inline |
If this fragment done for the final embedding.
Definition at line 238 of file EmbeddedFrag.h.
|
inline |
Mark this fragment to be done for final embedding.
Definition at line 233 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 = 0 , |
||
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 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
|
inline |
the number of atoms in the embedded system
Definition at line 291 of file EmbeddedFrag.h.
void RDDepict::EmbeddedFrag::Transform | ( | const RDGeom::Transform2D & | trans | ) |
Tranform 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 275 of file EmbeddedFrag.h.
void RDDepict::EmbeddedFrag::updateNewNeighs | ( | unsigned int | aid | ) |
update the unembedded neighbor atom list for a specified atom