00001 /********************************************************************** 00002 griddata.h - Store grids of data linked to a molecule (e.g. Gaussian cube) 00003 00004 // Molekel - Molecular Visualization Program 00005 // Copyright (C) 2006, 2007 Swiss National Supercomputing Centre (CSCS) 00006 00007 Some Portions Copyright (C) 2008 by Marcus D. Hanwell 00008 00009 This file is part of the Open Babel project. 00010 For more information, see <http://openbabel.sourceforge.net/> 00011 00012 This program is free software; you can redistribute it and/or modify 00013 it under the terms of the GNU General Public License as published by 00014 the Free Software Foundation version 2 of the License. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 ***********************************************************************/ 00021 00022 #ifndef OB_GRIDDATA_H 00023 #define OB_GRIDDATA_H 00024 00025 #include <openbabel/babelconfig.h> 00026 #include <openbabel/base.h> 00027 #include <openbabel/math/vector3.h> 00028 00029 #include <vector> 00030 00031 namespace OpenBabel { 00032 00033 // Uses private data pointer for ABI compatibility 00034 // http://techbase.kde.org/Policies/Library_Code_Policy#D-Pointers 00035 class GridDataPrivate; 00036 00037 // Class to store values for generic (non axis aligned) grids like Gaussian cube files 00038 // Class introduction in griddata.cpp 00039 class OBAPI OBGridData : public OBGenericData 00040 { 00041 public: 00043 OBGridData(); 00044 00046 ~OBGridData(); 00047 00049 typedef enum { BOHR, ANGSTROM, OTHER } Unit; 00050 00052 00053 00054 00055 00056 void GetAxes(double x[3], double y[3], double z[3]) const; 00058 vector3 GetXAxis() const; 00060 vector3 GetYAxis() const; 00062 vector3 GetZAxis() const; 00064 void GetAxes(vector3 &v1, vector3 &v2, vector3 &v3) const; 00066 void GetNumberOfPoints(int &nx, int &ny, int &nz) const; 00068 int GetNumberOfPoints() const; 00070 void GetNumberOfSteps(int steps[3]) const; 00072 std::vector< double > GetValues() const; 00074 double GetValue(int i, int j, int k) const; 00076 double GetValue (vector3 pos) const; 00078 Unit GetUnit() const; 00080 double GetMinValue() const; 00082 double GetMaxValue() const; 00084 vector3 GetOriginVector() const; 00088 void GetOriginVector(double o[3]) const; 00090 vector3 GetMaxVector() const; 00092 bool GetUnrestricted() const; 00094 int GetNumSymmetries() const; 00096 00097 00099 00100 00101 void SetNumberOfPoints(int nx, int ny, int nz); 00106 void SetLimits(const vector3 &origin, const vector3 &x, const vector3 &y, 00107 const vector3 &z); 00110 void SetLimits(const double origin[3], const double x[3], const double y[3], 00111 const double z[3]); 00113 bool SetValue(int i, int j, int k, double val); 00115 void SetValues(const std::vector< double >& v); 00117 void SetUnit(Unit u); 00119 void SetUnrestricted(bool u); 00121 void SetNumSymmetries(int s); 00123 00124 private: 00125 GridDataPrivate *const d; 00126 00127 }; 00128 00129 } // end namespace 00130 00131 #endif /*OBGRIDDATA_H_*/ 00132
This file is part of the documentation for Open Babel, version 2.2.0.