rdkit.Geometry.rdGeometry module¶
Module containing geometry objects like points, grids, etc.
- class rdkit.Geometry.rdGeometry.Point2D(self)¶
- class rdkit.Geometry.rdGeometry.Point2D(self, x: float, y: float)
- class rdkit.Geometry.rdGeometry.Point2D(self, arg: rdkit.Geometry.rdGeometry.Point3D, /)
Bases:
object- AngleTo(self, arg: rdkit.Geometry.rdGeometry.Point2D, /) float¶
determines the angle between a vector to this point (between 0 and PI)
- DirectionVector(self, arg: rdkit.Geometry.rdGeometry.Point2D, /) rdkit.Geometry.rdGeometry.Point2D¶
return a normalized direction vector from this point to another
- DotProduct(self, arg: rdkit.Geometry.rdGeometry.Point2D, /) float¶
Dot product with another point
- Length(self) float¶
Length of the vector
- LengthSq(self) float¶
Square of the length
- SignedAngleTo(self, arg: rdkit.Geometry.rdGeometry.Point2D, /) float¶
determines the signed angle between a vector to this point (between 0 and 2*PI)
- property x¶
(self) -> float
- property y¶
(self) -> float
- class rdkit.Geometry.rdGeometry.Point3D(self)¶
- class rdkit.Geometry.rdGeometry.Point3D(self, x: float, y: float, z: float)
- class rdkit.Geometry.rdGeometry.Point3D(self, arg: rdkit.Geometry.rdGeometry.Point3D)
Bases:
object- AngleTo(self, arg: rdkit.Geometry.rdGeometry.Point3D, /) float¶
determines the angle between a vector to this point (between 0 and PI)
- CrossProduct(self, arg: rdkit.Geometry.rdGeometry.Point3D, /) rdkit.Geometry.rdGeometry.Point3D¶
Get the cross product between two points
- DirectionVector(self, arg: rdkit.Geometry.rdGeometry.Point3D, /) rdkit.Geometry.rdGeometry.Point3D¶
return a normalized direction vector from this point to another
- Distance(self, pt2: rdkit.Geometry.rdGeometry.Point3D) float¶
Distance from this point to another point
- DotProduct(self, arg: rdkit.Geometry.rdGeometry.Point3D, /) float¶
Dot product with another point
- Length(self) float¶
Length of the vector
- LengthSq(self) float¶
Square of the length
- SignedAngleTo(self, arg: rdkit.Geometry.rdGeometry.Point3D, /) float¶
determines the signed angle between a vector to this point (between 0 and 2*PI)
- property x¶
(self) -> float
- property y¶
(self) -> float
- property z¶
(self) -> float
- class rdkit.Geometry.rdGeometry.PointND(self, dim: int)¶
Bases:
object- AngleTo(self, arg: rdkit.Geometry.rdGeometry.PointND, /) float¶
determines the angle between a vector to this point (between 0 and PI)
- DirectionVector(self, arg: rdkit.Geometry.rdGeometry.PointND, /) rdkit.Geometry.rdGeometry.PointND¶
return a normalized direction vector from this point to another
- DotProduct(self, arg: rdkit.Geometry.rdGeometry.PointND, /) float¶
Dot product with another point
- Length(self) float¶
Length of the vector
- LengthSq(self) float¶
Square of the length
- class rdkit.Geometry.rdGeometry.UniformGrid3D(self, dimX: float, dimY: float, dimZ: float, spacing: float = 0.5, valType: rdkit.DataStructs.cDataStructs.DiscreteValueType = DiscreteValueType.TWOBITVALUE, offSet: rdkit.Geometry.rdGeometry.Point3D | None = None)¶
- class rdkit.Geometry.rdGeometry.UniformGrid3D(self, pkl: str)
- class rdkit.Geometry.rdGeometry.UniformGrid3D(self, arg: bytes, /)
Bases:
objectClass to represent a uniform three-dimensional cubic grid. Each grid point can store a positive integer value. For the sake of efficiency these value can either be binary or fit in 2, 4, 8 or 16 bits
Overloaded function.
__init__(self, dimX: float, dimY: float, dimZ: float, spacing: float = 0.5, valType: rdkit.DataStructs.cDataStructs.DiscreteValueType = DiscreteValueType.TWOBITVALUE, offSet: rdkit.Geometry.rdGeometry.Point3D | None = None) -> None
Constructor for a UniformGrid3D object
__init__(self, pkl: str) -> None
pickle constructor
__init__(self, arg: bytes, /) -> None
- CompareParams(self, other: rdkit.Geometry.rdGeometry.UniformGrid3D) bool¶
Compare the parameters between two grid object
- GetGridIndex(self, xi: int, yi: int, zi: int) int¶
Get the index to the grid point with the three integer indices provided
- GetGridIndices(self, idx: int) tuple[int, int, int]¶
Returns the integer indices of the grid index provided.
- GetGridPointIndex(self, point: rdkit.Geometry.rdGeometry.Point3D) int¶
Get the index to the grid point closest to the specified point
- GetGridPointLoc(self, pointId: int) rdkit.Geometry.rdGeometry.Point3D¶
Get the location of the specified grid point
- GetNumX(self) int¶
Get the number of grid points along x-axis
- GetNumY(self) int¶
Get the number of grid points along y-axis
- GetNumZ(self) int¶
Get the number of grid points along z-axis
- GetOccupancyVect(self) rdkit.DataStructs.cDataStructs.DiscreteValueVect¶
Get the occupancy vector for the grid
- GetOffset(self) rdkit.Geometry.rdGeometry.Point3D¶
Get the location of the center of the grid
- GetSize(self) int¶
Get the size of the grid (number of grid points)
- GetSpacing(self) float¶
Get the grid spacing
- GetVal(self, id: int) int¶
Get the value at the specified grid index
- GetValPoint(self, pt: rdkit.Geometry.rdGeometry.Point3D) int¶
Get the value at the closest grid point
- SetSphereOccupancy(self, center: rdkit.Geometry.rdGeometry.Point3D, radius: float, stepSize: float, maxLayers: int = -1, ignoreOutOfBound: bool = True) None¶
- Set the occupancy on the grid for a sphere or specified radius
and multiple layers around this sphere, with decreasing values of
occupancy
- SetValPoint(self, pt: rdkit.Geometry.rdGeometry.Point3D, val: int) None¶
Set the value at grid point closest to the specified point
- class rdkit.Geometry.rdGeometry.UniformRealValueGrid3D(self)¶
- class rdkit.Geometry.rdGeometry.UniformRealValueGrid3D(self, arg: rdkit.Geometry.rdGeometry.UniformRealValueGrid3D)
- class rdkit.Geometry.rdGeometry.UniformRealValueGrid3D(self, dimX: float, dimY: float, dimZ: float, spacing: float = 0.5, offSet: rdkit.Geometry.rdGeometry.Point3D | None = None)
- class rdkit.Geometry.rdGeometry.UniformRealValueGrid3D(self, arg: bytes, /)
Bases:
objectClass to represent a uniform three-dimensional cubic grid. Each grid point can store a floating point value.
Overloaded function.
__init__(self) -> None
Default constructor
__init__(self, arg: rdkit.Geometry.rdGeometry.UniformRealValueGrid3D) -> None
Copy constructor
__init__(self, dimX: float, dimY: float, dimZ: float, spacing: float = 0.5, offSet: rdkit.Geometry.rdGeometry.Point3D | None = None) -> None
Constructor
__init__(self, arg: bytes, /) -> None
- CompareGrids(self, arg: rdkit.Geometry.rdGeometry.UniformRealValueGrid3D, /) bool¶
Compare the parameters and values between two grid objects.
- CompareParams(self, arg: rdkit.Geometry.rdGeometry.UniformRealValueGrid3D, /) bool¶
Compare the parameters between two grid object.
- CompareVectors(self, arg: rdkit.Geometry.rdGeometry.UniformRealValueGrid3D, /) bool¶
Compare the vector values between two grid objects.
- GetGridIndex(self, arg0: int, arg1: int, arg2: int, /) int¶
Get the index to the grid point with the three integer indices provided
- GetGridIndices(self, idx: int) tuple[int, int, int]¶
Returns the integer indices of the grid index provided.
- GetGridPointIndex(self, arg: rdkit.Geometry.rdGeometry.Point3D, /) int¶
Get the index to the grid point closest to the specified point
- GetGridPointLoc(self, pointId: int) rdkit.Geometry.rdGeometry.Point3D¶
Get the location of the specified grid point
- GetNumX(self) int¶
Get the number of grid points along x-axis
- GetNumY(self) int¶
Get the number of grid points along y-axis
- GetNumZ(self) int¶
Get the number of grid points along z-axis
- GetOccupancyVect(self) rdkit.DataStructs.cDataStructs.RealValueVect¶
Get the occupancy vector for the grid
- GetOffset(self) rdkit.Geometry.rdGeometry.Point3D¶
Get the location of the center of the grid
- GetSize(self) int¶
Get the size of the grid (number of grid points)
- GetSpacing(self) float¶
Get the grid spacing
- GetVal(self, id: int) float¶
Get the value at the specified grid index
- GetValPoint(self, pt: rdkit.Geometry.rdGeometry.Point3D) float¶
Get the value at the closest grid point
- SetValPoint(self, pt: rdkit.Geometry.rdGeometry.Point3D, val: float) None¶
Set the value at grid point closest to the specified point