50 #include "clipper_types.h"
72 {
return ( v[0]*(v[0]*m00 + v[1]*m01 + v[2]*m02) +
73 v[1]*(v[1]*m11 + v[2]*m12) + v[2]*(v[2]*m22) ); }
77 return h*(h*m00 + k*m01 + l*m02) + k*(k*m11 + l*m12) + l*(l*m22); }
81 ftype m00, m11, m22, m01, m02, m12;
97 const ftype& alpha=90.0f,
const ftype& beta=90.0f,
98 const ftype& gamma=90.0f );
99 inline const ftype& a()
const {
return a_; }
100 inline const ftype& b()
const {
return b_; }
101 inline const ftype& c()
const {
return c_; }
102 inline const ftype& alpha()
const {
return alpha_; }
103 inline const ftype& beta()
const {
return beta_; }
104 inline const ftype& gamma()
const {
return gamma_; }
111 ftype a_,b_,c_,alpha_,beta_,gamma_;
Cell_descr(const ftype &a, const ftype &b, const ftype &c, const ftype &alpha=90.0f, const ftype &beta=90.0f, const ftype &gamma=90.0f)
constructor: from cell parameters
Definition: cell.cpp:57
const ftype & volume() const
return cell volume
Definition: cell.h:155
3x3-matrix class
Definition: clipper_types.h:182
ftype b_star() const
get b*
Definition: cell.cpp:157
ftype alpha_star() const
get alpha*
Definition: cell.cpp:163
ftype64 ftype
ftype definition for floating point representation
Definition: clipper_precision.h:58
ftype lengthsq(const Vec3<> &v) const
apply metric to vector
Definition: cell.h:71
Cell object.
Definition: cell.h:121
ftype a_star() const
get a*
Definition: cell.cpp:154
const Metric_tensor & metric_reci() const
return reciprocal space metric tensor
Definition: cell.h:165
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
Definition: cell.cpp:93
bool is_null() const
test if object has been initialised
Definition: cell.cpp:151
cell description (automatically converts to radians)
Definition: cell.h:91
Metric tensor.
Definition: cell.h:63
ftype gamma_deg() const
get gamma in degrees
Definition: cell.cpp:76
void init(const Cell_descr &cell_)
initialiser
Definition: cell.cpp:113
const Mat33 & matrix_orth() const
return orthogonalisation matrix
Definition: cell.h:159
bool equals(const Cell &other, const ftype tol=1.0) const
test equality with another cell
Definition: cell.cpp:181
String extension with simple parsing methods.
Definition: clipper_types.h:64
String format() const
return formatted String representation
Definition: cell.cpp:103
ftype alpha_deg() const
get alpha in degrees
Definition: cell.cpp:68
ftype beta_deg() const
get alpha in degrees
Definition: cell.cpp:72
const Metric_tensor & metric_real() const
return real space metric tensor
Definition: cell.h:163
ftype lengthsq(const Vec3< int > &v) const
apply metric to int vector
Definition: cell.h:75
const Mat33 & matrix_frac() const
return fractionalisation matrix
Definition: cell.h:161
ftype gamma_star() const
get gamma*
Definition: cell.cpp:171
Cell(const Cell_descr &cell_)
constructor: takes a Cell descriptor
Definition: cell.h:127
ftype c_star() const
get c*
Definition: cell.cpp:160
ftype beta_star() const
get beta*
Definition: cell.cpp:167
const Cell_descr & descr() const
return cell dimensions
Definition: cell.h:153
Cell()
null constructor: must initialise later
Definition: cell.h:125
String format() const
return formatted String representation
Definition: cell.cpp:80