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_; }
105 ftype alpha_deg()
const;
106 ftype beta_deg()
const;
107 ftype gamma_deg()
const;
111 ftype a_,b_,c_,alpha_,beta_,gamma_;
132 bool is_null()
const;
134 ftype a_star()
const;
135 ftype b_star()
const;
136 ftype c_star()
const;
137 ftype alpha_star()
const;
138 ftype beta_star()
const;
139 ftype gamma_star()
const;
157 bool equals(
const Cell& other,
const ftype tol=1.0 )
const;
const ftype & alpha() const
get alpha
Definition: cell.h:102
Cell(const Cell_descr &cell_)
constructor: takes a Cell descriptor
Definition: cell.h:127
const ftype & beta() const
get beta
Definition: cell.h:103
ftype lengthsq(const Vec3<> &v) const
apply metric to vector
Definition: cell.h:71
cell description (automatically converts to radians)
Definition: cell.h:91
const ftype & volume() const
return cell volume
Definition: cell.h:155
const Cell_descr & descr() const
return cell dimensions
Definition: cell.h:153
ftype64 ftype
ftype definition for floating point representation
Definition: clipper_precision.h:58
Cell object.
Definition: cell.h:121
const Mat33 & matrix_frac() const
return fractionalisation matrix
Definition: cell.h:161
const ftype & c() const
get c
Definition: cell.h:101
Cell_descr()
null constructor
Definition: cell.h:94
String extension with simple parsing methods.
Definition: clipper_types.h:64
const Metric_tensor & metric_real() const
return real space metric tensor
Definition: cell.h:163
const ftype & b() const
get b
Definition: cell.h:100
String format() const
return formatted String representation
Definition: cell.cpp:103
Cell()
null constructor: must initialise later
Definition: cell.h:125
const ftype & a() const
get a
Definition: cell.h:99
Metric tensor.
Definition: cell.h:63
const ftype & gamma() const
get gamma
Definition: cell.h:104
const Metric_tensor & metric_reci() const
return reciprocal space metric tensor
Definition: cell.h:165
Metric_tensor()
null constructor
Definition: cell.h:67
const Mat33 & matrix_orth() const
return orthogonalisation matrix
Definition: cell.h:159
ftype lengthsq(const Vec3< int > &v) const
apply metric to int vector
Definition: cell.h:75
3x3-matrix class
Definition: clipper_types.h:182