OBFloatGrid Class Reference

Handle floating-point 3D grids (i.e., charge density around an OBMol). More...

#include <grid.h>

List of all members.

Public Member Functions

 OBFloatGrid ()
 ~OBFloatGrid ()
void Init (OBMol &box, double spacing, double pad=0.0)
bool PointIsInBox (double x, double y, double z)
 
Returns:
whether the supplied XYZ coordinates fall within the box

bool PointIsInBox (double *c)
 
Returns:
true if the point falls within the box

double GetXmin () const
double GetYmin () const
double GetZmin () const
double GetXmax () const
double GetYmax () const
double GetZmax () const
void GetMin (double *a)
void GetMax (double *a)
double GetSpacing () const
void GetSpacing (double &s)
double GetScale () const
double GetHalfSpace () const
int GetXdim () const
int GetYdim () const
int GetZdim () const
void GetDim (int *a)
vector3 GetMidpointVector ()
double * GetVals ()
void SetVals (double *ptr)
vector3 Center ()
double Inject (double x, double y, double z)
 
Returns:
the value at the given point (rounding as needed)

void IndexToCoords (int idx, double &x, double &y, double &z)
void CoordsToIndex (int *, double *)
int CoordsToIndex (double &x, double &y, double &z)
double Interpolate (double, double, double)
 
Returns:
the interpolated value for the given point

double InterpolateDerivatives (double, double, double, double *derivatives)
 
Returns:
the interpolated value for the given point and set the dx, dy, dz derivatives


Protected Attributes

double * _val
 doubleing point values
int * _ival
 for integer values (deprecated)
double _midz
double _midx
double _midy
 center of grid in world coordinates
int _ydim
int _xdim
int _zdim
 grid dimensions
double _spacing
double _inv_spa
 spacing between grid points and its invers
double _xmin
double _xmax
double _ymin
double _ymax
double _zmin
double _zmax
 the min/max values in XYZ axes (i.e., the box)
double _halfSpace
 half of the grid spacing */

Friends

std::ostream & operator<< (std::ostream &, const OBFloatGrid &)
std::istream & operator>> (std::istream &, OBFloatGrid &)


Detailed Description

Handle floating-point 3D grids (i.e., charge density around an OBMol).


Constructor & Destructor Documentation

OBFloatGrid (  )  [inline]

~OBFloatGrid (  )  [inline]


Member Function Documentation

void Init ( OBMol box,
double  spacing,
double  pad = 0.0 
)

Initialize the grid using this molecule as a box (plus a padding) with the supplied spacing between points

bool PointIsInBox ( double  x,
double  y,
double  z 
) [inline]

Returns:
whether the supplied XYZ coordinates fall within the box

bool PointIsInBox ( double *  c  )  [inline]

Returns:
true if the point falls within the box

double GetXmin (  )  const [inline]

double GetYmin (  )  const [inline]

double GetZmin (  )  const [inline]

double GetXmax (  )  const [inline]

double GetYmax (  )  const [inline]

double GetZmax (  )  const [inline]

void GetMin ( double *  a  )  [inline]

void GetMax ( double *  a  )  [inline]

double GetSpacing (  )  const [inline]

void GetSpacing ( double &  s  )  [inline]

double GetScale (  )  const [inline]

double GetHalfSpace (  )  const [inline]

int GetXdim (  )  const [inline]

int GetYdim (  )  const [inline]

int GetZdim (  )  const [inline]

void GetDim ( int *  a  )  [inline]

vector3 GetMidpointVector (  )  [inline]

double* GetVals (  )  [inline]

void SetVals ( double *  ptr  )  [inline]

vector3 Center (  )  [inline]

double Inject ( double  x,
double  y,
double  z 
)

Returns:
the value at the given point (rounding as needed)

void IndexToCoords ( int  idx,
double &  x,
double &  y,
double &  z 
)

void CoordsToIndex ( int *  ,
double *   
)

int CoordsToIndex ( double &  x,
double &  y,
double &  z 
)

double Interpolate ( double  ,
double  ,
double   
)

Returns:
the interpolated value for the given point

double InterpolateDerivatives ( double  ,
double  ,
double  ,
double *  derivatives 
)

Returns:
the interpolated value for the given point and set the dx, dy, dz derivatives


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const OBFloatGrid fg 
) [friend]

std::istream& operator>> ( std::istream &  is,
OBFloatGrid fg 
) [friend]


Member Data Documentation

double* _val [protected]

doubleing point values

int* _ival [protected]

for integer values (deprecated)

double _midz [protected]

double _midx [protected]

double _midy [protected]

center of grid in world coordinates

int _ydim [protected]

int _xdim [protected]

int _zdim [protected]

grid dimensions

double _spacing [protected]

double _inv_spa [protected]

spacing between grid points and its invers

double _xmin [protected]

double _xmax [protected]

double _ymin [protected]

double _ymax [protected]

double _zmin [protected]

double _zmax [protected]

the min/max values in XYZ axes (i.e., the box)

double _halfSpace [protected]

half of the grid spacing */


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