#include <cell.h>
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 |
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.
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.
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 radians. | |
beta | Angle between a and c in radians. | |
gamm | Angle between a and b in radians. |