Open Babel
3.0
|
#include <openbabel/generic.h>
Public Types | |
enum | LatticeType { Undefined, Triclinic, Monoclinic, Orthorhombic, Tetragonal, Rhombohedral, Hexagonal, Cubic } |
Protected Attributes | |
matrix3x3 | _mOrtho |
matrix3x3 | _mOrient |
vector3 | _offset |
std::string | _spaceGroupName |
const SpaceGroup * | _spaceGroup |
LatticeType | _lattice |
std::string | _attr |
unsigned int | _type |
DataOrigin | _source |
Used for storing information about periodic boundary conditions with conversion to/from translation vectors and (a, b, c, alpha, beta, gamma)
enum LatticeType |
OBUnitCell | ( | ) |
public constructor
OBUnitCell | ( | const OBUnitCell & | src | ) |
|
inline |
|
inlinevirtual |
Reimplemented from OBGenericData.
OBUnitCell & operator= | ( | const OBUnitCell & | src | ) |
void SetData | ( | const double | a, |
const double | b, | ||
const double | c, | ||
const double | alpha, | ||
const double | beta, | ||
const double | gamma | ||
) |
Constructs the cell matrix in lower triangular form from the values supplied.
Implements blue-obelisk:calculateOrthogonalisationMatrix
a | The length a |
b | The length b |
c | The length c |
alpha | The angle alpha |
beta | The angle beta |
gamma | The angle gamma |
Referenced by OBUnitCell::SetData().
Constructs the cell matrix using the supplied row vectors.
Implements blue-obelisk:calculateOrthogonalisationMatrix
v1 | The x-vector |
v2 | The y-vector |
v3 | The z-vector |
void SetData | ( | const matrix3x3 | m | ) |
Sets the unit cell matrix.
Implements blue-obelisk:calculateOrthogonalisationMatrix
m | The unit cell matrix (row vectors) |
void SetOffset | ( | const vector3 | v1 | ) |
Set the offset to the origin to v1
.
|
inline |
Set the space group for this unit cell. Does not create an OBSymmetryData entry
Referenced by OBUnitCell::FillUnitCell().
|
inline |
Set the space group symbol for this unit cell. Does not create an OBSymmetryData entry or attempt to convert between different symbol notations
|
inline |
Set the space group for this unit cell. Each spacegroup-symbol has a numeric equivalent which is easier to use to convert between notations. Does not create an OBSymmetryData entry or attempt to convert between different symbol notations
|
inline |
Set the Bravais lattice type for this unit cell.
void FillUnitCell | ( | OBMol * | mol | ) |
Duplicate symmetry-unique atoms to fill out the unit cell of the molecule, based on the known space group
double GetA | ( | ) |
Referenced by OBUnitCell::GetLatticeType().
double GetA | ( | ) | const |
double GetB | ( | ) |
Referenced by OBUnitCell::GetLatticeType().
double GetB | ( | ) | const |
double GetC | ( | ) |
Referenced by OBUnitCell::GetLatticeType().
double GetC | ( | ) | const |
double GetAlpha | ( | ) |
Referenced by OBUnitCell::GetLatticeType().
double GetAlpha | ( | ) | const |
double GetBeta | ( | ) |
Referenced by OBUnitCell::GetLatticeType().
double GetBeta | ( | ) | const |
double GetGamma | ( | ) |
Referenced by OBUnitCell::GetLatticeType().
double GetGamma | ( | ) | const |
vector3 GetOffset | ( | ) |
vector3 GetOffset | ( | ) | const |
|
inline |
Referenced by OBUnitCell::FillUnitCell().
|
inline |
|
inline |
|
inline |
LatticeType GetLatticeType | ( | int | spacegroup | ) |
spacegroup
) OBUnitCell::LatticeType GetLatticeType | ( | int | spacegroup | ) | const |
LatticeType GetLatticeType | ( | ) |
Referenced by OBUnitCell::GetLatticeType().
OBUnitCell::LatticeType GetLatticeType | ( | ) | const |
std::vector<vector3> GetCellVectors | ( | ) |
vector< vector3 > GetCellVectors | ( | ) | const |
matrix3x3 GetCellMatrix | ( | ) |
Access to the cell matrix as row vectors, useful for writing input files. Equivalent to the transpose of GetOrientationMatrix() * GetOrthoMatrix()
Referenced by OBUnitCell::GetCellVectors(), and OBUnitCell::GetCellVolume().
matrix3x3 GetCellMatrix | ( | ) | const |
matrix3x3 GetOrthoMatrix | ( | ) |
matrix3x3 GetOrthoMatrix | ( | ) | const |
matrix3x3 GetOrientationMatrix | ( | ) |
Used to convert fractional and cartesian coordinates if the cell is not oriented in standard form (a parallel to x axis, b in xy plane)
matrix3x3 GetOrientationMatrix | ( | ) | const |
matrix3x3 GetFractionalMatrix | ( | ) |
matrix3x3 GetFractionalMatrix | ( | ) | const |
Convenience function to convert fractional coordinates to cartesian coordinates. Returns
GetOrientationMatrix() * GetOrthoMatrix() * frac + GetOffset()
frac | Vector of fractional coordinates |
Referenced by OBUnitCell::FillUnitCell(), and OBUnitCell::WrapCartesianCoordinate().
Convenience function to convert cartesian coordinates to fractional coordinates. Returns
GetFractionalMatrix() * GetOrientationMatrix().inverse() * (cart - GetOffset())
cart | Vector of cartesian coordinates |
Referenced by OBUnitCell::FillUnitCell(), and OBUnitCell::WrapCartesianCoordinate().
Wraps cartesian coordinate to fall within the unit cell.
cart | Vector of cartesian coordinates |
Wraps fractional coordinate to fall within the unit cell.
frac | Vector of fractional coordinates |
Referenced by OBUnitCell::FillUnitCell(), and OBUnitCell::WrapCartesianCoordinate().
int GetSpaceGroupNumber | ( | std::string | name = "" | ) |
int GetSpaceGroupNumber | ( | std::string | name = "" | ) | const |
double GetCellVolume | ( | ) |
double GetCellVolume | ( | ) | const |
|
inlineinherited |
Set the attribute (key), which can be used to retrieve this data.
Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::ComparePairSecond(), OBMol::DoTransformations(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBForceField::GetAtomTypes(), OBMol::GetFormula(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().
|
inlineinherited |
Set the origin of this data, which can be used to filter the data.
Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::ComparePairSecond(), OBMol::DoTransformations(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(), OBMol::GetLSSR(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().
|
inlinevirtualinherited |
Referenced by OpenBabel::extract_thermochemistry(), and OBMoleculeFormat::MakeCombinedMolecule().
|
inlineinherited |
|
inlinevirtualinherited |
Base class returns a default value (the attribute type) but should never be called.
Reimplemented in OBPairData, and OBCommentData.
Referenced by OBDepict::AddAtomLabels(), OBDepict::DrawMolecule(), OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().
|
inlinevirtualinherited |
|
protected |
Referenced by OBUnitCell::CartesianToFractional(), OBUnitCell::FractionalToCartesian(), OBUnitCell::GetA(), OBUnitCell::GetAlpha(), OBUnitCell::GetB(), OBUnitCell::GetBeta(), OBUnitCell::GetC(), OBUnitCell::GetCellMatrix(), OBUnitCell::GetFractionalMatrix(), OBUnitCell::GetGamma(), OBUnitCell::GetOrthoMatrix(), OBUnitCell::operator=(), and OBUnitCell::SetData().
|
protected |
|
protected |
|
protected |
Referenced by OBUnitCell::GetSpaceGroupNumber(), OBUnitCell::operator=(), and OBUnitCell::SetData().
|
protected |
|
protected |
Referenced by OBUnitCell::GetLatticeType(), OBUnitCell::operator=(), and OBUnitCell::SetData().
|
protectedinherited |
attribute tag (e.g., "UnitCell", "Comment" or "Author")
Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().
|
protectedinherited |
attribute type – declared for each subclass
Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().
|
protectedinherited |
source of data for accounting
Referenced by OBConformerData::operator=(), OBSymmetryData::operator=(), OBTorsionData::operator=(), and OBAngleData::operator=().