RDKit: RDGeom::UniformRealValueGrid3D Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Member Functions | List of all members
RDGeom::UniformRealValueGrid3D Class Reference

`#include <UniformRealValueGrid3D.h>`

Inheritance diagram for RDGeom::UniformRealValueGrid3D:

## Public Member Functions
| UniformRealValueGrid3D ()
| UniformRealValueGrid3D (double dimX, double dimY, double dimZ, double spacing=0.5, const RDGeom::Point3D *offset=nullptr, const RDKit::RealValueVect *data=nullptr)
| ctor
| UniformRealValueGrid3D (const UniformRealValueGrid3D &other)
UniformRealValueGrid3D & | operator= (const UniformRealValueGrid3D &other)
| UniformRealValueGrid3D (const std::string &pkl)
| construct from a string pickle
| UniformRealValueGrid3D (const char *pkl, unsigned int)
| construct from a text pickle
int | getGridPointIndex (const RDGeom::Point3D &point) const override
| Get the index of the grid point closest to point.
double | getVal (const RDGeom::Point3D &point) const override
| Get the value at the grid point closest to the specified point.
double | getVal (unsigned int pointId) const override
| Get the value at a specified grid point.
void | setVal (const RDGeom::Point3D &point, double val) override
| Set the value at the grid point closest to the specified point.
RDGeom::Point3D | getGridPointLoc (unsigned int pointId) const override
| get the location of the specified grid point
void | setVal (unsigned int pointId, double val) override
| Set the value at the specified grid point.
unsigned int | getSize () const override
| get the size of the grid (number of grid points)
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
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
unsigned int | getNumX () const
| get the number of grid points along x-axis
unsigned int | getNumY () const
| get the number of grid points along y-axis
unsigned int | getNumZ () const
| get the number of grid points along z-axis
const RDGeom::Point3D & | getOffset () const
| get the grid's offset
double | getSpacing () const
| get the grid's spacing
const RDKit::RealValueVect * | getOccupancyVect () const override
| return a const pointer to our occupancy vector
const std::vector< double > & | getData () const
| brief returns raw vector
std::vector< double > & | getData ()
bool | compareParams (const UniformRealValueGrid3D &other) const
| returns true if the grid `other` has parameters compatible with ours.
bool | compareVectors (const UniformRealValueGrid3D &other) const
| returns true if the grid `other` has the same values as ours.
bool | compareGrids (const UniformRealValueGrid3D &other) const
| returns true if the grid `other` has the same parameters and values as ours.
UniformRealValueGrid3D & | operator|= (const UniformRealValueGrid3D &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.
UniformRealValueGrid3D & | operator&= (const UniformRealValueGrid3D &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.
UniformRealValueGrid3D & | operator+= (const UniformRealValueGrid3D &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.
UniformRealValueGrid3D & | operator-= (const UniformRealValueGrid3D &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.
std::string | toString () const
| create and return a pickle
Public Member Functions inherited from RDGeom::Grid3D< RDKit::RealValueVect, double, double >
virtual | ~Grid3D ()

## Detailed Description

Definition at line 20 of file UniformRealValueGrid3D.h.

## Constructor & Destructor Documentation

## ◆ UniformRealValueGrid3D() [1/5]

RDGeom::UniformRealValueGrid3D::UniformRealValueGrid3D | ( |  | ) |
| inline

Definition at line 23 of file UniformRealValueGrid3D.h.

Referenced by compareGrids(), compareParams(), compareVectors(), operator&=(), operator+=(), operator-=(), operator=(), operator|=(), and UniformRealValueGrid3D().

## ◆ UniformRealValueGrid3D() [2/5]

RDGeom::UniformRealValueGrid3D::UniformRealValueGrid3D | ( | double | dimX,
|  | double | dimY,
|  | double | dimZ,
|  | double | spacing = 0.5,
|  | const RDGeom::Point3D * | offset = nullptr,
|  | const RDKit::RealValueVect * | data = nullptr )
| inline

ctor

Definition at line 38 of file UniformRealValueGrid3D.h.

## ◆ UniformRealValueGrid3D() [3/5]

RDGeom::UniformRealValueGrid3D::UniformRealValueGrid3D | ( | const UniformRealValueGrid3D & | other | ) |

References UniformRealValueGrid3D().

## ◆ UniformRealValueGrid3D() [4/5]

RDGeom::UniformRealValueGrid3D::UniformRealValueGrid3D | ( | const std::string & | pkl | ) |

construct from a string pickle

## ◆ UniformRealValueGrid3D() [5/5]

RDGeom::UniformRealValueGrid3D::UniformRealValueGrid3D | ( | const char * | pkl,
|  | unsigned int | )

construct from a text pickle

## Member Function Documentation

## ◆ compareGrids()

bool RDGeom::UniformRealValueGrid3D::compareGrids | ( | const UniformRealValueGrid3D & | other | ) | const

returns true if the grid `other` has the same parameters and values as ours.

References UniformRealValueGrid3D().

## ◆ compareParams()

bool RDGeom::UniformRealValueGrid3D::compareParams | ( | const UniformRealValueGrid3D & | other | ) | const

returns true if the grid `other` has parameters compatible with ours.

References UniformRealValueGrid3D().

## ◆ compareVectors()

bool RDGeom::UniformRealValueGrid3D::compareVectors | ( | const UniformRealValueGrid3D & | other | ) | const

returns true if the grid `other` has the same values as ours.

References UniformRealValueGrid3D().

## ◆ getData() [1/2]

std::vector< double > & RDGeom::UniformRealValueGrid3D::getData | ( |  | ) |
| inline

Definition at line 118 of file UniformRealValueGrid3D.h.

## ◆ getData() [2/2]

const std::vector< double > & RDGeom::UniformRealValueGrid3D::getData | ( |  | ) | const
| inline

brief returns raw vector

Definition at line 117 of file UniformRealValueGrid3D.h.

Referenced by RDMIF::calculateDescriptors().

## ◆ getGridIndex()

int RDGeom::UniformRealValueGrid3D::getGridIndex | ( | unsigned int | xi,
|  | unsigned int | yi,
|  | unsigned int | zi ) const

get the index of the grid point given the x, y, z indices

Returns
  the integer value, -1 if the indices are outside the grid

## ◆ getGridIndices()

void RDGeom::UniformRealValueGrid3D::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

## ◆ getGridPointIndex()

int RDGeom::UniformRealValueGrid3D::getGridPointIndex | ( | const RDGeom::Point3D & | point | ) | const
| overridevirtual

Get the index of the grid point closest to point.

Returns
  the integer index, -1 if the specified point is outside the grid

Implements RDGeom::Grid3D< RDKit::RealValueVect, double, double >.

## ◆ getGridPointLoc()

RDGeom::Point3D RDGeom::UniformRealValueGrid3D::getGridPointLoc | ( | unsigned int | pointId | ) | const
| overridevirtual

get the location of the specified grid point

Implements RDGeom::Grid3D< RDKit::RealValueVect, double, double >.

## ◆ getNumX()

unsigned int RDGeom::UniformRealValueGrid3D::getNumX | ( |  | ) | const
| inline

get the number of grid points along x-axis

Definition at line 97 of file UniformRealValueGrid3D.h.

Referenced by RDMIF::calculateDescriptors().

## ◆ getNumY()

unsigned int RDGeom::UniformRealValueGrid3D::getNumY | ( |  | ) | const
| inline

get the number of grid points along y-axis

Definition at line 100 of file UniformRealValueGrid3D.h.

Referenced by RDMIF::calculateDescriptors().

## ◆ getNumZ()

unsigned int RDGeom::UniformRealValueGrid3D::getNumZ | ( |  | ) | const
| inline

get the number of grid points along z-axis

Definition at line 103 of file UniformRealValueGrid3D.h.

Referenced by RDMIF::calculateDescriptors().

## ◆ getOccupancyVect()

const RDKit::RealValueVect * RDGeom::UniformRealValueGrid3D::getOccupancyVect | ( |  | ) | const
| inlineoverridevirtual

return a const pointer to our occupancy vector

Implements RDGeom::Grid3D< RDKit::RealValueVect, double, double >.

Definition at line 112 of file UniformRealValueGrid3D.h.

## ◆ getOffset()

const RDGeom::Point3D & RDGeom::UniformRealValueGrid3D::getOffset | ( |  | ) | const
| inline

get the grid's offset

Definition at line 106 of file UniformRealValueGrid3D.h.

Referenced by RDMIF::calculateDescriptors().

## ◆ getSize()

unsigned int RDGeom::UniformRealValueGrid3D::getSize | ( |  | ) | const
| inlineoverridevirtual

get the size of the grid (number of grid points)

Implements RDGeom::Grid3D< RDKit::RealValueVect, double, double >.

Definition at line 84 of file UniformRealValueGrid3D.h.

Referenced by RDMIF::calculateDescriptors().

## ◆ getSpacing()

double RDGeom::UniformRealValueGrid3D::getSpacing | ( |  | ) | const
| inline

get the grid's spacing

Definition at line 109 of file UniformRealValueGrid3D.h.

Referenced by RDMIF::calculateDescriptors().

## ◆ getVal() [1/2]

double RDGeom::UniformRealValueGrid3D::getVal | ( | const RDGeom::Point3D & | point | ) | const
| overridevirtual

Get the value at the grid point closest to the specified point.

Returns
  the double value, -1 if the specified index is outside the grid

Implements RDGeom::Grid3D< RDKit::RealValueVect, double, double >.

## ◆ getVal() [2/2]

double RDGeom::UniformRealValueGrid3D::getVal | ( | unsigned int | pointId | ) | const
| overridevirtual

Get the value at a specified grid point.

Returns
  the double value

Implements RDGeom::Grid3D< RDKit::RealValueVect, double, double >.

## ◆ operator&=()

UniformRealValueGrid3D & RDGeom::UniformRealValueGrid3D::operator&= | ( | const UniformRealValueGrid3D & | 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.

References UniformRealValueGrid3D().

## ◆ operator+=()

UniformRealValueGrid3D & RDGeom::UniformRealValueGrid3D::operator+= | ( | const UniformRealValueGrid3D & | 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.

References UniformRealValueGrid3D().

## ◆ operator-=()

UniformRealValueGrid3D & RDGeom::UniformRealValueGrid3D::operator-= | ( | const UniformRealValueGrid3D & | 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.

References UniformRealValueGrid3D().

## ◆ operator=()

UniformRealValueGrid3D & RDGeom::UniformRealValueGrid3D::operator= | ( | const UniformRealValueGrid3D & | other | ) |

References UniformRealValueGrid3D().

## ◆ operator|=()

UniformRealValueGrid3D & RDGeom::UniformRealValueGrid3D::operator|= | ( | const UniformRealValueGrid3D & | 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.

References UniformRealValueGrid3D().

## ◆ setVal() [1/2]

void RDGeom::UniformRealValueGrid3D::setVal | ( | const RDGeom::Point3D & | point,
|  | double | val )
| overridevirtual

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< RDKit::RealValueVect, double, double >.

## ◆ setVal() [2/2]

void RDGeom::UniformRealValueGrid3D::setVal | ( | unsigned int | pointId,
|  | double | val )
| overridevirtual

Set the value at the specified grid point.

Implements RDGeom::Grid3D< RDKit::RealValueVect, double, double >.

## ◆ toString()

std::string RDGeom::UniformRealValueGrid3D::toString | ( |  | ) | const

create and return a pickle

The documentation for this class was generated from the following file:

- UniformRealValueGrid3D.h