Loading...
Searching...
No Matches
RDGeom Namespace Reference

## Classes

class | GridException
class | Grid3D
| Virtual base class for a grid object. More...
class | Point
class | Point3D
class | Point2D
class | PointND
class | Transform2D
class | Transform3D
class | UniformGrid3D
class | UniformRealValueGrid3D

## Typedefs

typedef std::vector< RDGeom::Point * > | PointPtrVect
typedef PointPtrVect::iterator | PointPtrVect_I
typedef PointPtrVect::const_iterator | PointPtrVect_CI
typedef std::vector< RDGeom::Point3D * > | Point3DPtrVect
typedef std::vector< RDGeom::Point2D * > | Point2DPtrVect
typedef Point3DPtrVect::iterator | Point3DPtrVect_I
typedef Point3DPtrVect::const_iterator | Point3DPtrVect_CI
typedef Point2DPtrVect::iterator | Point2DPtrVect_I
typedef Point2DPtrVect::const_iterator | Point2DPtrVect_CI
typedef std::vector< const RDGeom::Point3D * > | Point3DConstPtrVect
typedef Point3DConstPtrVect::iterator | Point3DConstPtrVect_I
typedef Point3DConstPtrVect::const_iterator | Point3DConstPtrVect_CI
typedef std::vector< Point3D > | POINT3D_VECT
typedef std::vector< Point3D >::iterator | POINT3D_VECT_I
typedef std::vector< Point3D >::const_iterator | POINT3D_VECT_CI
typedef std::map< int, Point2D > | INT_POINT2D_MAP
typedef INT_POINT2D_MAP::iterator | INT_POINT2D_MAP_I
typedef INT_POINT2D_MAP::const_iterator | INT_POINT2D_MAP_CI

## Enumerations

enum | AxisType { X_Axis , Y_Axis , Z_Axis }

## Functions

template<class GRIDTYPE>
RDKIT_RDGEOMETRYLIB_EXPORT double | tverskyIndex (const GRIDTYPE &grid1, const GRIDTYPE &grid2, double alpha, double beta)
| calculate the tversky index between the shapes encoded on two grids
template<class GRIDTYPE>
RDKIT_RDGEOMETRYLIB_EXPORT double | tanimotoDistance (const GRIDTYPE &grid1, const GRIDTYPE &grid2)
| calculate the tanimoto distance between the shapes encoded on two grids
template<class GRIDTYPE>
RDKIT_RDGEOMETRYLIB_EXPORT double | protrudeDistance (const GRIDTYPE &grid1, const GRIDTYPE &grid2)
| calculate the protrude distance between the shapes encoded on two grids
RDKIT_RDGEOMETRYLIB_EXPORT Point3D | computeGridCentroid (const UniformGrid3D &grid, const Point3D &pt, double windowRadius, double &weightSum)
| calculate the grid centroid within a window of a point
RDKIT_RDGEOMETRYLIB_EXPORT std::vector< Point3D > | findGridTerminalPoints (const UniformGrid3D &grid, double windowRadius, double inclusionFraction)
RDKIT_RDGEOMETRYLIB_EXPORT double | computeDihedralAngle (const Point3D &pt1, const Point3D &pt2, const Point3D &pt3, const Point3D &pt4)
RDKIT_RDGEOMETRYLIB_EXPORT double | computeSignedDihedralAngle (const Point3D &pt1, const Point3D &pt2, const Point3D &pt3, const Point3D &pt4)
RDKIT_RDGEOMETRYLIB_EXPORT std::ostream & | operator<< (std::ostream &target, const RDGeom::Point &pt)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D | operator+ (const RDGeom::Point3D &p1, const RDGeom::Point3D &p2)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D | operator- (const RDGeom::Point3D &p1, const RDGeom::Point3D &p2)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D | operator* (const RDGeom::Point3D &p1, double v)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D | operator/ (const RDGeom::Point3D &p1, double v)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D | operator+ (const RDGeom::Point2D &p1, const RDGeom::Point2D &p2)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D | operator- (const RDGeom::Point2D &p1, const RDGeom::Point2D &p2)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D | operator* (const RDGeom::Point2D &p1, double v)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D | operator/ (const RDGeom::Point2D &p1, double v)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND | operator+ (const RDGeom::PointND &p1, const RDGeom::PointND &p2)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND | operator- (const RDGeom::PointND &p1, const RDGeom::PointND &p2)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND | operator* (const RDGeom::PointND &p1, double v)
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND | operator/ (const RDGeom::PointND &p1, double v)
RDKIT_RDGEOMETRYLIB_EXPORT void | writeGridToStream (const UniformGrid3D &grid, std::ostream &outStrm)
| writes the contents of the grid to a stream
RDKIT_RDGEOMETRYLIB_EXPORT void | writeGridToFile (const UniformGrid3D &grid, const std::string &filename)
| writes the contents of the grid to a named file
RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D | operator| (const UniformRealValueGrid3D &grd1, const UniformRealValueGrid3D &grd2)
RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D | operator& (const UniformRealValueGrid3D &grd1, const UniformRealValueGrid3D &grd2)
RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D | operator+ (const UniformRealValueGrid3D &grd1, const UniformRealValueGrid3D &grd2)
RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D | operator- (const UniformRealValueGrid3D &grd1, const UniformRealValueGrid3D &grd2)
double | compute13Dist (double d1, double d2, double angle)
| Compute the 13 distance between points give the 12 distances and the angle between the axes.
double | compute14Dist3D (double d1, double d2, double d3, double ang12, double ang23, double torAng)
| Compute the 14 distances give the 12 distance and the angles.
double | compute14DistCis (double d1, double d2, double d3, double ang12, double ang23)
| Compute the 14 distances give the 12 distance and bond angle for cis configuration.
double | compute14DistTrans (double d1, double d2, double d3, double ang12, double ang23)
| Compute the 14 distances give the 12 distance and bond angle for trans configuration.

