Open Babel
3.0
|
#include <openbabel/grid.h>
Public Member Functions | |
OBFloatGrid () | |
~OBFloatGrid () | |
void | Init (OBMol &box, double spacing, double pad=0.0) |
vector3 | GetMin () |
void | GetMin (double *a) |
vector3 | GetMax () |
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 () |
vector3 | GetXAxis () const |
vector3 | GetYAxis () const |
vector3 | GetZAxis () const |
void | SetNumberOfPoints (int nx, int ny, int nz) |
void | SetXAxis (vector3) |
void | SetYAxis (vector3) |
void | SetZAxis (vector3) |
void | SetLimits (const vector3 &origin, const vector3 &x, const vector3 &y, const vector3 &z) |
void | SetLimits (const double origin[3], const double x[3], const double y[3], const double z[3]) |
std::vector< double > | GetDataVector () |
void | SetVals (const std::vector< double > &vals) |
double * | GetVals () |
double | GetValue (int i, int j, int k) |
void | SetVals (double *ptr) |
bool | SetValue (int i, int j, int k, double val) |
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) |
bool | PointIsInBox (vector3 v) |
virtual bool | Clear () |
virtual OBBase * | DoTransformations (const std::map< std::string, std::string > *, OBConversion *) |
template<class T > | |
T * | CastAndClear (bool clear=true) |
virtual const char * | GetTitle (bool replaceNewlines=true) const |
virtual void | SetTitle (const char *) |
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 *> &) |
bool | DeleteData (const std::string &s) |
void | SetData (OBGenericData *d) |
void | CloneData (OBGenericData *d) |
size_t | 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) |
std::vector< OBGenericData * > | GetAllData (const unsigned int type) |
OBDataIterator | BeginData () |
OBDataIterator | EndData () |
Static Public Member Functions | |
static const char * | ClassDescription () |
Protected Attributes | |
std::vector< double > | _values |
int * | _ival |
double | _midz |
double | _midx |
double | _midy |
int | _ydim |
int | _xdim |
int | _zdim |
double | _spacing |
double | _inv_spa |
double | _halfSpace |
vector3 | _xAxis |
vector3 | _yAxis |
vector3 | _zAxis |
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 &) |
Handle double precision floating point 3D grids (e.g., charge density around an OBMol)
Supports input/output and base functionality for simple 3D discrete grids of some function – typically around a molecule. Typically you will want to use OBGridData which uses OBFloatGrid to store its data.
|
inline |
|
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.
Referenced by OBForceField::GetGrid().
|
inline |
Referenced by OBForceField::GetGrid().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by OBForceField::GetGrid().
|
inline |
Referenced by OBForceField::GetGrid().
|
inline |
Referenced by OBForceField::GetGrid().
|
inline |
Get the x, y and z dimensions (must pass an double[3] at least).
|
inline |
|
inline |
|
inline |
|
inline |
void SetNumberOfPoints | ( | int | nx, |
int | ny, | ||
int | nz | ||
) |
Sets the number of points in the x, y and z directions.
void SetXAxis | ( | vector3 | v | ) |
Set the direction of the x axis.
void SetYAxis | ( | vector3 | v | ) |
Set the direction of the y axis.
void SetZAxis | ( | vector3 | v | ) |
Set the direction of the z axis.
Set the limits (i.e., the origin point and the axes) NOTE: You must set the number of points first, with SetNumberOfPoints so the grid spacing can be calculated
void SetLimits | ( | const double | origin[3], |
const double | x[3], | ||
const double | y[3], | ||
const double | z[3] | ||
) |
std::vector< double > GetDataVector | ( | ) |
Get a copy of the vector that stores the points in the grid.
void SetVals | ( | const std::vector< double > & | vals | ) |
Set the values in the grid to those in the vector passed. Note that the vector must be of the same dimensions as the grid based on the values given in SetNumberOfPoints(int nx, int ny, int nz).
|
inline |
|
inline |
|
inline |
|
inline |
Set the value at the grid point specified by i, j and k to val.
|
inline |
double Inject | ( | double | x, |
double | y, | ||
double | z | ||
) |
void IndexToCoords | ( | int | idx, |
double & | x, | ||
double & | y, | ||
double & | z | ||
) |
void CoordsToIndex | ( | int * | idx, |
double * | c | ||
) |
int CoordsToIndex | ( | double | x, |
double | y, | ||
double | z | ||
) |
double Interpolate | ( | double | x, |
double | y, | ||
double | z | ||
) |
double InterpolateDerivatives | ( | double | x, |
double | y, | ||
double | z, | ||
double * | derivatives | ||
) |
|
virtualinherited |
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.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
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.
Reimplemented in OBMol, OBAtom, OBReaction, and OBResidue.
Referenced by OBResidue::Clear().
|
inlinevirtualinherited |
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() Base type does nothing
Reimplemented in OBMol.
|
inlinestaticinherited |
|
inlineinherited |
By default clears the object. Called from ReadMolecule of most format classes.
|
inlinevirtualinherited |
Base type does nothing Made virtual around r3535 to simplify code which passes around OBBase*.
Reimplemented in OBMol.
Referenced by OBMoleculeFormat::DoOutputOptions().
|
inlinevirtualinherited |
Reimplemented in OBMol.
Referenced by OBMoleculeFormat::DoOutputOptions().
|
inherited |
Referenced by OBDepict::AddAtomLabels(), OBDepict::DrawMolecule(), AliasData::Expand(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBForceField::GetPartialCharges(), OBDescriptor::MatchPairData(), OBMoleculeFormat::ReadChemObjectImpl(), and OBMol::SetEnergies().
|
inherited |
|
inherited |
|
inherited |
Delete any data matching the given OBGenericDataType.
Referenced by OpenBabel::CanonicalLabels(), OBDescriptor::DeleteProperties(), OpenBabel::DeleteStereoOnAtom(), and OBMol::RenumberAtoms().
|
inherited |
Delete the given generic data from this object.
|
inherited |
Delete all of the given generic data from this object.
|
inherited |
Deletes the generic data with the specified attribute, returning false if not found.
|
inlineinherited |
Adds a data object; does nothing if d==NULL.
Referenced by OBGastChrg::AssignPartialCharges(), OBMol::CopySubstructure(), AliasData::Expand(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBForceField::GetPartialCharges(), OBMoleculeFormat::MakeCombinedMolecule(), OBDescriptor::PredictAndSave(), AliasData::RevertToAliasForm(), and OBMol::SetEnergies().
|
inherited |
Adds a copy of a data object; does nothing if d == NULL
Referenced by AliasData::Expand().
|
inlineinherited |
|
inherited |
Referenced by OBDepict::AddAtomLabels(), OBDepict::DrawMolecule(), OpenBabel::extract_thermochemistry(), OBDescriptor::FilterCompare(), OpenBabel::GetAtomSymClass(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBForceField::GetPartialCharges(), OBDescriptor::GetValues(), OpenBabel::IsSuppressibleHydrogen(), OBMoleculeFormat::MakeCombinedMolecule(), OBMolAngleIter::OBMolAngleIter(), OBMolRingIter::OBMolRingIter(), OBMolTorsionIter::OBMolTorsionIter(), and OBDescriptor::PredictAndSave().
|
inherited |
|
inherited |
|
inlineinherited |
Referenced by OBMol::GetEnergies(), OBMol::GetEnergy(), and OBMol::SetEnergies().
|
inherited |
|
inherited |
Referenced by OpenBabel::CanonicalLabels(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoAtoms(), OBBuilder::CorrectStereoBonds(), OpenBabel::DeleteStereoOnAtom(), and OBMol::operator+=().
|
inlineinherited |
Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().
|
inlineinherited |
Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().
|
friend |
|
friend |
|
protected |
floating point values
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
for integer values (deprecated)
|
protected |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
center of grid in world coordinates
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
grid dimensions
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
spacing between grid points and its inverse
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protected |
half of the grid spacing
Referenced by OpenBabel::operator>>().
|
protected |
Three axes (i.e., translation vectors like a unit cell)
|
protected |
|
protected |
|
protectedinherited |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protectedinherited |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protectedinherited |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protectedinherited |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protectedinherited |
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protectedinherited |
the min/max axes in XYZ axes (i.e., the box)
Referenced by OpenBabel::operator<<(), and OpenBabel::operator>>().
|
protectedinherited |
Custom data.
Referenced by OBMol::OBMol().