Loading...
Searching...
No Matches
griddata.h
Go to the documentation of this file.
/**********************************************************************
griddata.h - Store grids of data linked to a molecule (e.g. Gaussian cube)
// Molekel - Molecular Visualization Program
// Copyright (C) 2006, 2007 Swiss National Supercomputing Centre (CSCS)
Some Portions Copyright (C) 2008 by Marcus D. Hanwell
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_GRIDDATA_H
#define OB_GRIDDATA_H
#include <openbabel/babelconfig.h>
#include <openbabel/math/vector3.h>
#include <openbabel/generic.h>
#include <vector>
namespace OpenBabel {
// Uses private data pointer for ABI compatibility
// http://techbase.kde.org/Policies/Library_Code_Policy#D-Pointers
class GridDataPrivate;
// Class to store values for generic (non axis aligned) grids like Gaussian cube files
// Class introduction in griddata.cpp
class OBAPI OBGridData : public OBGenericData
{
public:
OBGridData();
~OBGridData();
typedef enum { BOHR, ANGSTROM, OTHER } Unit;
void GetAxes(double x[3], double y[3], double z[3]) const;
vector3 GetXAxis() const;
vector3 GetYAxis() const;
vector3 GetZAxis() const;
void GetAxes(vector3 &v1, vector3 &v2, vector3 &v3) const;
void GetNumberOfPoints(int &nx, int &ny, int &nz) const;
int GetNumberOfPoints() const;
void GetNumberOfSteps(int steps[3]) const;
std::vector< double > GetValues() const;
double GetValue(int i, int j, int k) const;
double GetValue (vector3 pos) const;
Unit GetUnit() const;
double GetMinValue() const;
double GetMaxValue() const;
vector3 GetOriginVector() const;
void GetOriginVector(double o[3]) const;
vector3 GetMaxVector() const;
bool GetUnrestricted() const;
int GetNumSymmetries() const;
void SetNumberOfPoints(int nx, int ny, int nz);
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]);
bool SetValue(int i, int j, int k, double val);
void SetValues(const std::vector< double >& v);
void SetUnit(Unit u);
void SetUnrestricted(bool u);
void SetNumSymmetries(int s);
private:
GridDataPrivate *const d;
};
} // end namespace
#endif /*OBGRIDDATA_H_*/
OpenBabel::OBGenericData::OBGenericData
OBGenericData(const std::string attr="undefined", const unsigned int type=OBGenericDataType::UndefinedData, const DataOrigin source=any)
Definition generic.cpp:166
OpenBabel::OBGridData::OBGridData
OBGridData()
Constructor.
Definition griddata.cpp:99
OpenBabel::OBGridData::BOHR
@ BOHR
Definition griddata.h:49
OpenBabel::OBGridData::ANGSTROM
@ ANGSTROM
Definition griddata.h:49
OpenBabel::OBGridData::OTHER
@ OTHER
Definition griddata.h:49
OpenBabel::vector3
Represents a vector in 3-dimensional real space.
Definition vector3.h:45
generic.h
Handle generic data classes. Custom data for atoms, bonds, etc.
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
vector3.h
Handle 3D coordinates.