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