 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
11 #ifndef _RD_DEPICT_UTILS_H_
12 #define _RD_DEPICT_UTILS_H_
38 return pd1.first > pd2.first;
42 typedef std::priority_queue<PAIR_I_I, VECT_PII, gtIIPair>
PR_QUEUE;
177 bool ascending =
true);
195 angle = 2 *
M_PI / 3;
199 angle = 2 *
M_PI / 3;
202 angle = 2. *
M_PI / degree;
240 double cross = pt1.
x * pt2.
y - pt1.
y * pt2.
x;
241 double diffAngle =
M_PI - remAngle;
360 const int maxAtNum = 1000;
361 const int maxDeg = 100;
363 anum = anum == 1 ? maxAtNum : anum;
365 return maxDeg * anum + deg;
#define RDKIT_DEPICTOR_EXPORT
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::priority_queue< PAIR_I_I, VECT_PII, gtIIPair > PR_QUEUE
std::vector< INT_VECT > VECT_INT_VECT
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.
INT_PAIR_VECT::const_iterator INT_PAIR_VECT_CI
RDKIT_DEPICTOR_EXPORT unsigned int MAX_COLL_ITERS
Defines the primary molecule class ROMol as well as associated typedefs.
std::vector< int > INT_VECT
std::list< PAIR_D_I_I > LIST_PAIR_DII
std::pair< int, int > INT_PAIR
HybridizationType
store hybridization
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...
RDKIT_DEPICTOR_EXPORT void transformPoints(RDGeom::INT_POINT2D_MAP &nringCor, const RDGeom::Transform2D &trans)
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 getAtomicNum() const
returns our atomic number
double angleTo(const Point2D &other) const
bool operator()(const PAIR_I_I &pd1, const PAIR_I_I &pd2) const
int rotationDir(const RDGeom::Point2D ¢er, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2, double remAngle)
computes the rotation direction between two vectors
double computeAngle(const RDGeom::Point2D ¢er, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
computes the rotation angle between two vectors
The class for representing atoms.
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.
double computeSubAngle(unsigned int degree, RDKit::Atom::HybridizationType htype)
computes a subangle for an atom of given hybridization and degree
RDKIT_DEPICTOR_EXPORT unsigned int NUM_BONDS_FLIPS
unsigned int getDegree() const
pulls in the core RDKit functionality
RDKIT_DEPICTOR_EXPORT RDGeom::INT_POINT2D_MAP embedRing(const RDKit::INT_VECT &ring)
Some utility functions used in generating 2D coordinates.
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.
int getAtomDepictRank(const RDKit::Atom *at)
returns the rank of the atom for determining draw order
std::vector< const RDGeom::Point2D * > VECT_C_POINT
std::pair< double, PAIR_I_I > PAIR_D_I_I
std::vector< PAIR_I_I > VECT_PII
RDKIT_DEPICTOR_EXPORT double BOND_THRES
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 double COLLISION_THRES
std::map< int, Point2D > INT_POINT2D_MAP
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.
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 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,...
RDKIT_DEPICTOR_EXPORT RDGeom::Point2D reflectPoint(const RDGeom::Point2D &point, const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2)
RDKIT_DEPICTOR_EXPORT double BOND_LEN
Defines the editable molecule class RWMol.
RDKIT_DEPICTOR_EXPORT double ANGLE_OPEN
std::pair< int, int > PAIR_I_I
std::vector< INT_PAIR > INT_PAIR_VECT
RDKIT_DEPICTOR_EXPORT double HETEROATOM_COLL_SCALE
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
@ UNSPECIFIED
hybridization that hasn't been specified
std::pair< double, INT_PAIR > DOUBLE_INT_PAIR