Clipper
Public Member Functions
clipper::Metric_tensor Class Reference

Metric tensor. More...

#include <cell.h>

List of all members.

Public Member Functions

 Metric_tensor ()
 null constructor
 Metric_tensor (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
ftype lengthsq (const Vec3<> &v) const
 apply metric to vector
ftype lengthsq (const Vec3< int > &v) const
 apply metric to int vector
String format () const
 return formatted String representation

Detailed Description

Metric tensor.

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.


Constructor & Destructor Documentation

clipper::Metric_tensor::Metric_tensor ( ) [inline]

null constructor

Null constructor

clipper::Metric_tensor::Metric_tensor ( 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:
aLength of a axis in Angstroms or reciprocal Angstroms.
bLength of b axis in Angstroms or reciprocal Angstroms.
cLength of c axis in Angstroms or reciprocal Angstroms.
alphAngle between b and c in radians.
betaAngle between a and c in radians.
gammAngle between a and b in radians.

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