OBUnitCell Class Reference

Used for storing information about periodic boundary conditions with conversion to/from translation vectors and (a, b, c, alpha, beta, gamma). More...

#include <openbabel/generic.h>

Inheritance diagram for OBUnitCell:

Inheritance graph
[legend]
List of all members.

Public Types

enum  LatticeType {
  Undefined, Triclinic, Monoclinic, Orthorhombic,
  Tetragonal, Rhombohedral, Hexagonal, Cubic
}

Public Member Functions

 OBUnitCell ()
 OBUnitCell (const OBUnitCell &)
virtual OBGenericDataClone (OBBase *) const
 ~OBUnitCell ()
OBUnitCelloperator= (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 SetOffset (const vector3 v1)
void SetSpaceGroup (const std::string sg)
void SetSpaceGroup (const int sg)
void SetLatticeType (const LatticeType lt)
double GetA ()
double GetB ()
double GetC ()
double GetAlpha ()
double GetBeta ()
double GetGamma ()
vector3 GetOffset ()
const std::string GetSpaceGroup ()
LatticeType GetLatticeType (int spacegroup)
LatticeType GetLatticeType ()
std::vector< vector3GetCellVectors ()
matrix3x3 GetCellMatrix ()
matrix3x3 GetOrthoMatrix ()
matrix3x3 GetFractionalMatrix ()
int GetSpaceGroupNumber (std::string name)
double GetCellVolume ()
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

Protected Attributes

double _a
double _b
double _c
double _alpha
double _beta
double _gamma
vector3 _offset
vector3 _v1
vector3 _v2
vector3 _v3
std::string _spaceGroup
int _numericSpaceGroup
LatticeType _lattice
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description

Used for storing information about periodic boundary conditions with conversion to/from translation vectors and (a, b, c, alpha, beta, gamma).


Member Enumeration Documentation

enum LatticeType

Enumerator:
Undefined 
Triclinic 
Monoclinic 
Orthorhombic 
Tetragonal 
Rhombohedral  also called trigonal
Hexagonal 
Cubic 


Constructor & Destructor Documentation

OBUnitCell (  ) 

public constructor

OBUnitCell ( const OBUnitCell  ) 

~OBUnitCell (  )  [inline]


Member Function Documentation

virtual OBGenericData* Clone ( OBBase  )  const [inline, virtual]

Reimplemented from OBGenericData.

OBUnitCell & operator= ( const OBUnitCell  ) 

void SetData ( const double  a,
const double  b,
const double  c,
const double  alpha,
const double  beta,
const double  gamma 
) [inline]

Sets the vectors and angles of the unitcell.

Parameters:
a The length a
b The length b
c The length c
alpha The angle alpha
beta The angle beta
gamma The angle gamma

void SetData ( const vector3  v1,
const vector3  v2,
const vector3  v3 
)

Sets the vectors, angles and lengths of the unitcell.

The angles and lengths of the unitcell will be calculated from the vectors v1, v2 and v3. Those vectors will as well be stored internally. Implements blue-obelisk:convertCartesianIntoNotionalCoordinates

Parameters:
v1 The x-vector
v2 The y-vector
v3 The z-vector
See also:
OBUnitCell::GetCellVectors

void SetOffset ( const vector3  v1  )  [inline]

Set the offset to the origin to v1.

void SetSpaceGroup ( const std::string  sg  )  [inline]

Set the space group symbol for this unit cell. Does not create an OBSymmetryData entry or attempt to convert between different symbol notations

void SetSpaceGroup ( const int  sg  )  [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

void SetLatticeType ( const LatticeType  lt  )  [inline]

Set the Bravais lattice type for this unit cell.

double GetA (  )  [inline]

Returns:
vector a

double GetB (  )  [inline]

Returns:
vector b

double GetC (  )  [inline]

Returns:
vector c

double GetAlpha (  )  [inline]

Returns:
angle alpha

double GetBeta (  )  [inline]

Returns:
angle beta

double GetGamma (  )  [inline]

Returns:
angle gamma

vector3 GetOffset (  )  [inline]

Returns:
any offset in the origin of the periodic boundaries

const std::string GetSpaceGroup (  )  [inline]

Returns:
the text representation of the space group for this unit cell

OBUnitCell::LatticeType GetLatticeType ( int  spacegroup  ) 

Returns:
lattice type (based on the spacegroup)

OBUnitCell::LatticeType GetLatticeType (  ) 

Returns:
lattice type (based on angles and distances)

vector< vector3 > GetCellVectors (  ) 

Implements blue-obelisk:convertNotionalIntoCartesianCoordinates.

matrix3x3 GetCellMatrix (  ) 

Returns:
v1, v2, v3 cell vectors as a 3x3 matrix

matrix3x3 GetOrthoMatrix (  ) 

Implements blue-obelisk:calculateOrthogonalisationMatrix.

matrix3x3 GetFractionalMatrix (  ) 

Returns:
The fractionalization matrix, used for converting from Cartesian to fractional coords.

Matrix to convert from Cartesian to fractional Implements blue-obelisk:convertCartesianIntoFractionalCoordinates

int GetSpaceGroupNumber ( std::string  name  ) 

Returns:
The numeric value of the given spacegroup

double GetCellVolume (  ) 

Returns:
The cell volume (in Angstroms^3)

void SetAttribute ( const std::string &  v  )  [inline, inherited]

Set the attribute (key), which can be used to retrieve this data.

void SetOrigin ( const DataOrigin  s  )  [inline, inherited]

Set the origin of this data, which can be used to filter the data.

virtual const std::string& GetAttribute (  )  const [inline, virtual, inherited]

Returns:
The attribute (key), which can be used to retrieve this data

unsigned int GetDataType (  )  const [inline, inherited]

Returns:
the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue (  )  const [inline, virtual, inherited]

Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, OBPairData, and OBPairTemplate.

virtual DataOrigin GetOrigin (  )  const [inline, virtual, inherited]


Member Data Documentation

double _a [protected]

double _b [protected]

double _c [protected]

double _alpha [protected]

double _beta [protected]

double _gamma [protected]

vector3 _offset [protected]

offset for origin

vector3 _v1 [protected]

vector3 _v2 [protected]

vector3 _v3 [protected]

translation vectors

std::string _spaceGroup [protected]

int _numericSpaceGroup [protected]

LatticeType _lattice [protected]

std::string _attr [protected, inherited]

attribute tag (e.g., "UnitCell", "Comment" or "Author")

unsigned int _type [protected, inherited]

attribute type -- declared for each subclass

DataOrigin _source [protected, inherited]

source of data for accounting


The documentation for this class was generated from the following files: