11 #ifndef _RD_DEPICT_UTILS_H_ 12 #define _RD_DEPICT_UTILS_H_ 37 bool operator()(
const PAIR_I_I &pd1,
const PAIR_I_I &pd2)
const {
38 return pd1.first > pd2.first;
42 typedef std::priority_queue<PAIR_I_I, VECT_PII, gtIIPair>
PR_QUEUE;
173 bool ascending =
true);
191 angle = 2 *
M_PI / 3;
195 angle = 2 *
M_PI / 3;
198 angle = 2. *
M_PI / degree;
236 double cross = pt1.
x * pt2.
y - pt1.
y * pt2.
x;
237 double diffAngle =
M_PI - remAngle;
348 const VECT_C_POINT &nbrLocs);
352 const int maxAtNum = 1000;
353 const int maxDeg = 100;
355 anum = anum == 1 ? maxAtNum : anum;
357 return maxDeg * anum + deg;
RDKIT_DEPICTOR_EXPORT void getNbrAtomAndBondIds(unsigned int aid, const RDKit::ROMol *mol, RDKit::INT_VECT &aids, RDKit::INT_VECT &bids)
Get the ids of the atoms and bonds that are connected to aid.
std::pair< int, int > PAIR_I_I
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT getRotatableBonds(const RDKit::ROMol &mol, unsigned int aid1, unsigned int aid2)
find the rotatable bonds on the shortest path between two atoms we will ignore ring atoms...
std::pair< int, int > INT_PAIR
double computeSubAngle(unsigned int degree, RDKit::Atom::HybridizationType htype)
computes a subangle for an atom of given hybridization and degree
hybridization that hasn't been specified
double angleTo(const Point2D &other) const
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT setNbrOrder(unsigned int aid, const RDKit::INT_VECT &nbrs, const RDKit::ROMol &mol)
Set the neighbors yet to added to aid such that the atoms with the most subs.
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT getAllRotatableBonds(const RDKit::ROMol &mol)
find all the rotatable bonds in a molecule we will ignore ring atoms, and double bonds which are mark...
Defines the primary molecule class ROMol as well as associated typedefs.
std::pair< double, PAIR_I_I > PAIR_D_I_I
double computeAngle(const RDGeom::Point2D ¢er, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
computes the rotation angle between two vectors
pulls in the core RDKit functionality
RDKIT_DEPICTOR_EXPORT double BOND_LEN
std::vector< INT_VECT > VECT_INT_VECT
RDKIT_DEPICTOR_EXPORT int pickFirstRingToEmbed(const RDKit::ROMol &mol, const RDKit::VECT_INT_VECT &fusedRings)
pick the ring to embed first in a fused system
std::vector< const RDGeom::Point2D * > VECT_C_POINT
RDKIT_DEPICTOR_EXPORT RDGeom::Point2D reflectPoint(const RDGeom::Point2D &point, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
RDKIT_DEPICTOR_EXPORT void transformPoints(RDGeom::INT_POINT2D_MAP &nringCor, const RDGeom::Transform2D &trans)
RDKIT_DEPICTOR_EXPORT RDGeom::INT_POINT2D_MAP embedRing(const RDKit::INT_VECT &ring)
Some utility functions used in generating 2D coordinates.
std::map< int, Point2D > INT_POINT2D_MAP
std::vector< INT_PAIR > INT_PAIR_VECT
std::priority_queue< PAIR_I_I, VECT_PII, gtIIPair > PR_QUEUE
RDKIT_DEPICTOR_EXPORT unsigned int NUM_BONDS_FLIPS
std::vector< int > INT_VECT
std::pair< double, INT_PAIR > DOUBLE_INT_PAIR
INT_PAIR_VECT::const_iterator INT_PAIR_VECT_CI
int getAtomDepictRank(const RDKit::Atom *at)
returns the rank of the atom for determining draw order
RDKIT_DEPICTOR_EXPORT void reflectPoints(RDGeom::INT_POINT2D_MAP &coordMap, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
Reflect a set of point through a the line joining two point.
RDKIT_DEPICTOR_EXPORT double COLLISION_THRES
HybridizationType
store hybridization
int getAtomicNum() const
returns our atomic number
RDKIT_DEPICTOR_EXPORT double HETEROATOM_COLL_SCALE
std::vector< PAIR_I_I > VECT_PII
RDGeom::Point2D computeNormal(const RDGeom::Point2D ¢er, const RDGeom::Point2D &other)
computes and return the normal of a vector between two points
RDKIT_DEPICTOR_EXPORT INT_PAIR_VECT findBondsPairsToPermuteDeg4(const RDGeom::Point2D ¢er, const RDKit::INT_VECT &nbrBids, const VECT_C_POINT &nbrLocs)
Find pairs of bonds that can be permuted at a non-ring degree 4 atom.
bool operator()(const PAIR_I_I &pd1, const PAIR_I_I &pd2) const
unsigned int getDegree() const
RDKIT_DEPICTOR_EXPORT RDGeom::Point2D computeBisectPoint(const RDGeom::Point2D &rcr, double ang, const RDGeom::Point2D &nb1, const RDGeom::Point2D &nb2)
Find a point that bisects the angle at rcr.
int rotationDir(const RDGeom::Point2D ¢er, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2, double remAngle)
computes the rotation direction between two vectors
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT findNextRingToEmbed(const RDKit::INT_VECT &doneRings, const RDKit::VECT_INT_VECT &fusedRings, int &nextId)
From a given set of rings find the ring the largest common elements.
RDKIT_DEPICTOR_EXPORT double ANGLE_OPEN
RDKIT_DEPICTOR_EXPORT T rankAtomsByRank(const RDKit::ROMol &mol, const T &commAtms, bool ascending=true)
Sort a list of atoms by their CIP rank.
std::list< PAIR_D_I_I > LIST_PAIR_DII
RDKIT_DEPICTOR_EXPORT unsigned int MAX_COLL_ITERS
The class for representing atoms.
Defines the editable molecule class RWMol.
#define RDKIT_DEPICTOR_EXPORT
RDKIT_DEPICTOR_EXPORT double BOND_THRES