11 #ifndef _RD_EMBEDDED_FRAG_H_ 12 #define _RD_EMBEDDED_FRAG_H_ 18 #include <boost/smart_ptr.hpp> 218 void expandEfrag(
RDKit::INT_LIST &nratms, std::list<EmbeddedFrag> &efrags);
227 void addNonRingAtom(
unsigned int aid,
unsigned int toAid);
244 void mergeNoCommon(
EmbeddedFrag &embObj,
unsigned int toAid,
245 unsigned int nbrAid);
263 void mergeFragsWithComm(std::list<EmbeddedFrag> &efrags);
288 int findNeighbor(
unsigned int aid);
303 INT_EATOM_MAP_I eari;
304 for (eari = d_eatoms.begin(); eari != d_eatoms.end(); eari++) {
305 eari->second.loc += shift;
310 INT_EATOM_MAP_CI posi = d_eatoms.find(aid);
311 if (posi == d_eatoms.end()) {
312 PRECONDITION(0,
"Embedded atom does not contain embedded atom specified");
318 int Size()
const {
return d_eatoms.size(); }
330 void flipAboutBond(
unsigned int bondId,
bool flipEnd =
true);
332 void openAngles(
const double *dmat,
unsigned int aid1,
unsigned int aid2);
334 std::vector<PAIR_I_I> findCollisions(
const double *dmat,
335 bool includeBonds = 1);
337 void computeDistMat(DOUBLE_SMART_PTR &dmat);
339 double mimicDistMatAndDensityCostFunc(
const DOUBLE_SMART_PTR *dmat,
342 void permuteBonds(
unsigned int aid,
unsigned int aid1,
unsigned int aid2);
344 void randomSampleFlipsAndPermutations(
unsigned int nBondsPerSample = 3,
345 unsigned int nSamples = 100,
347 const DOUBLE_SMART_PTR *dmat = 0,
348 double mimicDmatWt = 0.0,
349 bool permuteDeg4Nodes =
false);
353 void removeCollisionsBondFlip();
356 void removeCollisionsOpenAngles();
360 void removeCollisionsShortenBonds();
366 void setupNewNeighs();
369 void updateNewNeighs(
unsigned int aid);
380 void canonicalizeOrientation();
383 double totalDensity();
417 unsigned int aid1,
unsigned int aid2,
426 void mergeRing(
const EmbeddedFrag &embRing,
unsigned int nCommon,
439 void reflectIfNecessaryDensity(
EmbeddedFrag &embFrag,
unsigned int aid1,
457 void reflectIfNecessaryCisTrans(
EmbeddedFrag &embFrag,
unsigned int ctCase,
458 unsigned int aid1,
unsigned int aid2);
469 void reflectIfNecessaryThirdPt(
EmbeddedFrag &embFrag,
unsigned int aid1,
470 unsigned int aid2,
unsigned int aid3);
495 void addAtomToAtomWithAng(
unsigned int aid,
unsigned int toAid);
511 void addAtomToAtomWithNoAng(
539 void computeNbrsAndAng(
unsigned int aid,
const RDKit::INT_VECT &doneNbrs);
544 double d_px, d_nx, d_py, d_ny;
548 INT_EATOM_MAP d_eatoms;
std::list< int > INT_LIST
EmbeddedAtom & operator=(const EmbeddedAtom &other)
int Size() const
the number of atoms in the embedded system
EmbeddedAtom(unsigned int aid, const RDGeom::Point2D &pos)
RDGeom::Point2D normal
a zig-zag manner
double angle
the angle that is already takes at this atom, so any new atom attaching to
const INT_EATOM_MAP & GetEmbeddedAtoms() const
void Transform(const RDGeom::Transform2D &trans)
void Translate(const RDGeom::Point2D &shift)
EmbeddedAtom GetEmbeddedAtom(unsigned int aid) const
std::vector< INT_VECT > VECT_INT_VECT
const RDKit::ROMol * getMol() const
Get the molecule that this embedded fragmetn blongs to.
RDKIT_DEPICTOR_EXPORT RDGeom::Point2D reflectPoint(const RDGeom::Point2D &point, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
std::map< int, Point2D > INT_POINT2D_MAP
boost::shared_array< double > DOUBLE_SMART_PTR
std::vector< int > INT_VECT
Class containing a fragment of a molecule that has already been embedded.
Class that contains the data for an atoms that has alredy been embedded.
int rotDir
useful only on atoms that are degree >= 4
int nbr2
the second neighbor of atom that from the 'angle'
class for representing a bond
std::map< unsigned int, EmbeddedAtom > INT_EATOM_MAP
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)
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 CisTransNbr
is this is a cis/trans atom the neighbor of this atom that is involved in
int nbr1
the first neighbor of this atom that form the 'angle'
#define RDKIT_DEPICTOR_EXPORT