scala::MetricTensor Class Reference

Metric tensor (from Clipper with extensions). More...

#include <hkl_datatypes.hh>

List of all members.

Public Member Functions

 MetricTensor ()
 null constructor
 MetricTensor (const ftype &a, const ftype &b, const ftype &c, const ftype &alph, const ftype &beta, const ftype &gamm)
 constructor: takes parameters of normal or inverse cell
 MetricTensor (const std::vector< Dtype > cell)
 constructor from cell dimension vector
 MetricTensor (const Mat33< Dtype > MetricMatrix)
 constructor from matrix
ftype lengthsq (const Vec3<> &v) const
 apply metric to vector
ftype lengthsq (const Vec3< int > &v) const
 apply metric to int vector
std::vector< Dtype > cell () const
 extract cell dimensions (real or reciprocal)
MetricTensor inverse () const
 invert real <-> reciprocal
Mat33< Dtype > matrix () const
 return as matrix
String format () const
 return formatted String representation

Detailed Description

Metric tensor (from Clipper with extensions).

The metric tensor is used to determine a distance in real or reciprocal space using fraction coordinates or Miller indices. It is symmetrical, so only the upper triangle is stored with the off-diagonal elements doubled.

Note that the metric tensor is independent of the orthogonalisation convention, although the reciprocal metric tensor [M] = [B]T [B] where [B] is a reciprocal orthogonalisation matrix


Constructor & Destructor Documentation

scala::MetricTensor::MetricTensor (  )  [inline]

null constructor

Null constructor

scala::MetricTensor::MetricTensor ( const ftype &  a,
const ftype &  b,
const ftype &  c,
const ftype &  alph,
const ftype &  beta,
const ftype &  gamm 
)

constructor: takes parameters of normal or inverse cell

Construct and initialise a metric tensor, given a set of real or reciprocal cell parameters.

Parameters:
a Length of a axis in Angstroms or reciprocal Angstroms.
b Length of b axis in Angstroms or reciprocal Angstroms.
c Length of c axis in Angstroms or reciprocal Angstroms.
alph Angle between b and c in degrees.
beta Angle between a and c in degrees.
gamm Angle between a and b in degrees.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Friends
Generated on Tue Mar 1 11:22:31 2011 for Pointless by  doxygen 1.6.3