## Variables

const unsigned int | DIM_2D = 3
const unsigned int | DIM_3D = 4

## Typedef Documentation

## INT_POINT2D_MAP

typedef std::map<int, Point2D> RDGeom::INT_POINT2D_MAP

Definition at line 556 of file point.h.

## INT_POINT2D_MAP_CI

typedef INT_POINT2D_MAP::const_iterator RDGeom::INT_POINT2D_MAP_CI

Definition at line 558 of file point.h.

## INT_POINT2D_MAP_I

typedef INT_POINT2D_MAP::iterator RDGeom::INT_POINT2D_MAP_I

Definition at line 557 of file point.h.

## Point2DPtrVect

typedef std::vector<RDGeom::Point2D *> RDGeom::Point2DPtrVect

Definition at line 542 of file point.h.

## Point2DPtrVect_CI

typedef Point2DPtrVect::const_iterator RDGeom::Point2DPtrVect_CI

Definition at line 546 of file point.h.

## Point2DPtrVect_I

typedef Point2DPtrVect::iterator RDGeom::Point2DPtrVect_I

Definition at line 545 of file point.h.

## POINT3D_VECT

typedef std::vector<Point3D> RDGeom::POINT3D_VECT

Definition at line 552 of file point.h.

## POINT3D_VECT_CI

typedef std::vector<Point3D>::const_iterator RDGeom::POINT3D_VECT_CI

Definition at line 554 of file point.h.

## POINT3D_VECT_I

typedef std::vector<Point3D>::iterator RDGeom::POINT3D_VECT_I

Definition at line 553 of file point.h.

## Point3DConstPtrVect

typedef std::vector<const RDGeom::Point3D *> RDGeom::Point3DConstPtrVect

Definition at line 548 of file point.h.

## Point3DConstPtrVect_CI

typedef Point3DConstPtrVect::const_iterator RDGeom::Point3DConstPtrVect_CI

Definition at line 550 of file point.h.

## Point3DConstPtrVect_I

typedef Point3DConstPtrVect::iterator RDGeom::Point3DConstPtrVect_I

Definition at line 549 of file point.h.

## Point3DPtrVect

typedef std::vector<RDGeom::Point3D *> RDGeom::Point3DPtrVect

Definition at line 541 of file point.h.

## Point3DPtrVect_CI

typedef Point3DPtrVect::const_iterator RDGeom::Point3DPtrVect_CI

Definition at line 544 of file point.h.

## Point3DPtrVect_I

typedef Point3DPtrVect::iterator RDGeom::Point3DPtrVect_I

Definition at line 543 of file point.h.

## PointPtrVect

typedef std::vector<RDGeom::Point *> RDGeom::PointPtrVect

Definition at line 537 of file point.h.

## PointPtrVect_CI

typedef PointPtrVect::const_iterator RDGeom::PointPtrVect_CI

Definition at line 539 of file point.h.

## PointPtrVect_I

typedef PointPtrVect::iterator RDGeom::PointPtrVect_I

