10 #ifndef _RD_EMBEDDED_FRAG_H_ 11 #define _RD_EMBEDDED_FRAG_H_ 17 #include <boost/smart_ptr.hpp> 37 CisTransNbr(-1), ccw(true), rotDir(0), d_density(-1.0){
42 aid(aid), angle(-1.0), nbr1(-1), nbr2(-1),
43 CisTransNbr(-1), ccw(true), rotDir(0), d_density(-1.0) {
187 void expandEfrag(
RDKit::INT_LIST &nratms, std::list<EmbeddedFrag> &efrags);
195 void addNonRingAtom(
unsigned int aid,
unsigned int toAid);
211 void mergeNoCommon(
EmbeddedFrag &embObj,
unsigned int toAid,
212 unsigned int nbrAid);
230 void mergeFragsWithComm(std::list<EmbeddedFrag> &efrags);
259 int findNeighbor(
unsigned int aid);
276 INT_EATOM_MAP_I eari;
277 for (eari = d_eatoms.begin(); eari != d_eatoms.end(); eari++) {
278 eari->second.loc += shift;
283 INT_EATOM_MAP_CI posi = d_eatoms.find(aid);
284 if (posi == d_eatoms.end()) {
285 PRECONDITION(0,
"Embedded atom does not contain embedded atom specified");
292 return d_eatoms.size();
305 void flipAboutBond(
unsigned int bondId,
bool flipEnd=
true);
307 void openAngles(
const double *dmat,
unsigned int aid1,
unsigned int aid2);
309 std::vector<PAIR_I_I> findCollisions(
const double *dmat,
bool includeBonds=1);
311 void computeDistMat(DOUBLE_SMART_PTR &dmat);
313 double mimicDistMatAndDensityCostFunc(
const DOUBLE_SMART_PTR *dmat,
316 void permuteBonds(
unsigned int aid,
unsigned int aid1,
unsigned int aid2);
318 void randomSampleFlipsAndPermutations(
unsigned int nBondsPerSample=3,
319 unsigned int nSamples=100,
int seed=100,
320 const DOUBLE_SMART_PTR *dmat=0,
321 double mimicDmatWt=0.0,
322 bool permuteDeg4Nodes=
false);
326 void removeCollisionsBondFlip();
329 void removeCollisionsOpenAngles();
332 void removeCollisionsShortenBonds();
339 void setupNewNeighs();
342 void updateNewNeighs(
unsigned int aid);
354 void canonicalizeOrientation();
359 double totalDensity();
401 void mergeRing(
const EmbeddedFrag &embRing,
unsigned int nCommon,
414 void reflectIfNecessaryDensity(
EmbeddedFrag &embFrag,
unsigned int aid1,
432 void reflectIfNecessaryCisTrans(
EmbeddedFrag &embFrag,
unsigned int ctCase,
433 unsigned int aid1,
unsigned int aid2);
444 void reflectIfNecessaryThirdPt(
EmbeddedFrag &embFrag,
unsigned int aid1,
unsigned int aid2,
468 void addAtomToAtomWithAng(
unsigned int aid,
unsigned int toAid);
484 void addAtomToAtomWithNoAng(
unsigned int aid,
511 void computeNbrsAndAng(
unsigned int aid,
const RDKit::INT_VECT &doneNbrs);
516 double d_px, d_nx, d_py, d_ny;
519 INT_EATOM_MAP d_eatoms;
std::list< int > INT_LIST
boost::shared_array< double > DOUBLE_SMART_PTR
EmbeddedAtom & operator=(const EmbeddedAtom &other)
const RDKit::ROMol * getMol() const
Get the molecule that this embedded fragmetn blongs to.
EmbeddedAtom(unsigned int aid, const RDGeom::Point2D &pos)
void Transform(const RDGeom::Transform2D &trans)
void Translate(const RDGeom::Point2D &shift)
ROMol is a molecule class that is intended to have a fixed topology.
std::vector< INT_VECT > VECT_INT_VECT
std::map< int, Point2D > INT_POINT2D_MAP
const INT_EATOM_MAP & GetEmbeddedAtoms() const
std::vector< int > INT_VECT
Class containing a fragment of a molecule that has already been embedded.
Includes a bunch of functionality for handling Atom and Bond queries.
Class that contains the data for an atoms that has alredy been embedded.
int Size() const
the number of atoms in the embedded system
int nbr2
the second neighbor of atom that from the 'angle'
class for representing a bond
std::map< unsigned int, EmbeddedAtom > INT_EATOM_MAP
RDGeom::Point2D reflectPoint(const RDGeom::Point2D &point, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
EmbeddedFrag()
Default constructor.
INT_EATOM_MAP::const_iterator INT_EATOM_MAP_CI
void Reflect(const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
void markDone()
Mark this fragment to be done for final embedding.
bool isDone()
If this fragment done for the final embedding.
#define PRECONDITION(expr, mess)
EmbeddedAtom GetEmbeddedAtom(unsigned int aid) const
INT_EATOM_MAP::iterator INT_EATOM_MAP_I
RDKit::INT_VECT neighs
and these are the atom IDs of the neighbors that still need to be embedded
int nbr1
the first neighbor of this atom that form the 'angle'