#include <openbabel/grid.h>
Inheritance diagram for OBFloatGrid:
Public Member Functions | |
OBFloatGrid () | |
~OBFloatGrid () | |
void | Init (OBMol &box, double spacing, double pad=0.0) |
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) |
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) |
double | InterpolateDerivatives (double, double, double, double *derivatives) |
virtual void | Init (OBMol &box) |
double | GetXmin () const |
double | GetYmin () const |
double | GetZmin () const |
double | GetXmax () const |
double | GetYmax () const |
double | GetZmax () const |
bool | PointIsInBox (double x, double y, double z) |
bool | PointIsInBox (double *c) |
virtual bool | Clear () |
virtual OBBase * | DoTransformations (const std::map< std::string, std::string > *) |
template<class T> | |
T * | CastAndClear (bool clear=true) |
Generic data handling methods (via OBGenericData) | |
bool | HasData (const std::string &) |
bool | HasData (const char *) |
bool | HasData (const unsigned int type) |
void | DeleteData (unsigned int type) |
void | DeleteData (OBGenericData *) |
void | DeleteData (std::vector< OBGenericData * > &) |
void | SetData (OBGenericData *d) |
unsigned int | DataSize () const |
OBGenericData * | GetData (const unsigned int type) |
OBGenericData * | GetData (const std::string &) |
OBGenericData * | GetData (const char *) |
std::vector< OBGenericData * > & | GetData () |
std::vector< OBGenericData * > | GetData (DataOrigin source) |
OBDataIterator | BeginData () |
OBDataIterator | EndData () |
Static Public Member Functions | |
static const char * | ClassDescription () |
Protected Attributes | |
double * | _val |
int * | _ival |
double | _midz |
double | _midx |
double | _midy |
int | _ydim |
int | _xdim |
int | _zdim |
double | _spacing |
double | _inv_spa |
double | _halfSpace |
double | _xmin |
double | _xmax |
double | _ymin |
double | _ymax |
double | _zmin |
double | _zmax |
std::vector< OBGenericData * > | _vdata |
Friends | |
std::ostream & | operator<< (std::ostream &, const OBFloatGrid &) |
std::istream & | operator>> (std::istream &, OBFloatGrid &) |
Supports input/output and base functionality for simple 3D discrete grids of some function -- typically around a molecule
OBFloatGrid | ( | ) | [inline] |
~OBFloatGrid | ( | ) | [inline] |
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
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 | |||
) |
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 | ||||
) |
double InterpolateDerivatives | ( | double | , | |
double | , | |||
double | , | |||
double * | derivatives | |||
) |
void Init | ( | OBMol & | box | ) | [virtual, inherited] |
Initialize the grid based on a box around the molecule box
Subclasses should overload this method -- this only tracks the dimension of the box itself.
double GetXmin | ( | ) | const [inline, inherited] |
double GetYmin | ( | ) | const [inline, inherited] |
double GetZmin | ( | ) | const [inline, inherited] |
double GetXmax | ( | ) | const [inline, inherited] |
double GetYmax | ( | ) | const [inline, inherited] |
double GetZmax | ( | ) | const [inline, inherited] |
bool PointIsInBox | ( | double | x, | |
double | y, | |||
double | z | |||
) | [inline, inherited] |
bool PointIsInBox | ( | double * | c | ) | [inline, inherited] |
bool Clear | ( | void | ) | [virtual, inherited] |
Clear any and all data associated with this object.
This method can be called by OBConversion::Read() before reading data. Derived classes should be sure to call OBBase::Clear() to remove inherited generic data.
virtual OBBase* DoTransformations | ( | const std::map< std::string, std::string > * | ) | [inline, virtual, inherited] |
Perform a set of transformations specified by the user
Typically these are program options to filter or modify an object For example, see OBMol::DoTransformations() and OBMol::ClassDescription()
Reimplemented in OBMol.
static const char* ClassDescription | ( | ) | [inline, static, inherited] |
Reimplemented in OBMol.
T* CastAndClear | ( | bool | clear = true |
) | [inline, inherited] |
By default clears the object. Called from ReadMolecule of most format classes.
bool HasData | ( | const std::string & | ) | [inherited] |
bool HasData | ( | const char * | ) | [inherited] |
bool HasData | ( | const unsigned int | type | ) | [inherited] |
void DeleteData | ( | unsigned int | type | ) | [inherited] |
Delete any data matching the given OBGenericDataType.
void DeleteData | ( | OBGenericData * | ) | [inherited] |
Delete the given generic data from this object.
void DeleteData | ( | std::vector< OBGenericData * > & | ) | [inherited] |
Delete all of the given generic data from this object.
void SetData | ( | OBGenericData * | d | ) | [inline, inherited] |
Adds a data object; does nothing if d==NULL.
unsigned int DataSize | ( | ) | const [inline, inherited] |
OBGenericData * GetData | ( | const unsigned int | type | ) | [inherited] |
OBGenericData * GetData | ( | const std::string & | ) | [inherited] |
OBGenericData * GetData | ( | const char * | ) | [inherited] |
std::vector<OBGenericData*>& GetData | ( | ) | [inline, inherited] |
std::vector< OBGenericData * > GetData | ( | DataOrigin | source | ) | [inherited] |
OBDataIterator BeginData | ( | ) | [inline, inherited] |
OBDataIterator EndData | ( | ) | [inline, inherited] |
std::ostream& operator<< | ( | std::ostream & | os, | |
const OBFloatGrid & | fg | |||
) | [friend] |
std::istream& operator>> | ( | std::istream & | is, | |
OBFloatGrid & | fg | |||
) | [friend] |
double* _val [protected] |
floating 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 inverse
double _halfSpace [protected] |
half of the grid spacing */
double _xmin [protected, inherited] |
double _xmax [protected, inherited] |
double _ymin [protected, inherited] |
double _ymax [protected, inherited] |
double _zmin [protected, inherited] |
double _zmax [protected, inherited] |
the min/max values in XYZ axes (i.e., the box)
std::vector<OBGenericData*> _vdata [protected, inherited] |
Custom data.