Loading...
Searching...
No Matches
generic.h
Go to the documentation of this file.
/**********************************************************************
generic.h - Handle generic data classes. Custom data for atoms, bonds, etc.
Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
Some portions Copyright (C) 2001-2010 by Geoffrey R. Hutchison
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_GENERIC_H
#define OB_GENERIC_H
#include <openbabel/babelconfig.h>
#include <string>
#include <vector>
#include <map>
#include <openbabel/math/spacegroup.h>
#include <openbabel/obutil.h>
#include <openbabel/base.h>
namespace OpenBabel
{
// Forward declarations
class OBBase;
class OBAtom;
class OBBond;
class OBMol;
class OBRing;
class OBAPI OBCommentData : public OBGenericData
{
protected:
std::string _data;
public:
OBCommentData();
OBCommentData(const OBCommentData&);
virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBCommentData(*this);}
OBCommentData& operator=(const OBCommentData &src);
void SetData(const std::string &data)
{ _data = data; Trim(_data); }
void SetData(const char *d)
{_data = d; Trim(_data); }
const std::string &GetData() const
{ return(_data); }
virtual const std::string &GetValue() const
{ return(_data); }
};
class OBAPI OBExternalBond
{
int _idx;
OBAtom *_atom;
OBBond *_bond;
public:
OBExternalBond(): _idx(0), _atom(nullptr), _bond(nullptr) {}
OBExternalBond(OBAtom *,OBBond *,int);
OBExternalBond(const OBExternalBond &);
~OBExternalBond() {}
int GetIdx() const { return(_idx); }
OBAtom *GetAtom() const { return(_atom); }
OBBond *GetBond() const { return(_bond); }
void SetIdx(int idx) { _idx = idx; }
void SetAtom(OBAtom *atom) { _atom = atom; }
void SetBond(OBBond *bond) { _bond = bond; }
};
class OBAPI OBExternalBondData : public OBGenericData
{
protected:
std::vector<OBExternalBond> _vexbnd;
public:
OBExternalBondData();
//Copying is not used and too much work to set up
virtual OBGenericData* Clone(OBBase* /*parent*/) const{return nullptr;}
void SetData(OBAtom*,OBBond*,int);
std::vector<OBExternalBond> *GetData()
{
return(&_vexbnd);
}
};
class OBAPI OBPairData : public OBGenericData
{
protected:
std::string _value;
public:
OBPairData();
virtual OBGenericData* Clone(OBBase* /*parent*/) const
{return new OBPairData(*this);}
void SetValue(const char *v) { _value = v; }
void SetValue(const std::string &v) { _value = v; }
virtual const std::string &GetValue() const
{ return(_value); }
};
// More detailed description in generic.cpp
template <class ValueT>
class OBPairTemplate : public OBGenericData // Note: no OBAPI should be used
{
protected:
ValueT _value;
public:
OBPairTemplate():
OBGenericData("PairData", OBGenericDataType::PairData) {};
virtual OBGenericData* Clone(OBBase* /*parent*/) const
{return new OBPairTemplate<ValueT>(*this);}
void SetValue(const ValueT t) { _value = t; }
virtual const ValueT &GetGenericValue() const { return(_value); }
};
typedef OBPairTemplate<int> OBPairInteger;
typedef OBPairTemplate<double> OBPairFloatingPoint;
typedef OBPairTemplate<bool> OBPairBool;
class OBAPI OBSetData : public OBGenericData
{
protected:
std::vector<OBGenericData *> _vdata;
public:
OBSetData() : OBGenericData("SetData", OBGenericDataType::SetData) {}
virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBSetData(*this);}
void AddData(OBGenericData *d)
{
if(d)
{
_vdata.push_back(d);
}
}
void SetData(std::vector<OBGenericData *> &vdata)
{
_vdata = vdata;
}
OBGenericData *GetData(const char *s)
{
std::vector<OBGenericData*>::iterator i;
for (i = _vdata.begin();i != _vdata.end();++i)
if ((*i)->GetAttribute() == s)
return(*i);
return(nullptr);
}
OBGenericData *GetData(const std::string &s)
{
std::vector<OBGenericData*>::iterator i;
for (i = _vdata.begin();i != _vdata.end();++i)
if ((*i)->GetAttribute() == s)
return(*i);
return(nullptr);
}
virtual const std::vector<OBGenericData *> &GetData() const //now virtual and const
{
return(_vdata);
}
std::vector<OBGenericData*>::iterator GetBegin()
{
return _vdata.begin();
}
std::vector<OBGenericData*>::iterator GetEnd()
{
return _vdata.end();
}
void DeleteData(OBGenericData *gd)
{
std::vector<OBGenericData*>::iterator i;
for (i = _vdata.begin();i != _vdata.end();++i)
if (*i == gd)
{
delete *i;
_vdata.erase(i);
break; // Done, don't do anything more, since iterator is invalid
}
}
}; // OBSetData
class OBAPI OBVirtualBond : public OBGenericData
{
protected:
unsigned int _bgn;
unsigned int _end;
unsigned int _ord;
int _stereo;
public:
OBVirtualBond();
virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBVirtualBond(*this);}
OBVirtualBond(unsigned int, unsigned int, unsigned int,int stereo=0);
unsigned int GetBgn() { return(_bgn); }
unsigned int GetEnd() { return(_end); }
unsigned int GetOrder() { return(_ord); }
int GetStereo() { return(_stereo); }
};
class OBAPI OBRingData : public OBGenericData
{
protected:
std::vector<OBRing*> _vr;
public:
OBRingData();
OBRingData(const OBRingData &);
// When copying a molecule, don't copy the RingData. Why not? Well,
// if you do, you'll end up with two RingDatas because one will already
// exist due to Kekulize() in EndModify() in operator= in OBMol. Having
// more than one RingData causes problems as one of them can become invalid
// and cause segfaults.
virtual OBGenericData* Clone(OBBase* /*parent*/) const{return nullptr;}
~OBRingData();
OBRingData &operator=(const OBRingData &);
void SetData(std::vector<OBRing*> &vr)
{
_vr = vr;
}
void PushBack(OBRing *r)
{
_vr.push_back(r);
}
std::vector<OBRing*> &GetData()
{
return(_vr);
}
std::vector<OBRing*>::iterator BeginRings()
{ return(_vr.begin()); }
std::vector<OBRing*>::iterator EndRings()
{ return(_vr.end()); }
OBRing *BeginRing(std::vector<OBRing*>::iterator &i);
OBRing *NextRing(std::vector<OBRing*>::iterator &i);
};
class OBAPI OBUnitCell: public OBGenericData
{
public:
enum LatticeType { Undefined,
Triclinic,
Monoclinic,
Orthorhombic,
Tetragonal,
Rhombohedral ,
Hexagonal,
Cubic};
protected:
matrix3x3 _mOrtho;// Orthogonal matrix of column vectors
matrix3x3 _mOrient;// Orientation matrix
vector3 _offset;
std::string _spaceGroupName;
const SpaceGroup* _spaceGroup;
LatticeType _lattice;
public:
OBUnitCell();
OBUnitCell(const OBUnitCell &);
virtual OBGenericData* Clone(OBBase* /*parent*/) const
{return new OBUnitCell(*this);}
~OBUnitCell() {}
OBUnitCell &operator=(const OBUnitCell &);
void SetData(const double a, const double b, const double c,
const double alpha, const double beta, const double gamma);
void SetData(const vector3 v1, const vector3 v2, const vector3 v3);
void SetData(const matrix3x3 m);
void SetOffset(const vector3 v1);
void SetSpaceGroup(const SpaceGroup* sg) { _spaceGroup = sg; }
void SetSpaceGroup(const std::string sg) { _spaceGroup = SpaceGroup::GetSpaceGroup (sg);
_spaceGroupName = sg; }
void SetSpaceGroup(const int sg) { _spaceGroup = SpaceGroup::GetSpaceGroup (sg); }
void SetLatticeType(const LatticeType lt) { _lattice = lt; }
void FillUnitCell(OBMol *);
double GetA();
double GetA() const;
double GetB();
double GetB() const;
double GetC();
double GetC() const;
double GetAlpha();
double GetAlpha() const;
double GetBeta();
double GetBeta() const;
double GetGamma();
double GetGamma() const;
vector3 GetOffset();
vector3 GetOffset() const;
const SpaceGroup* GetSpaceGroup() { return(_spaceGroup); }
const SpaceGroup* GetSpaceGroup() const { return(_spaceGroup); }
const std::string GetSpaceGroupName() { return(_spaceGroupName); }
const std::string GetSpaceGroupName() const { return(_spaceGroupName); }
LatticeType GetLatticeType( int spacegroup );
LatticeType GetLatticeType( int spacegroup ) const;
LatticeType GetLatticeType();
LatticeType GetLatticeType() const;
std::vector<vector3> GetCellVectors();
std::vector<vector3> GetCellVectors() const;
matrix3x3 GetCellMatrix();
matrix3x3 GetCellMatrix() const;
matrix3x3 GetOrthoMatrix();
matrix3x3 GetOrthoMatrix() const;
matrix3x3 GetOrientationMatrix();
matrix3x3 GetOrientationMatrix() const;
matrix3x3 GetFractionalMatrix();
matrix3x3 GetFractionalMatrix() const;
vector3 FractionalToCartesian(vector3 frac);
vector3 FractionalToCartesian(vector3 frac) const;
vector3 CartesianToFractional(vector3 cart);
vector3 CartesianToFractional(vector3 cart) const;
vector3 WrapCartesianCoordinate(vector3 cart);
vector3 WrapCartesianCoordinate(vector3 cart) const;
vector3 WrapFractionalCoordinate(vector3 frac);
vector3 WrapFractionalCoordinate(vector3 frac) const;
vector3 UnwrapCartesianNear(vector3 new_loc, vector3 ref_loc);
vector3 UnwrapCartesianNear(vector3 new_loc, vector3 ref_loc) const;
vector3 UnwrapFractionalNear(vector3 new_loc, vector3 ref_loc);
vector3 UnwrapFractionalNear(vector3 new_loc, vector3 ref_loc) const;
vector3 MinimumImageCartesian(vector3 cart);
vector3 MinimumImageCartesian(vector3 cart) const;
vector3 MinimumImageFractional(vector3 frac);
vector3 MinimumImageFractional(vector3 frac) const;
int GetSpaceGroupNumber( std::string name = "" );
int GetSpaceGroupNumber( std::string name = "" ) const;
double GetCellVolume();
double GetCellVolume() const;
};
class OBAPI OBConformerData: public OBGenericData
{
protected:
std::vector<unsigned short> _vDimension;
std::vector<double> _vEnergies;
std::vector< std::vector< vector3 > > _vForces;
std::vector< std::vector< vector3 > > _vVelocity;
std::vector< std::vector< vector3 > > _vDisplace;
std::vector<std::string> _vData;
public:
OBConformerData();
OBConformerData(const OBConformerData &);
virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBConformerData(*this);}
~OBConformerData() {}
OBConformerData &operator=(const OBConformerData &);
void SetDimension(std::vector<unsigned short> vd) { _vDimension = vd; }
void SetEnergies(std::vector<double> ve) { _vEnergies = ve; }
void SetForces(std::vector< std::vector< vector3 > > vf) {_vForces = vf;}
void SetVelocities(std::vector< std::vector< vector3 > > vv)
{ _vVelocity = vv; }
void SetDisplacements(std::vector< std::vector< vector3 > > vd)
{ _vDisplace = vd; }
void SetData(std::vector<std::string> vdat) { _vData = vdat; }
std::vector<unsigned short> GetDimension() { return _vDimension; }
std::vector<double> GetEnergies() { return _vEnergies; }
std::vector< std::vector< vector3 > > GetForces() {return _vForces; }
std::vector< std::vector< vector3 > > GetVelocities()
{return _vVelocity;}
std::vector< std::vector< vector3 > > GetDisplacements()
{return _vDisplace;}
std::vector<std::string> GetData() { return _vData; }
};
class OBAPI OBSymmetryData: public OBGenericData
{
protected:
std::string _spaceGroup;
std::string _pointGroup;
public:
OBSymmetryData();
OBSymmetryData(const OBSymmetryData &);
virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBSymmetryData(*this);}
~OBSymmetryData() {}
OBSymmetryData &operator=(const OBSymmetryData &);
void SetData(std::string pg, std::string sg = "")
{ _pointGroup = pg; _spaceGroup = sg; }
void SetPointGroup(std::string pg) { _pointGroup = pg; }
void SetSpaceGroup(std::string sg) { _spaceGroup = sg; }
std::string GetPointGroup() { return _pointGroup; }
std::string GetSpaceGroup() { return _spaceGroup; }
};
class OBAPI OBTorsion
{
friend class OBMol;
friend class OBTorsionData;
protected:
std::pair<OBAtom*,OBAtom*> _bc;
std::vector<triple<OBAtom*,OBAtom*,double> > _ads;
OBTorsion(): _bc((OBAtom *)nullptr, (OBAtom *)nullptr) { }
//protected for use only by friend classes
OBTorsion(OBAtom *, OBAtom *, OBAtom *, OBAtom *);
std::vector<quad<OBAtom*,OBAtom*,OBAtom*,OBAtom*> > GetTorsions();
public:
OBTorsion(const OBTorsion &);
~OBTorsion() {}
OBTorsion& operator=(const OBTorsion &);
void Clear();
bool Empty() { return(_bc.first == 0 && _bc.second == 0); }
bool AddTorsion(OBAtom *a,OBAtom *b, OBAtom *c,OBAtom *d);
bool AddTorsion(quad<OBAtom*,OBAtom*,OBAtom*,OBAtom*> &atoms);
bool SetAngle(double radians, unsigned int index = 0);
bool SetData(OBBond * /*bond*/) { return false; }
bool GetAngle(double &radians, unsigned int index =0);
unsigned int GetBondIdx();
size_t GetSize() const { return _ads.size(); }
std::pair<OBAtom*,OBAtom*> GetBC()
{
return(_bc);
}
std::vector<triple<OBAtom*,OBAtom*,double> > GetADs()
{
return(_ads) ;
}
bool IsProtonRotor();
};
class OBAPI OBTorsionData : public OBGenericData
{
friend class OBMol;
protected:
std::vector<OBTorsion> _torsions;
OBTorsionData();
OBTorsionData(const OBTorsionData &);
public:
OBTorsionData &operator=(const OBTorsionData &);
virtual OBGenericData* Clone(OBBase* /*parent*/) const
{return new OBTorsionData(*this);}
void Clear();
std::vector<OBTorsion> GetData() const
{
return _torsions;
}
size_t GetSize() const
{
return _torsions.size();
}
void SetData(OBTorsion &torsion);
bool FillTorsionArray(std::vector<std::vector<unsigned int> > &torsions);
};
class OBAPI OBAngle
{
friend class OBMol;
friend class OBAngleData;
protected:
//member data
OBAtom *_vertex;
std::pair<OBAtom*,OBAtom*> _termini;
double _radians;
//protected member functions
OBAngle(); //protect constructor for use only by friend classes
OBAngle(OBAtom *vertex,OBAtom *a,OBAtom *b);
triple<OBAtom*,OBAtom*,OBAtom*> GetAtoms();
void SortByIndex();
public:
OBAngle(const OBAngle &);
~OBAngle()
{
_vertex = nullptr;
}
OBAngle &operator = (const OBAngle &);
bool operator ==(const OBAngle &);
void Clear();
double GetAngle() const
{
return(_radians);
}
void SetAngle(double angle)
{
_radians = angle;
}
void SetAtoms(OBAtom *vertex,OBAtom *a,OBAtom *b);
void SetAtoms(triple<OBAtom*,OBAtom*,OBAtom*> &atoms);
};
class OBAPI OBAngleData : public OBGenericData
{
friend class OBMol;
protected:
std::vector<OBAngle> _angles;
OBAngleData();
OBAngleData(const OBAngleData &);
std::vector<OBAngle> GetData() const
{
return(_angles);
}
public:
OBAngleData &operator =(const OBAngleData &);
virtual OBGenericData* Clone(OBBase* /*parent*/) const
{return new OBAngleData(*this);}
void Clear();
unsigned int FillAngleArray(int **angles, unsigned int &size);
bool FillAngleArray(std::vector<std::vector<unsigned int> > &angles);
void SetData(OBAngle &);
size_t GetSize() const
{
return _angles.size();
}
};
class OBSerialNums : public OBGenericData
{
protected:
std::map<int, OBAtom*> _serialMap;
public:
OBSerialNums() :
OBGenericData("obSerialNums", OBGenericDataType::SerialNums)
{}
OBSerialNums(const OBSerialNums &cp) : OBGenericData(cp)
{
_serialMap = cp._serialMap;
}
virtual OBGenericData* Clone(OBBase* /*parent*/) const
{return new OBSerialNums(*this);}
std::map<int,OBAtom*> &GetData() { return _serialMap; }
void SetData(std::map<int,OBAtom*> &sm) { _serialMap = sm; }
};
class OBAPI OBVibrationData: public OBGenericData
{
protected:
std::vector< std::vector< vector3 > > _vLx;
std::vector<double> _vFrequencies;
std::vector<double> _vIntensities;
std::vector<double> _vRamanActivities;
public:
OBVibrationData(): OBGenericData("VibrationData", OBGenericDataType::VibrationData){};
virtual ~OBVibrationData() {}
virtual OBGenericData* Clone(OBBase*) const
{return new OBVibrationData(*this);}
OBVibrationData & operator=(const OBVibrationData &);
void SetData(const std::vector< std::vector< vector3 > > & lx,
const std::vector<double> & frequencies,
const std::vector<double> & intensities);
void SetData(const std::vector< std::vector< vector3 > > &,
const std::vector<double> &,
const std::vector<double> &,
const std::vector<double> &);
std::vector< std::vector< vector3 > > GetLx() const
{ return this->_vLx; }
std::vector<double> GetFrequencies() const
{ return this->_vFrequencies; }
std::vector<double> GetIntensities() const
{ return this->_vIntensities; }
std::vector<double> GetRamanActivities() const
{ return this->_vRamanActivities; }
unsigned int GetNumberOfFrequencies() const;
};
class OBAPI OBDOSData: public OBGenericData
{
protected:
double _fermi;
std::vector<double> _vEnergies;
std::vector<double> _vDensities;
std::vector<double> _vIntegration;
public:
OBDOSData(): OBGenericData("DOSData", OBGenericDataType::DOSData){};
virtual ~OBDOSData() {}
virtual OBGenericData* Clone(OBBase*) const
{return new OBDOSData(*this);}
OBDOSData & operator=(const OBDOSData &);
void SetData(double,
const std::vector<double> &,
const std::vector<double> &,
const std::vector<double> &);
double GetFermiEnergy() const
{ return this->_fermi; }
std::vector<double> GetEnergies() const
{ return this->_vEnergies; }
std::vector<double> GetDensities() const
{ return this->_vDensities; }
std::vector<double> GetIntegration() const
{ return this->_vIntegration; }
};
class OBAPI OBOrbital
{
friend class OBOrbitalData;
protected:
double _energy;
double _occupation;
std::string _mullikenSymbol;
public:
void SetData(double energy, double occupation = 2.0, std::string symbol = "A")
{ _energy = energy; _occupation = occupation; _mullikenSymbol = symbol; }
double GetEnergy() const { return _energy; }
double GetOccupation() const { return _occupation; }
std::string GetSymbol() const { return _mullikenSymbol; }
};
class OBAPI OBOrbitalData: public OBGenericData
{
public:
OBOrbitalData(): OBGenericData("OrbitalData", OBGenericDataType::ElectronicData),
_alphaHOMO(0), _betaHOMO(0), _openShell(false) {};
virtual ~OBOrbitalData() {}
virtual OBGenericData* Clone(OBBase*) const
{return new OBOrbitalData(*this);}
OBOrbitalData & operator=(const OBOrbitalData &);
void SetAlphaOrbitals(std::vector<OBOrbital> orbitalList)
{ _alphaOrbitals = orbitalList; }
void SetBetaOrbitals(std::vector<OBOrbital> orbitalList)
{ _betaOrbitals = orbitalList; }
void SetHOMO(int alpha, int beta = 0)
{ _alphaHOMO = alpha; _betaHOMO = beta; }
void SetOpenShell(bool openShell)
{ _openShell = openShell; }
bool IsOpenShell() { return _openShell; }
unsigned int GetAlphaHOMO() { return _alphaHOMO; }
unsigned int GetBetaHOMO() { return _betaHOMO; }
std::vector<OBOrbital> GetAlphaOrbitals() { return _alphaOrbitals; }
std::vector<OBOrbital> GetBetaOrbitals() { return _betaOrbitals; }
void LoadClosedShellOrbitals(std::vector<double> energies, std::vector<std::string> symmetries, unsigned int alphaHOMO);
void LoadAlphaOrbitals(std::vector<double> energies, std::vector<std::string> symmetries, unsigned int alphaHOMO);
void LoadBetaOrbitals(std::vector<double> energies, std::vector<std::string> symmetries, unsigned int betaHOMO);
protected:
std::vector<OBOrbital> _alphaOrbitals;
std::vector<OBOrbital> _betaOrbitals;
unsigned int _alphaHOMO;
unsigned int _betaHOMO;
bool _openShell;
};
class OBAPI OBElectronicTransitionData: public OBGenericData
{
protected:
std::vector<double> _vWavelengths;
std::vector<double> _vForces;
std::vector<double> _vEDipole;
std::vector<double> _vRotatoryStrengthsVelocity;
std::vector<double> _vRotatoryStrengthsLength;
public:
OBElectronicTransitionData(): OBGenericData("ElectronicTransitionData", OBGenericDataType::ElectronicTransitionData) {}
virtual ~OBElectronicTransitionData() {}
virtual OBGenericData* Clone(OBBase*) const
{return new OBElectronicTransitionData(*this);}
OBElectronicTransitionData & operator=(const OBElectronicTransitionData &);
void SetData(const std::vector<double> & wavelengths,
const std::vector<double> & forces);
void SetEDipole(const std::vector<double> &);
void SetRotatoryStrengthsVelocity(const std::vector<double> &);
void SetRotatoryStrengthsLength(const std::vector<double> &);
std::vector<double> GetWavelengths() const
{ return this->_vWavelengths; }
std::vector<double> GetForces() const
{ return this->_vForces; }
std::vector<double> GetEDipole() const
{ return this->_vEDipole; }
std::vector<double> GetRotatoryStrengthsVelocity() const
{ return this->_vRotatoryStrengthsVelocity; }
std::vector<double> GetRotatoryStrengthsLength() const
{ return this->_vRotatoryStrengthsLength; }
};
class OBAPI OBRotationData: public OBGenericData
{
public:
enum RType{UNKNOWN, ASYMMETRIC, SYMMETRIC, LINEAR};
OBRotationData(): OBGenericData("RotationData", OBGenericDataType::RotationData){}
virtual ~OBRotationData(){};
virtual OBGenericData* Clone(OBBase*) const
{return new OBRotationData(*this);}
void SetData(RType RotorType, std::vector<double> RotationalConstants, int SymmetryNumber)
{
RotConsts = RotationalConstants;
type = RotorType;
SymNum = SymmetryNumber;
}
std::vector<double> GetRotConsts()const{ return RotConsts; }
int GetSymmetryNumber()const{ return SymNum; }
RType GetRotorType()const { return type; }
protected:
std::vector<double> RotConsts;
int SymNum;
RType type;
};
class OBAPI OBVectorData: public OBGenericData
{
public:
OBVectorData(): OBGenericData("VectorData", OBGenericDataType::VectorData){}
virtual ~OBVectorData(){};
virtual OBGenericData* Clone(OBBase*) const
{return new OBVectorData(*this);}
void SetData(double x, double y, double z)
{ _vec = vector3(x, y, z); }
void SetData(vector3 data)
{ _vec = data; }
vector3 GetData() const
{ return _vec; }
protected:
vector3 _vec;
};
class OBAPI OBMatrixData: public OBGenericData
{
public:
OBMatrixData(): OBGenericData("MatrixData", OBGenericDataType::MatrixData){}
virtual ~OBMatrixData(){};
virtual OBGenericData* Clone(OBBase*) const
{return new OBMatrixData(*this);}
void SetData(matrix3x3 data)
{ _matrix = data; }
matrix3x3 GetData() const
{ return _matrix; }
protected:
matrix3x3 _matrix;
};
class OBAPI OBFreeGridPoint
{
protected:
double _x,_y,_z,_V;
public:
OBFreeGridPoint() {};
OBFreeGridPoint(double x,double y,double z,double V) { _x = x; _y = y; _z = z; _V = V; }
~OBFreeGridPoint() {};
double GetX() { return _x; }
double GetY() { return _y; }
double GetZ() { return _z; }
double GetV() { return _V; }
void SetX(double x) { _x = x; }
void SetY(double y) { _y = y; }
void SetZ(double z) { _z = z; }
void SetV(double V) { _V = V; }
};
typedef std::vector<OBFreeGridPoint*>::iterator OBFreeGridPointIterator;
class OBAPI OBFreeGrid: public OBGenericData
{
protected:
std::vector<OBFreeGridPoint*> _points;
public:
OBFreeGrid()
{
}
~OBFreeGrid()
{
//delete _points;
}
int NumPoints()
{
return (int)_points.size();
}
void AddPoint(double x,double y,double z, double V)
{
_points.push_back(new OpenBabel::OBFreeGridPoint(x,y,z,V));
}
OBFreeGridPointIterator BeginPoints()
{
return _points.begin();
}
OBFreeGridPointIterator EndPoints()
{
return _points.begin() + NumPoints();
}
OBFreeGridPoint *BeginPoint(OBFreeGridPointIterator &i)
{
i = _points.begin();
return((i == _points.end()) ? (OBFreeGridPoint*)nullptr : (OBFreeGridPoint*)*i);
}
OBFreeGridPoint *NextPoint(OBFreeGridPointIterator &i)
{
++i;
return((i == _points.end()) ? (OBFreeGridPoint*)nullptr : (OBFreeGridPoint*)*i);
}
void Clear();
};
class OBAPI OBPcharge: public OBGenericData
{
protected:
std::vector<double> _PartialCharge;
public:
OBPcharge(){};
~OBPcharge(){};
int NumPartialCharges()
{
return (int)_PartialCharge.size();
}
void AddPartialCharge(std::vector<double> q)
{
_PartialCharge = q;
}
std::vector<double> GetPartialCharge()
{
return _PartialCharge;
}
};
typedef std::vector<OBGenericData*>::iterator OBDataIterator;
} //end namespace OpenBabel
#endif // OB_GENERIC_H
base.h
Base classes to build a graph.
OpenBabel::OBAngleData
Used to hold all angles in a molecule as generic data for OBMol.
Definition generic.h:751
OpenBabel::OBAngleData::GetSize
size_t GetSize() const
Definition generic.h:778
OpenBabel::OBAngleData::_angles
std::vector< OBAngle > _angles
Definition generic.h:755
OpenBabel::OBAngleData::GetData
std::vector< OBAngle > GetData() const
Gets the angle vector data.
Definition generic.h:761
OpenBabel::OBAngleData::OBAngleData
OBAngleData()
OBAngleData constructor.
Definition generic.cpp:1022
OpenBabel::OBAngleData::OBMol
friend class OBMol
Definition generic.h:752
OpenBabel::OBAngleData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:768
OpenBabel::OBAngle
Used to hold the 3 atoms in an angle and the angle itself.
Definition generic.h:698
OpenBabel::OBAngle::OBAngle
OBAngle()
Angle default constructor.
Definition generic.cpp:902
OpenBabel::OBAngle::~OBAngle
~OBAngle()
Definition generic.h:721
OpenBabel::OBAngle::SetAngle
void SetAngle(double angle)
Definition generic.h:739
OpenBabel::OBAngle::GetAtoms
triple< OBAtom *, OBAtom *, OBAtom * > GetAtoms()
Retrieves the 3 atom pointer for the angle (vertex first).
Definition generic.cpp:980
OpenBabel::OBAngle::_vertex
OBAtom * _vertex
Definition generic.h:706
OpenBabel::OBAngle::_radians
double _radians
Definition generic.h:708
OpenBabel::OBAngle::GetAngle
double GetAngle() const
Definition generic.h:733
OpenBabel::OBAngle::SortByIndex
void SortByIndex()
sorts atoms in angle by order of indices
Definition generic.cpp:992
OpenBabel::OBAngle::OBAngleData
friend class OBAngleData
Definition generic.h:700
OpenBabel::OBAngle::OBMol
friend class OBMol
Definition generic.h:699
OpenBabel::OBAngle::_termini
std::pair< OBAtom *, OBAtom * > _termini
Definition generic.h:707
OpenBabel::OBAtom
Atom class.
Definition atom.h:72
OpenBabel::OBBase
Base Class.
Definition base.h:240
OpenBabel::OBBond
Bond class.
Definition bond.h:59
OpenBabel::OBCommentData::SetData
void SetData(const char *d)
Definition generic.h:58
OpenBabel::OBCommentData::GetData
const std::string & GetData() const
Definition generic.h:60
OpenBabel::OBCommentData::SetData
void SetData(const std::string &data)
Definition generic.h:56
OpenBabel::OBCommentData::operator=
OBCommentData & operator=(const OBCommentData &src)
OpenBabel::OBCommentData::_data
std::string _data
Definition generic.h:48
OpenBabel::OBCommentData::GetValue
virtual const std::string & GetValue() const
Base class returns a default value (the attribute type) but should never be called.
Definition generic.h:62
OpenBabel::OBCommentData::OBCommentData
OBCommentData()
Definition generic.cpp:195
OpenBabel::OBCommentData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:52
OpenBabel::OBConformerData
Used to hold data on conformers or geometry optimization steps.
Definition generic.h:528
OpenBabel::OBConformerData::GetVelocities
std::vector< std::vector< vector3 > > GetVelocities()
Definition generic.h:563
OpenBabel::OBConformerData::GetEnergies
std::vector< double > GetEnergies()
Definition generic.h:561
OpenBabel::OBConformerData::GetDisplacements
std::vector< std::vector< vector3 > > GetDisplacements()
Definition generic.h:565
OpenBabel::OBConformerData::SetVelocities
void SetVelocities(std::vector< std::vector< vector3 > > vv)
Definition generic.h:554
OpenBabel::OBConformerData::GetData
std::vector< std::string > GetData()
Definition generic.h:567
OpenBabel::OBConformerData::~OBConformerData
~OBConformerData()
Definition generic.h:547
OpenBabel::OBConformerData::OBConformerData
OBConformerData()
Definition generic.cpp:775
OpenBabel::OBConformerData::SetData
void SetData(std::vector< std::string > vdat)
Definition generic.h:558
OpenBabel::OBConformerData::_vDimension
std::vector< unsigned short > _vDimension
Dimensionalities of conformers.
Definition generic.h:531
OpenBabel::OBConformerData::SetEnergies
void SetEnergies(std::vector< double > ve)
Definition generic.h:552
OpenBabel::OBConformerData::_vForces
std::vector< std::vector< vector3 > > _vForces
Atomic forces for each conformer.
Definition generic.h:535
OpenBabel::OBConformerData::SetDisplacements
void SetDisplacements(std::vector< std::vector< vector3 > > vd)
Definition generic.h:556
OpenBabel::OBConformerData::SetDimension
void SetDimension(std::vector< unsigned short > vd)
Definition generic.h:551
OpenBabel::OBConformerData::_vDisplace
std::vector< std::vector< vector3 > > _vDisplace
Atomic displacements for each conformer (e.g., RMS distances).
Definition generic.h:539
OpenBabel::OBConformerData::GetDimension
std::vector< unsigned short > GetDimension()
Definition generic.h:560
OpenBabel::OBConformerData::GetForces
std::vector< std::vector< vector3 > > GetForces()
Definition generic.h:562
OpenBabel::OBConformerData::_vVelocity
std::vector< std::vector< vector3 > > _vVelocity
Atomic velocities for each conformer (e.g., trajectories).
Definition generic.h:537
OpenBabel::OBConformerData::_vEnergies
std::vector< double > _vEnergies
Relative energies of conformers (preferably in kJ/mol).
Definition generic.h:533
OpenBabel::OBConformerData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:546
OpenBabel::OBConformerData::SetForces
void SetForces(std::vector< std::vector< vector3 > > vf)
Definition generic.h:553
OpenBabel::OBConformerData::_vData
std::vector< std::string > _vData
Additional data (as strings).
Definition generic.h:541
OpenBabel::OBDOSData::~OBDOSData
virtual ~OBDOSData()
Definition generic.h:876
OpenBabel::OBDOSData::GetEnergies
std::vector< double > GetEnergies() const
Definition generic.h:889
OpenBabel::OBDOSData::GetIntegration
std::vector< double > GetIntegration() const
Definition generic.h:893
OpenBabel::OBDOSData::GetDensities
std::vector< double > GetDensities() const
Definition generic.h:891
OpenBabel::OBDOSData::GetFermiEnergy
double GetFermiEnergy() const
Definition generic.h:887
OpenBabel::OBDOSData::_vIntegration
std::vector< double > _vIntegration
Integrated DOS vector.
Definition generic.h:872
OpenBabel::OBDOSData::SetData
void SetData(double, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &)
Assign the data.
Definition generic.cpp:1371
OpenBabel::OBDOSData::OBDOSData
OBDOSData()
Definition generic.h:875
OpenBabel::OBDOSData::_fermi
double _fermi
Fermi energy (eV) as shown in _vEnergies.
Definition generic.h:863
OpenBabel::OBDOSData::operator=
OBDOSData & operator=(const OBDOSData &)
OpenBabel::OBDOSData::_vEnergies
std::vector< double > _vEnergies
Energy levels (eV).
Definition generic.h:866
OpenBabel::OBDOSData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:877
OpenBabel::OBDOSData::_vDensities
std::vector< double > _vDensities
Density of corresponding energy level (number of states / unit cell).
Definition generic.h:869
OpenBabel::OBElectronicTransitionData::operator=
OBElectronicTransitionData & operator=(const OBElectronicTransitionData &)
OpenBabel::OBElectronicTransitionData::SetEDipole
void SetEDipole(const std::vector< double > &)
Assign the electronic dipole strengths.
Definition generic.cpp:1493
OpenBabel::OBElectronicTransitionData::_vRotatoryStrengthsLength
std::vector< double > _vRotatoryStrengthsLength
Rotatory strengths (length).
Definition generic.h:979
OpenBabel::OBElectronicTransitionData::~OBElectronicTransitionData
virtual ~OBElectronicTransitionData()
Definition generic.h:983
OpenBabel::OBElectronicTransitionData::GetWavelengths
std::vector< double > GetWavelengths() const
Definition generic.h:996
OpenBabel::OBElectronicTransitionData::SetRotatoryStrengthsLength
void SetRotatoryStrengthsLength(const std::vector< double > &)
Assign the rotatory strengths (length).
Definition generic.cpp:1511
OpenBabel::OBElectronicTransitionData::_vWavelengths
std::vector< double > _vWavelengths
Wavelengths (nm).
Definition generic.h:967
OpenBabel::OBElectronicTransitionData::GetRotatoryStrengthsLength
std::vector< double > GetRotatoryStrengthsLength() const
Definition generic.h:1004
OpenBabel::OBElectronicTransitionData::_vEDipole
std::vector< double > _vEDipole
Electric dipole strengths.
Definition generic.h:973
OpenBabel::OBElectronicTransitionData::GetEDipole
std::vector< double > GetEDipole() const
Definition generic.h:1000
OpenBabel::OBElectronicTransitionData::GetRotatoryStrengthsVelocity
std::vector< double > GetRotatoryStrengthsVelocity() const
Definition generic.h:1002
OpenBabel::OBElectronicTransitionData::_vRotatoryStrengthsVelocity
std::vector< double > _vRotatoryStrengthsVelocity
Rotatory strengths (velocity).
Definition generic.h:976
OpenBabel::OBElectronicTransitionData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:984
OpenBabel::OBElectronicTransitionData::SetRotatoryStrengthsVelocity
void SetRotatoryStrengthsVelocity(const std::vector< double > &)
Assign the rotatory strengths (velocity).
Definition generic.cpp:1502
OpenBabel::OBElectronicTransitionData::SetData
void SetData(const std::vector< double > &wavelengths, const std::vector< double > &forces)
Assign the basic excitation data.
Definition generic.cpp:1482
OpenBabel::OBElectronicTransitionData::GetForces
std::vector< double > GetForces() const
Definition generic.h:998
OpenBabel::OBElectronicTransitionData::_vForces
std::vector< double > _vForces
Oscillator strengths.
Definition generic.h:970
OpenBabel::OBElectronicTransitionData::OBElectronicTransitionData
OBElectronicTransitionData()
Definition generic.h:982
OpenBabel::OBExternalBondData::OBExternalBondData
OBExternalBondData()
Definition generic.cpp:218
OpenBabel::OBExternalBondData::GetData
std::vector< OBExternalBond > * GetData()
Definition generic.h:101
OpenBabel::OBExternalBondData::_vexbnd
std::vector< OBExternalBond > _vexbnd
Definition generic.h:93
OpenBabel::OBExternalBondData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:98
OpenBabel::OBExternalBond
Used to store information on an external bond (e.g., SMILES fragments).
Definition generic.h:70
OpenBabel::OBExternalBond::GetIdx
int GetIdx() const
Definition generic.h:80
OpenBabel::OBExternalBond::~OBExternalBond
~OBExternalBond()
Definition generic.h:78
OpenBabel::OBExternalBond::GetAtom
OBAtom * GetAtom() const
Definition generic.h:81
OpenBabel::OBExternalBond::SetBond
void SetBond(OBBond *bond)
Definition generic.h:85
OpenBabel::OBExternalBond::SetAtom
void SetAtom(OBAtom *atom)
Definition generic.h:84
OpenBabel::OBExternalBond::OBExternalBond
OBExternalBond()
Definition generic.h:75
OpenBabel::OBExternalBond::SetIdx
void SetIdx(int idx)
Definition generic.h:83
OpenBabel::OBExternalBond::GetBond
OBBond * GetBond() const
Definition generic.h:82
OpenBabel::OBFreeGridPoint
Helper class for OBFreeGrid Can hold a random coordinate and associated value.
Definition generic.h:1081
OpenBabel::OBFreeGridPoint::_z
double _z
Definition generic.h:1083
OpenBabel::OBFreeGridPoint::OBFreeGridPoint
OBFreeGridPoint()
Definition generic.h:1086
OpenBabel::OBFreeGridPoint::GetZ
double GetZ()
Definition generic.h:1091
OpenBabel::OBFreeGridPoint::_y
double _y
Definition generic.h:1083
OpenBabel::OBFreeGridPoint::_V
double _V
Definition generic.h:1083
OpenBabel::OBFreeGridPoint::SetZ
void SetZ(double z)
Definition generic.h:1095
OpenBabel::OBFreeGridPoint::_x
double _x
Definition generic.h:1083
OpenBabel::OBFreeGridPoint::GetY
double GetY()
Definition generic.h:1090
OpenBabel::OBFreeGridPoint::GetX
double GetX()
Definition generic.h:1089
OpenBabel::OBFreeGridPoint::GetV
double GetV()
Definition generic.h:1092
OpenBabel::OBFreeGridPoint::OBFreeGridPoint
OBFreeGridPoint(double x, double y, double z, double V)
Definition generic.h:1087
OpenBabel::OBFreeGridPoint::SetX
void SetX(double x)
Definition generic.h:1093
OpenBabel::OBFreeGridPoint::SetV
void SetV(double V)
Definition generic.h:1096
OpenBabel::OBFreeGridPoint::~OBFreeGridPoint
~OBFreeGridPoint()
Definition generic.h:1088
OpenBabel::OBFreeGridPoint::SetY
void SetY(double y)
Definition generic.h:1094
OpenBabel::OBFreeGrid::NextPoint
OBFreeGridPoint * NextPoint(OBFreeGridPointIterator &i)
Definition generic.h:1146
OpenBabel::OBFreeGrid::EndPoints
OBFreeGridPointIterator EndPoints()
Definition generic.h:1135
OpenBabel::OBFreeGrid::NumPoints
int NumPoints()
Definition generic.h:1120
OpenBabel::OBFreeGrid::_points
std::vector< OBFreeGridPoint * > _points
coordinates with accompanying float values
Definition generic.h:1108
OpenBabel::OBFreeGrid::~OBFreeGrid
~OBFreeGrid()
Definition generic.h:1115
OpenBabel::OBFreeGrid::AddPoint
void AddPoint(double x, double y, double z, double V)
Definition generic.h:1125
OpenBabel::OBFreeGrid::BeginPoints
OBFreeGridPointIterator BeginPoints()
Definition generic.h:1130
OpenBabel::OBFreeGrid::OBFreeGrid
OBFreeGrid()
Definition generic.h:1111
OpenBabel::OBFreeGrid::BeginPoint
OBFreeGridPoint * BeginPoint(OBFreeGridPointIterator &i)
Definition generic.h:1140
OpenBabel::OBGenericData::OBGenericData
OBGenericData(const std::string attr="undefined", const unsigned int type=OBGenericDataType::UndefinedData, const DataOrigin source=any)
Definition generic.cpp:166
OpenBabel::OBMatrixData::OBMatrixData
OBMatrixData()
Definition generic.h:1064
OpenBabel::OBMatrixData::GetData
matrix3x3 GetData() const
Definition generic.h:1070
OpenBabel::OBMatrixData::SetData
void SetData(matrix3x3 data)
Definition generic.h:1068
OpenBabel::OBMatrixData::~OBMatrixData
virtual ~OBMatrixData()
Definition generic.h:1065
OpenBabel::OBMatrixData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:1066
OpenBabel::OBMatrixData::_matrix
matrix3x3 _matrix
3x3 matrix to be stored
Definition generic.h:1074
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
OpenBabel::OBOrbitalData::GetAlphaHOMO
unsigned int GetAlphaHOMO()
Definition generic.h:940
OpenBabel::OBOrbitalData::SetAlphaOrbitals
void SetAlphaOrbitals(std::vector< OBOrbital > orbitalList)
Definition generic.h:929
OpenBabel::OBOrbitalData::GetAlphaOrbitals
std::vector< OBOrbital > GetAlphaOrbitals()
Definition generic.h:942
OpenBabel::OBOrbitalData::SetOpenShell
void SetOpenShell(bool openShell)
Definition generic.h:935
OpenBabel::OBOrbitalData::_alphaOrbitals
std::vector< OBOrbital > _alphaOrbitals
List of orbitals. In case of unrestricted calculations, this contains the alpha spin-orbitals.
Definition generic.h:954
OpenBabel::OBOrbitalData::_betaHOMO
unsigned int _betaHOMO
Highest occupied for _betaOrbitals (if needed).
Definition generic.h:957
OpenBabel::OBOrbitalData::IsOpenShell
bool IsOpenShell()
Definition generic.h:938
OpenBabel::OBOrbitalData::_betaOrbitals
std::vector< OBOrbital > _betaOrbitals
Only used if needed (e.g., unrestricted calculations).
Definition generic.h:955
OpenBabel::OBOrbitalData::GetBetaOrbitals
std::vector< OBOrbital > GetBetaOrbitals()
Definition generic.h:943
OpenBabel::OBOrbitalData::~OBOrbitalData
virtual ~OBOrbitalData()
Definition generic.h:923
OpenBabel::OBOrbitalData::operator=
OBOrbitalData & operator=(const OBOrbitalData &)
OpenBabel::OBOrbitalData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:924
OpenBabel::OBOrbitalData::SetHOMO
void SetHOMO(int alpha, int beta=0)
Definition generic.h:933
OpenBabel::OBOrbitalData::GetBetaHOMO
unsigned int GetBetaHOMO()
Definition generic.h:941
OpenBabel::OBOrbitalData::_alphaHOMO
unsigned int _alphaHOMO
Highest occupied molecular orbital for _alphaOrbitals.
Definition generic.h:956
OpenBabel::OBOrbitalData::SetBetaOrbitals
void SetBetaOrbitals(std::vector< OBOrbital > orbitalList)
Definition generic.h:931
OpenBabel::OBOrbitalData::_openShell
bool _openShell
Whether we store both alpha and beta spin-orbitals (i.e., a restricted open-shell or unrestricted cal...
Definition generic.h:958
OpenBabel::OBOrbitalData::OBOrbitalData
OBOrbitalData()
Definition generic.h:921
OpenBabel::OBOrbital
Used to store energy, occupation, and orbital symmetry of a particular orbital.
Definition generic.h:901
OpenBabel::OBOrbital::OBOrbitalData
friend class OBOrbitalData
Definition generic.h:902
OpenBabel::OBOrbital::GetEnergy
double GetEnergy() const
Definition generic.h:911
OpenBabel::OBOrbital::GetSymbol
std::string GetSymbol() const
Definition generic.h:913
OpenBabel::OBOrbital::_mullikenSymbol
std::string _mullikenSymbol
symmetry designation
Definition generic.h:906
OpenBabel::OBOrbital::_occupation
double _occupation
usually 0, 1, or 2, but can be fractional (e.g., solid-state calcs)
Definition generic.h:905
OpenBabel::OBOrbital::_energy
double _energy
in electron volts
Definition generic.h:904
OpenBabel::OBOrbital::GetOccupation
double GetOccupation() const
Definition generic.h:912
OpenBabel::OBOrbital::SetData
void SetData(double energy, double occupation=2.0, std::string symbol="A")
Definition generic.h:908
OpenBabel::OBPairData::_value
std::string _value
The data for this key/value pair.
Definition generic.h:115
OpenBabel::OBPairData::SetValue
void SetValue(const std::string &v)
Definition generic.h:121
OpenBabel::OBPairData::OBPairData
OBPairData()
Definition generic.cpp:233
OpenBabel::OBPairData::GetValue
virtual const std::string & GetValue() const
Base class returns a default value (the attribute type) but should never be called.
Definition generic.h:122
OpenBabel::OBPairData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:118
OpenBabel::OBPairData::SetValue
void SetValue(const char *v)
Definition generic.h:120
OpenBabel::OBPairTemplate
Used to store arbitrary attribute/value relationsips of any type.
Definition generic.h:131
OpenBabel::OBPairTemplate::SetValue
void SetValue(const ValueT t)
Definition generic.h:139
OpenBabel::OBPairTemplate< int >::_value
int _value
Definition generic.h:133
OpenBabel::OBPairTemplate::GetGenericValue
virtual const ValueT & GetGenericValue() const
Definition generic.h:140
OpenBabel::OBPairTemplate::OBPairTemplate
OBPairTemplate()
Definition generic.h:135
OpenBabel::OBPairTemplate::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:137
OpenBabel::OBPcharge::NumPartialCharges
int NumPartialCharges()
Definition generic.h:1164
OpenBabel::OBPcharge::~OBPcharge
~OBPcharge()
Definition generic.h:1162
OpenBabel::OBPcharge::_PartialCharge
std::vector< double > _PartialCharge
Definition generic.h:1159
OpenBabel::OBPcharge::OBPcharge
OBPcharge()
Definition generic.h:1161
OpenBabel::OBPcharge::GetPartialCharge
std::vector< double > GetPartialCharge()
Definition generic.h:1174
OpenBabel::OBPcharge::AddPartialCharge
void AddPartialCharge(std::vector< double > q)
Definition generic.h:1169
OpenBabel::OBRingData
Used to store the SSSR set (filled in by OBMol::GetSSSR()).
Definition generic.h:256
OpenBabel::OBRingData::GetData
std::vector< OBRing * > & GetData()
Definition generic.h:280
OpenBabel::OBRingData::PushBack
void PushBack(OBRing *r)
Definition generic.h:276
OpenBabel::OBRingData::OBRingData
OBRingData()
Definition generic.cpp:808
OpenBabel::OBRingData::_vr
std::vector< OBRing * > _vr
Definition generic.h:258
OpenBabel::OBRingData::SetData
void SetData(std::vector< OBRing * > &vr)
Definition generic.h:272
OpenBabel::OBRingData::EndRings
std::vector< OBRing * >::iterator EndRings()
Definition generic.h:287
OpenBabel::OBRingData::BeginRings
std::vector< OBRing * >::iterator BeginRings()
Definition generic.h:285
OpenBabel::OBRingData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:267
OpenBabel::OBRing
Stores information on rings in a molecule from SSSR perception.
Definition ring.h:41
OpenBabel::OBRotationData::RotConsts
std::vector< double > RotConsts
Rotational constants in GHz.
Definition generic.h:1032
OpenBabel::OBRotationData::GetSymmetryNumber
int GetSymmetryNumber() const
Definition generic.h:1028
OpenBabel::OBRotationData::~OBRotationData
virtual ~OBRotationData()
Definition generic.h:1015
OpenBabel::OBRotationData::GetRotorType
RType GetRotorType() const
Definition generic.h:1029
OpenBabel::OBRotationData::SymNum
int SymNum
Rotational Symmetry Number.
Definition generic.h:1033
OpenBabel::OBRotationData::type
RType type
linear, symmetric or asymmetric top
Definition generic.h:1034
OpenBabel::OBRotationData::SetData
void SetData(RType RotorType, std::vector< double > RotationalConstants, int SymmetryNumber)
Definition generic.h:1018
OpenBabel::OBRotationData::GetRotConsts
std::vector< double > GetRotConsts() const
Definition generic.h:1026
OpenBabel::OBRotationData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:1016
OpenBabel::OBRotationData::OBRotationData
OBRotationData()
Definition generic.h:1014
OpenBabel::OBRotationData::RType
RType
Definition generic.h:1013
OpenBabel::OBRotationData::ASYMMETRIC
@ ASYMMETRIC
Definition generic.h:1013
OpenBabel::OBRotationData::SYMMETRIC
@ SYMMETRIC
Definition generic.h:1013
OpenBabel::OBRotationData::UNKNOWN
@ UNKNOWN
Definition generic.h:1013
OpenBabel::OBRotationData::LINEAR
@ LINEAR
Definition generic.h:1013
OpenBabel::OBSerialNums::OBSerialNums
OBSerialNums(const OBSerialNums &cp)
Definition generic.h:798
OpenBabel::OBSerialNums::GetData
std::map< int, OBAtom * > & GetData()
Definition generic.h:807
OpenBabel::OBSerialNums::_serialMap
std::map< int, OBAtom * > _serialMap
map between serial num
Definition generic.h:790
OpenBabel::OBSerialNums::SetData
void SetData(std::map< int, OBAtom * > &sm)
Definition generic.h:808
OpenBabel::OBSerialNums::OBSerialNums
OBSerialNums()
Definition generic.h:794
OpenBabel::OBSerialNums::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:804
OpenBabel::OBSetData::GetBegin
std::vector< OBGenericData * >::iterator GetBegin()
Get the begin iterator.
Definition generic.h:207
OpenBabel::OBSetData::OBSetData
OBSetData()
Definition generic.h:158
OpenBabel::OBSetData::GetData
OBGenericData * GetData(const char *s)
Definition generic.h:177
OpenBabel::OBSetData::AddData
void AddData(OBGenericData *d)
Add an OBGenericData element to the set.
Definition generic.h:162
OpenBabel::OBSetData::GetData
virtual const std::vector< OBGenericData * > & GetData() const
Gets the entire set.
Definition generic.h:201
OpenBabel::OBSetData::SetData
void SetData(std::vector< OBGenericData * > &vdata)
Set the array of data to a new vector.
Definition generic.h:171
OpenBabel::OBSetData::DeleteData
void DeleteData(OBGenericData *gd)
Delete the matching OBGenericData element.
Definition generic.h:219
OpenBabel::OBSetData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:159
OpenBabel::OBSetData::_vdata
std::vector< OBGenericData * > _vdata
Definition generic.h:156
OpenBabel::OBSetData::GetData
OBGenericData * GetData(const std::string &s)
Definition generic.h:189
OpenBabel::OBSetData::GetEnd
std::vector< OBGenericData * >::iterator GetEnd()
Get the end iterator.
Definition generic.h:213
OpenBabel::OBSymmetryData
Used to hold the point-group and/or space-group symmetry.
Definition generic.h:576
OpenBabel::OBSymmetryData::SetData
void SetData(std::string pg, std::string sg="")
Definition generic.h:588
OpenBabel::OBSymmetryData::_spaceGroup
std::string _spaceGroup
Definition generic.h:578
OpenBabel::OBSymmetryData::_pointGroup
std::string _pointGroup
Definition generic.h:579
OpenBabel::OBSymmetryData::SetPointGroup
void SetPointGroup(std::string pg)
Definition generic.h:590
OpenBabel::OBSymmetryData::GetSpaceGroup
std::string GetSpaceGroup()
Definition generic.h:594
OpenBabel::OBSymmetryData::~OBSymmetryData
~OBSymmetryData()
Definition generic.h:584
OpenBabel::OBSymmetryData::OBSymmetryData
OBSymmetryData()
Definition generic.cpp:753
OpenBabel::OBSymmetryData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:583
OpenBabel::OBSymmetryData::GetPointGroup
std::string GetPointGroup()
Definition generic.h:593
OpenBabel::OBSymmetryData::SetSpaceGroup
void SetSpaceGroup(std::string sg)
Definition generic.h:591
OpenBabel::OBTorsionData::GetSize
size_t GetSize() const
Definition generic.h:685
OpenBabel::OBTorsionData::GetData
std::vector< OBTorsion > GetData() const
Definition generic.h:678
OpenBabel::OBTorsionData::OBTorsionData
OBTorsionData()
Definition generic.cpp:1284
OpenBabel::OBTorsionData::_torsions
std::vector< OBTorsion > _torsions
Definition generic.h:662
OpenBabel::OBTorsionData::operator=
OBTorsionData & operator=(const OBTorsionData &)
Definition generic.cpp:1295
OpenBabel::OBTorsionData::OBMol
friend class OBMol
Definition generic.h:659
OpenBabel::OBTorsionData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:671
OpenBabel::OBTorsion
Used to hold the torsion data for a single rotatable bond and all four atoms around it.
Definition generic.h:601
OpenBabel::OBTorsion::GetSize
size_t GetSize() const
Definition generic.h:635
OpenBabel::OBTorsion::Empty
bool Empty()
Definition generic.h:623
OpenBabel::OBTorsion::~OBTorsion
~OBTorsion()
Definition generic.h:618
OpenBabel::OBTorsion::OBTorsionData
friend class OBTorsionData
Definition generic.h:603
OpenBabel::OBTorsion::_bc
std::pair< OBAtom *, OBAtom * > _bc
Definition generic.h:606
OpenBabel::OBTorsion::SetData
bool SetData(OBBond *)
Definition generic.h:629
OpenBabel::OBTorsion::OBTorsion
OBTorsion()
Definition generic.h:610
OpenBabel::OBTorsion::GetBC
std::pair< OBAtom *, OBAtom * > GetBC()
Definition generic.h:639
OpenBabel::OBTorsion::OBMol
friend class OBMol
Definition generic.h:602
OpenBabel::OBTorsion::GetADs
std::vector< triple< OBAtom *, OBAtom *, double > > GetADs()
Definition generic.h:645
OpenBabel::OBTorsion::_ads
std::vector< triple< OBAtom *, OBAtom *, double > > _ads
double is angle in radians
Definition generic.h:608
OpenBabel::OBUnitCell
Used for storing information about periodic boundary conditions with conversion to/from translation v...
Definition generic.h:298
OpenBabel::OBUnitCell::GetSpaceGroup
const SpaceGroup * GetSpaceGroup()
Definition generic.h:406
OpenBabel::OBUnitCell::GetOrientationMatrix
matrix3x3 GetOrientationMatrix()
OpenBabel::OBUnitCell::WrapFractionalCoordinate
vector3 WrapFractionalCoordinate(vector3 frac)
OpenBabel::OBUnitCell::GetC
double GetC()
OpenBabel::OBUnitCell::GetSpaceGroupName
const std::string GetSpaceGroupName()
Definition generic.h:410
OpenBabel::OBUnitCell::WrapCartesianCoordinate
vector3 WrapCartesianCoordinate(vector3 cart)
OpenBabel::OBUnitCell::_mOrient
matrix3x3 _mOrient
Definition generic.h:312
OpenBabel::OBUnitCell::~OBUnitCell
~OBUnitCell()
Definition generic.h:323
OpenBabel::OBUnitCell::GetFractionalMatrix
matrix3x3 GetFractionalMatrix()
OpenBabel::OBUnitCell::GetLatticeType
LatticeType GetLatticeType()
OpenBabel::OBUnitCell::_spaceGroupName
std::string _spaceGroupName
Definition generic.h:314
OpenBabel::OBUnitCell::GetA
double GetA()
OpenBabel::OBUnitCell::FractionalToCartesian
vector3 FractionalToCartesian(vector3 frac)
OpenBabel::OBUnitCell::_lattice
LatticeType _lattice
Definition generic.h:316
OpenBabel::OBUnitCell::_offset
vector3 _offset
Definition generic.h:313
OpenBabel::OBUnitCell::UnwrapFractionalNear
vector3 UnwrapFractionalNear(vector3 new_loc, vector3 ref_loc)
OpenBabel::OBUnitCell::GetGamma
double GetGamma()
OpenBabel::OBUnitCell::GetOffset
vector3 GetOffset()
OpenBabel::OBUnitCell::GetSpaceGroup
const SpaceGroup * GetSpaceGroup() const
Definition generic.h:407
OpenBabel::OBUnitCell::GetOrthoMatrix
matrix3x3 GetOrthoMatrix()
OpenBabel::OBUnitCell::SetLatticeType
void SetLatticeType(const LatticeType lt)
Set the Bravais lattice type for this unit cell.
Definition generic.h:375
OpenBabel::OBUnitCell::GetSpaceGroupNumber
int GetSpaceGroupNumber(std::string name="")
OpenBabel::OBUnitCell::GetAlpha
double GetAlpha()
OpenBabel::OBUnitCell::GetSpaceGroupName
const std::string GetSpaceGroupName() const
Definition generic.h:411
OpenBabel::OBUnitCell::SetSpaceGroup
void SetSpaceGroup(const std::string sg)
Definition generic.h:364
OpenBabel::OBUnitCell::MinimumImageFractional
vector3 MinimumImageFractional(vector3 frac)
OpenBabel::OBUnitCell::GetBeta
double GetBeta()
OpenBabel::OBUnitCell::_mOrtho
matrix3x3 _mOrtho
Definition generic.h:311
OpenBabel::OBUnitCell::OBUnitCell
OBUnitCell()
public constructor
Definition generic.cpp:254
OpenBabel::OBUnitCell::_spaceGroup
const SpaceGroup * _spaceGroup
Definition generic.h:315
OpenBabel::OBUnitCell::GetCellVolume
double GetCellVolume()
OpenBabel::OBUnitCell::MinimumImageCartesian
vector3 MinimumImageCartesian(vector3 cart)
OpenBabel::OBUnitCell::UnwrapCartesianNear
vector3 UnwrapCartesianNear(vector3 new_loc, vector3 ref_loc)
OpenBabel::OBUnitCell::GetB
double GetB()
OpenBabel::OBUnitCell::GetCellVectors
std::vector< vector3 > GetCellVectors()
OpenBabel::OBUnitCell::GetCellMatrix
matrix3x3 GetCellMatrix()
OpenBabel::OBUnitCell::SetSpaceGroup
void SetSpaceGroup(const SpaceGroup *sg)
Definition generic.h:359
OpenBabel::OBUnitCell::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:321
OpenBabel::OBUnitCell::CartesianToFractional
vector3 CartesianToFractional(vector3 cart)
OpenBabel::OBUnitCell::SetSpaceGroup
void SetSpaceGroup(const int sg)
Definition generic.h:372
OpenBabel::OBUnitCell::LatticeType
LatticeType
Definition generic.h:300
OpenBabel::OBUnitCell::Triclinic
@ Triclinic
Definition generic.h:301
OpenBabel::OBUnitCell::Undefined
@ Undefined
Definition generic.h:300
OpenBabel::OBUnitCell::Tetragonal
@ Tetragonal
Definition generic.h:304
OpenBabel::OBUnitCell::Rhombohedral
@ Rhombohedral
Definition generic.h:305
OpenBabel::OBUnitCell::Cubic
@ Cubic
Definition generic.h:307
OpenBabel::OBUnitCell::Monoclinic
@ Monoclinic
Definition generic.h:302
OpenBabel::OBUnitCell::Orthorhombic
@ Orthorhombic
Definition generic.h:303
OpenBabel::OBUnitCell::Hexagonal
@ Hexagonal
Definition generic.h:306
OpenBabel::OBUnitCell::GetLatticeType
LatticeType GetLatticeType(int spacegroup)
OpenBabel::OBVectorData::_vec
vector3 _vec
3D vector to be stored
Definition generic.h:1055
OpenBabel::OBVectorData::SetData
void SetData(vector3 data)
Definition generic.h:1049
OpenBabel::OBVectorData::SetData
void SetData(double x, double y, double z)
Definition generic.h:1047
OpenBabel::OBVectorData::OBVectorData
OBVectorData()
Definition generic.h:1043
OpenBabel::OBVectorData::~OBVectorData
virtual ~OBVectorData()
Definition generic.h:1044
OpenBabel::OBVectorData::GetData
vector3 GetData() const
Definition generic.h:1051
OpenBabel::OBVectorData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:1045
OpenBabel::OBVibrationData::GetRamanActivities
std::vector< double > GetRamanActivities() const
Definition generic.h:851
OpenBabel::OBVibrationData::_vFrequencies
std::vector< double > _vFrequencies
Harmonic frequencies in inverse centimeters.
Definition generic.h:821
OpenBabel::OBVibrationData::_vLx
std::vector< std::vector< vector3 > > _vLx
Normal modes in 1/sqrt(a.u.).
Definition generic.h:818
OpenBabel::OBVibrationData::operator=
OBVibrationData & operator=(const OBVibrationData &)
OpenBabel::OBVibrationData::_vRamanActivities
std::vector< double > _vRamanActivities
Raman activities.
Definition generic.h:827
OpenBabel::OBVibrationData::GetFrequencies
std::vector< double > GetFrequencies() const
Definition generic.h:847
OpenBabel::OBVibrationData::~OBVibrationData
virtual ~OBVibrationData()
Definition generic.h:831
OpenBabel::OBVibrationData::GetLx
std::vector< std::vector< vector3 > > GetLx() const
Definition generic.h:845
OpenBabel::OBVibrationData::OBVibrationData
OBVibrationData()
Definition generic.h:830
OpenBabel::OBVibrationData::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:832
OpenBabel::OBVibrationData::_vIntensities
std::vector< double > _vIntensities
Infrared absorption intensities in KM/Mole.
Definition generic.h:824
OpenBabel::OBVibrationData::GetIntensities
std::vector< double > GetIntensities() const
Definition generic.h:849
OpenBabel::OBVibrationData::SetData
void SetData(const std::vector< std::vector< vector3 > > &lx, const std::vector< double > &frequencies, const std::vector< double > &intensities)
Assign the data.
Definition generic.cpp:1526
OpenBabel::OBVirtualBond
Used to temporarily store bonds that reference an atom that has not yet been added to a molecule.
Definition generic.h:237
OpenBabel::OBVirtualBond::GetOrder
unsigned int GetOrder()
Definition generic.h:249
OpenBabel::OBVirtualBond::_ord
unsigned int _ord
Definition generic.h:241
OpenBabel::OBVirtualBond::_bgn
unsigned int _bgn
Definition generic.h:239
OpenBabel::OBVirtualBond::GetEnd
unsigned int GetEnd()
Definition generic.h:248
OpenBabel::OBVirtualBond::OBVirtualBond
OBVirtualBond()
Definition generic.cpp:241
OpenBabel::OBVirtualBond::GetStereo
int GetStereo()
Definition generic.h:250
OpenBabel::OBVirtualBond::_end
unsigned int _end
Definition generic.h:240
OpenBabel::OBVirtualBond::_stereo
int _stereo
Definition generic.h:242
OpenBabel::OBVirtualBond::GetBgn
unsigned int GetBgn()
Definition generic.h:247
OpenBabel::OBVirtualBond::Clone
virtual OBGenericData * Clone(OBBase *) const
Definition generic.h:245
OpenBabel::SpaceGroup
Handle crystallographic space group symmetry.
Definition spacegroup.h:36
OpenBabel::SpaceGroup::GetSpaceGroup
static const SpaceGroup * GetSpaceGroup(char const *name)
Definition spacegroup.cpp:372
OpenBabel::matrix3x3
Represents a real 3x3 matrix.
Definition matrix3x3.h:43
OpenBabel::vector3
Represents a vector in 3-dimensional real space.
Definition vector3.h:45
OpenBabel::OBGenericDataType
Classification of data stored via OBGenericData class and subclasses.
Definition base.h:63
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
OpenBabel::OBFreeGridPointIterator
std::vector< OBFreeGridPoint * >::iterator OBFreeGridPointIterator
A standard iterator over a vector of FreeGridPoints.
Definition generic.h:1100
OpenBabel::OBPairInteger
OBPairTemplate< int > OBPairInteger
Store arbitrary key/value integer data like OBPairData.
Definition generic.h:144
OpenBabel::OBPairBool
OBPairTemplate< bool > OBPairBool
Store arbitrary key/value boolean data like OBPairData.
Definition generic.h:148
OpenBabel::OBPairFloatingPoint
OBPairTemplate< double > OBPairFloatingPoint
Store arbitrary key/value floating point data like OBPairData.
Definition generic.h:146
OpenBabel::OBDataIterator
std::vector< OBGenericData * >::iterator OBDataIterator
A standard iterator over vectors of OBGenericData (e.g., inherited from OBBase).
Definition base.h:235
OpenBabel::Trim
std::string & Trim(std::string &txt)
Remove leading and trailing whitespace from a string (docs in tokenst.cpp).
Definition tokenst.cpp:135
obutil.h
Various utility methods.
spacegroup.h
Handle Crystallographic Space Groups.
OpenBabel::quad
A 4-element templated, based on the design of the STL pair<>.
Definition obutil.h:289
OpenBabel::triple
A 3-element templated, based on the design of the STL pair<>.
Definition obutil.h:253