![]() |
RDKit
Open-source cheminformatics and machine learning.
|
#include <UniformGrid3D.h>
Public Member Functions | |
UniformGrid3D (double dimX, double dimY, double dimZ, double spacing=0.5, RDKit::DiscreteValueVect::DiscreteValueType valType=RDKit::DiscreteValueVect::TWOBITVALUE, const RDGeom::Point3D *offset=0) | |
ctor More... | |
UniformGrid3D (const UniformGrid3D &other) | |
copy ctor More... | |
UniformGrid3D (const std::string &pkl) | |
construct from a string pickle More... | |
UniformGrid3D (const char *pkl, unsigned int) | |
construct from a text pickle More... | |
UniformGrid3D & | operator= (const UniformGrid3D &other) |
~UniformGrid3D () | |
int | getGridPointIndex (const Point3D &point) const |
Get the index of the grid point closest to point. More... | |
int | getVal (const Point3D &point) const |
Get the value at the grid point closest to the specified point. More... | |
unsigned int | getVal (unsigned int pointId) const |
Get the value at a specified grid point. More... | |
void | setVal (const Point3D &point, unsigned int val) |
Set the value at the grid point closest to the specified point. More... | |
Point3D | getGridPointLoc (unsigned int pointId) const |
get the location of the specified grid point More... | |
void | setVal (unsigned int pointId, unsigned int val) |
Set the value at the specified grid point. More... | |
unsigned int | getSize () const |
get the size of the grid (number of grid points) More... | |
void | setSphereOccupancy (const Point3D ¢er, double radius, double stepSize, int maxNumLayers=-1, bool ignoreOutOfBound=true) |
set the occupancy for a multi-layered sphere More... | |
int | getGridIndex (unsigned int xi, unsigned int yi, unsigned int zi) const |
get the index of the grid point given the x, y, z indices More... | |
void | getGridIndices (unsigned int idx, unsigned int &xi, unsigned int &yi, unsigned int &zi) const |
get the x, y, and z indices of a grid-point index More... | |
unsigned int | getNumX () const |
get the number of grid points along x-axis More... | |
unsigned int | getNumY () const |
get the number of grid points along y-axis More... | |
unsigned int | getNumZ () const |
get the number of grid points along z-axis More... | |
const Point3D & | getOffset () const |
get the grid's offset More... | |
double | getSpacing () const |
get the grid's spacing More... | |
const RDKit::DiscreteValueVect * | getOccupancyVect () const |
return a const pointer to our occupancy vector More... | |
virtual bool | compareParams (const UniformGrid3D &other) const |
returns true if the grid other has parameters compatible with ours. More... | |
UniformGrid3D & | operator|= (const UniformGrid3D &other) |
calculates the union between the data on this grid and that on other . This grid is modified. NOTE that the grids must have the same parameters. More... | |
UniformGrid3D & | operator&= (const UniformGrid3D &other) |
calculates the intersection between the data on this grid and that on other . This grid is modified. NOTE that the grids must have the same parameters. More... | |
UniformGrid3D & | operator+= (const UniformGrid3D &other) |
calculates the sum of the data on this grid and that on other . This grid is modified. NOTE that the grids must have the same parameters. More... | |
UniformGrid3D & | operator-= (const UniformGrid3D &other) |
calculates the difference between the data on this grid and that on other . This grid is modified. NOTE that the grids must have the same parameters. More... | |
std::string | toString () const |
create and return a pickle More... | |
UniformGrid3D | operator& (const UniformGrid3D &other) const |
![]() | |
virtual | ~Grid3D () |
Definition at line 20 of file UniformGrid3D.h.
|
inline |
ctor
Definition at line 38 of file UniformGrid3D.h.
RDGeom::UniformGrid3D::UniformGrid3D | ( | const UniformGrid3D & | other | ) |
copy ctor
RDGeom::UniformGrid3D::UniformGrid3D | ( | const std::string & | pkl | ) |
construct from a string pickle
RDGeom::UniformGrid3D::UniformGrid3D | ( | const char * | pkl, |
unsigned int | |||
) |
construct from a text pickle
RDGeom::UniformGrid3D::~UniformGrid3D | ( | ) |
|
virtual |
returns true if the grid other
has parameters compatible with ours.
int RDGeom::UniformGrid3D::getGridIndex | ( | unsigned int | xi, |
unsigned int | yi, | ||
unsigned int | zi | ||
) | const |
get the index of the grid point given the x, y, z indices
void RDGeom::UniformGrid3D::getGridIndices | ( | unsigned int | idx, |
unsigned int & | xi, | ||
unsigned int & | yi, | ||
unsigned int & | zi | ||
) | const |
get the x, y, and z indices of a grid-point index
|
virtual |
Get the index of the grid point closest to point.
Implements RDGeom::Grid3D.
|
virtual |
get the location of the specified grid point
Implements RDGeom::Grid3D.
|
inline |
get the number of grid points along x-axis
Definition at line 118 of file UniformGrid3D.h.
|
inline |
get the number of grid points along y-axis
Definition at line 121 of file UniformGrid3D.h.
|
inline |
get the number of grid points along z-axis
Definition at line 124 of file UniformGrid3D.h.
|
inlinevirtual |
return a const pointer to our occupancy vector
Implements RDGeom::Grid3D.
Definition at line 133 of file UniformGrid3D.h.
|
inline |
get the grid's offset
Definition at line 127 of file UniformGrid3D.h.
|
inlinevirtual |
get the size of the grid (number of grid points)
Implements RDGeom::Grid3D.
Definition at line 86 of file UniformGrid3D.h.
|
inline |
get the grid's spacing
Definition at line 130 of file UniformGrid3D.h.
|
virtual |
Get the value at the grid point closest to the specified point.
Implements RDGeom::Grid3D.
|
virtual |
Get the value at a specified grid point.
Implements RDGeom::Grid3D.
|
inline |
Definition at line 164 of file UniformGrid3D.h.
References PRECONDITION.
UniformGrid3D& RDGeom::UniformGrid3D::operator&= | ( | const UniformGrid3D & | other | ) |
calculates the intersection between the data on this grid and that on other
. This grid is modified. NOTE that the grids must have the same parameters.
UniformGrid3D& RDGeom::UniformGrid3D::operator+= | ( | const UniformGrid3D & | other | ) |
calculates the sum of the data on this grid and that on other
. This grid is modified. NOTE that the grids must have the same parameters.
UniformGrid3D& RDGeom::UniformGrid3D::operator-= | ( | const UniformGrid3D & | other | ) |
calculates the difference between the data on this grid and that on other
. This grid is modified. NOTE that the grids must have the same parameters.
UniformGrid3D& RDGeom::UniformGrid3D::operator= | ( | const UniformGrid3D & | other | ) |
UniformGrid3D& RDGeom::UniformGrid3D::operator|= | ( | const UniformGrid3D & | other | ) |
calculates the union between the data on this grid and that on other
. This grid is modified. NOTE that the grids must have the same parameters.
void RDGeom::UniformGrid3D::setSphereOccupancy | ( | const Point3D & | center, |
double | radius, | ||
double | stepSize, | ||
int | maxNumLayers = -1 , |
||
bool | ignoreOutOfBound = true |
||
) |
set the occupancy for a multi-layered sphere
This function encodes the occupancy for a sphere and multiple layers around it
center | location of the sphere center |
radius | Radius of the base sphere |
stepSize | thickness of each layer on top of the base sphere |
maxNumLayers | maximum number of layers, if -1 this is determined by the number of bits used per grid points in the storage |
ignoreOutOfBound | if true, ignore if center is outside the grid, otherwise throw an exception |
|
virtual |
Set the value at the grid point closest to the specified point.
doesn't do anything if the point is outside the grid
Implements RDGeom::Grid3D.
|
virtual |
Set the value at the specified grid point.
Implements RDGeom::Grid3D.
std::string RDGeom::UniformGrid3D::toString | ( | ) | const |
create and return a pickle