Definition at line 538 of file point.h.

## Enumeration Type Documentation

## AxisType

enum RDGeom::AxisType

Enumerator
X_Axis |
Y_Axis |
Z_Axis |

Definition at line 16 of file Transform.h.

## Function Documentation

## compute13Dist()

double RDGeom::compute13Dist | ( | double | d1,
|  | double | d2,
|  | double | angle )

inline

Compute the 13 distance between points give the 12 distances and the angle between the axes.

Definition at line 24 of file Geometry/Utils.h.

## compute14Dist3D()

double RDGeom::compute14Dist3D | ( | double | d1,
|  | double | d2,
|  | double | d3,
|  | double | ang12,
|  | double | ang23,
|  | double | torAng )

inline

Compute the 14 distances give the 12 distance and the angles.

This is computed by aligning the d2 axis with the x-axis (with atom 2 at the origin. Atom 1 is made to lie int he xy-plane with a +ve y-coordinate and finally the coordinates for atom 4 are computed.

ARGUMENTS: d1 - distance between atoms 1 and 2 d2 - distance between atoms 2 and 3 d3 - distance between atoms 3 and 4 ang12 - angle between the axes d1 and d2 ang23 - angle between the axes d2 and d3 torAng - torsional agnle of the axis d2

NOTE: we are specifically calling this function compute14Dist3D because we assume the torsional angle can take any value including 0 and 180 deg. However, if using either 0 or 180 as the torsional angle (which is often the case) the user is recommended to use the specialized functions below instead of this function; they will be speedier.

Definition at line 50 of file Geometry/Utils.h.

References RDGeom::Point3D::length(), RDGeom::Transform3D::SetRotation(), RDGeom::Transform3D::TransformPoint(), and X_Axis.

## compute14DistCis()

double RDGeom::compute14DistCis | ( | double | d1,
|  | double | d2,
|  | double | d3,
|  | double | ang12,
|  | double | ang23 )

inline

Compute the 14 distances give the 12 distance and bond angle for cis configuration.

This is simply a special case of the above function compute14Dist3D; with torsion angle set to 0. However, this function should be speedier

Definition at line 74 of file Geometry/Utils.h.

## compute14DistTrans()

double RDGeom::compute14DistTrans | ( | double | d1,
|  | double | d2,
|  | double | d3,
|  | double | ang12,
|  | double | ang23 )

inline

Compute the 14 distances give the 12 distance and bond angle for trans configuration.

This is simply a special case of the above function compute14Dist3D; with torsion angle set to 180. However, this function should be speedier

Definition at line 88 of file Geometry/Utils.h.

## computeDihedralAngle()

RDKIT_RDGEOMETRYLIB_EXPORT double RDGeom::computeDihedralAngle | ( | const Point3D & | pt1,
|  | const Point3D & | pt2,
|  | const Point3D & | pt3,
|  | const Point3D & | pt4 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## computeGridCentroid()

RDKIT_RDGEOMETRYLIB_EXPORT Point3D RDGeom::computeGridCentroid | ( | const UniformGrid3D & | grid,
|  | const Point3D & | pt,
|  | double | windowRadius,
|  | double & | weightSum )

calculate the grid centroid within a window of a point

## computeSignedDihedralAngle()

RDKIT_RDGEOMETRYLIB_EXPORT double RDGeom::computeSignedDihedralAngle | ( | const Point3D & | pt1,
|  | const Point3D & | pt2,
|  | const Point3D & | pt3,
|  | const Point3D & | pt4 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## findGridTerminalPoints()

RDKIT_RDGEOMETRYLIB_EXPORT std::vector< Point3D > RDGeom::findGridTerminalPoints | ( | const UniformGrid3D & | grid,
|  | double | windowRadius,
|  | double | inclusionFraction )

find terminal points of a shape encoded on a grid this is part of the subshape implementation

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator&()

RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D RDGeom::operator& | ( | const UniformRealValueGrid3D & | grd1,
|  | const UniformRealValueGrid3D & | grd2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator*() [1/3]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D RDGeom::operator* | ( | const RDGeom::Point2D & | p1,
|  | double | v )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator*() [2/3]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D RDGeom::operator* | ( | const RDGeom::Point3D & | p1,
|  | double | v )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator*() [3/3]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND RDGeom::operator* | ( | const RDGeom::PointND & | p1,
|  | double | v )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator+() [1/4]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D RDGeom::operator+ | ( | const RDGeom::Point2D & | p1,
|  | const RDGeom::Point2D & | p2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator+() [2/4]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D RDGeom::operator+ | ( | const RDGeom::Point3D & | p1,
|  | const RDGeom::Point3D & | p2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator+() [3/4]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND RDGeom::operator+ | ( | const RDGeom::PointND & | p1,
|  | const RDGeom::PointND & | p2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator+() [4/4]

RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D RDGeom::operator+ | ( | const UniformRealValueGrid3D & | grd1,
|  | const UniformRealValueGrid3D & | grd2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator-() [1/4]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D RDGeom::operator- | ( | const RDGeom::Point2D & | p1,
|  | const RDGeom::Point2D & | p2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator-() [2/4]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D RDGeom::operator- | ( | const RDGeom::Point3D & | p1,
|  | const RDGeom::Point3D & | p2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator-() [3/4]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND RDGeom::operator- | ( | const RDGeom::PointND & | p1,
|  | const RDGeom::PointND & | p2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator-() [4/4]

RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D RDGeom::operator- | ( | const UniformRealValueGrid3D & | grd1,
|  | const UniformRealValueGrid3D & | grd2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator/() [1/3]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D RDGeom::operator/ | ( | const RDGeom::Point2D & | p1,
|  | double | v )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator/() [2/3]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D RDGeom::operator/ | ( | const RDGeom::Point3D & | p1,
|  | double | v )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator/() [3/3]

RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND RDGeom::operator/ | ( | const RDGeom::PointND & | p1,
|  | double | v )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator<<()

RDKIT_RDGEOMETRYLIB_EXPORT std::ostream & RDGeom::operator<< | ( | std::ostream & | target,
|  | const RDGeom::Point & | pt )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## operator|()

RDKIT_RDGEOMETRYLIB_EXPORT UniformRealValueGrid3D RDGeom::operator| | ( | const UniformRealValueGrid3D & | grd1,
|  | const UniformRealValueGrid3D & | grd2 )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## protrudeDistance()

template<class GRIDTYPE>

RDKIT_RDGEOMETRYLIB_EXPORT double RDGeom::protrudeDistance | ( | const GRIDTYPE & | grid1,
|  | const GRIDTYPE & | grid2 )

calculate the protrude distance between the shapes encoded on two grids

protrude(S1,S2) = ( | S1|S2 | - | S1&S2 | ) / | S1 |

References RDKIT_RDGEOMETRYLIB_EXPORT.

## tanimotoDistance()

template<class GRIDTYPE>

RDKIT_RDGEOMETRYLIB_EXPORT double RDGeom::tanimotoDistance | ( | const GRIDTYPE & | grid1,
|  | const GRIDTYPE & | grid2 )

calculate the tanimoto distance between the shapes encoded on two grids

tanimoto(S1,S2) = 1 - ( | S1&S2 | / | S1|S2 | )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## tverskyIndex()

template<class GRIDTYPE>

RDKIT_RDGEOMETRYLIB_EXPORT double RDGeom::tverskyIndex | ( | const GRIDTYPE & | grid1,
|  | const GRIDTYPE & | grid2,
|  | double | alpha,
|  | double | beta )

calculate the tversky index between the shapes encoded on two grids

tversky(S1,S2) = | S1&S2 | / ( alpha * ( | S1 | - | S1&S2 | ) + beta * ( | S2 | - | S1&S2 | ) + | S1&S2 | )

References RDKIT_RDGEOMETRYLIB_EXPORT.

## writeGridToFile()

RDKIT_RDGEOMETRYLIB_EXPORT void RDGeom::writeGridToFile | ( | const UniformGrid3D & | grid,
|  | const std::string & | filename )

writes the contents of the grid to a named file

References RDKIT_RDGEOMETRYLIB_EXPORT.

## writeGridToStream()

RDKIT_RDGEOMETRYLIB_EXPORT void RDGeom::writeGridToStream | ( | const UniformGrid3D & | grid,
|  | std::ostream & | outStrm )

writes the contents of the grid to a stream

References RDKIT_RDGEOMETRYLIB_EXPORT.

## Variable Documentation

## DIM_2D

const unsigned int RDGeom::DIM_2D = 3

Definition at line 19 of file Transform2D.h.

Referenced by RDGeom::Transform2D::Transform2D().

## DIM_3D

const unsigned int RDGeom::DIM_3D = 4

Definition at line 20 of file Transform3D.h.

Referenced by RDGeom::Transform3D::Transform3D().