45 #ifndef CLIPPER_COORDS
46 #define CLIPPER_COORDS
50 #include "spacegroup.h"
51 #include "clipper_stats.h"
57 class Grid;
class Grid_sampling;
class Grid_range;
58 class Coord_grid;
class Coord_map;
59 class Coord_reci_frac;
class Coord_reci_orth;
60 class Coord_frac;
class Coord_orth;
61 class U_aniso_frac;
class U_aniso_orth;
90 inline HKL_class() { epsilon_ = 0; allowed_ = 255; }
97 {
if ( centric() )
return 2.0*
ftype(epsilon_);
98 else return ftype(epsilon_); }
101 inline bool centric()
const {
return allowed_ != 255; }
102 inline bool sys_abs()
const {
return epsilon_ == 0; }
104 unsigned char epsilon_, allowed_;
124 RTop_orth(
const std::vector<Coord_orth>& src,
const std::vector<Coord_orth>& tgt );
126 RTop_orth(
const std::vector<Coord_orth>& src,
const std::vector<Coord_orth>& tgt,
const std::vector<ftype>& wgt );
128 template<
class T>
RTop_orth(
const T& src,
const T& tgt );
151 inline HKL(
const int& h,
const int& k,
const int& l ) :
153 inline const int& h()
const {
return (*
this)[0]; }
154 inline const int& k()
const {
return (*
this)[1]; }
155 inline const int& l()
const {
return (*
this)[2]; }
156 inline int& h() {
return (*
this)[0]; }
157 inline int& k() {
return (*
this)[1]; }
158 inline int& l() {
return (*
this)[2]; }
172 friend inline HKL operator -(
const HKL& h1)
173 {
return HKL( -h1.h(), -h1.k(), -h1.l() ); }
174 friend inline HKL operator +(
const HKL& h1,
const HKL& h2)
175 {
return HKL( h1.h()+h2.h(), h1.k()+h2.k(), h1.l()+h2.l() ); }
176 friend inline HKL operator -(
const HKL& h1,
const HKL& h2)
177 {
return HKL( h1.h()-h2.h(), h1.k()-h2.k(), h1.l()-h2.l() ); }
178 friend inline HKL operator *(
const int& s,
const HKL& h1)
179 {
return HKL( s*h1.h(), s*h1.k(), s*h1.l() ); }
180 friend inline HKL operator *(
const Isymop& op,
const HKL& h1)
181 {
return HKL( h1 * op.rot() ); }
193 inline const ftype& xs()
const {
return (*
this)[0]; }
194 inline const ftype& ys()
const {
return (*
this)[1]; }
195 inline const ftype& zs()
const {
return (*
this)[2]; }
223 inline const ftype& us()
const {
return (*
this)[0]; }
224 inline const ftype& vs()
const {
return (*
this)[1]; }
225 inline const ftype& ws()
const {
return (*
this)[2]; }
243 inline Coord_grid(
const int& u,
const int& v,
const int& w ) :
248 inline const int& u()
const {
return (*
this)[0]; }
249 inline const int& v()
const {
return (*
this)[1]; }
250 inline const int& w()
const {
return (*
this)[2]; }
251 inline int& u() {
return (*
this)[0]; }
252 inline int& v() {
return (*
this)[1]; }
253 inline int& w() {
return (*
this)[2]; }
258 inline Coord_frac
coord_frac(
const Grid_sampling& g )
const;
261 {
return op * (*this); }
273 inline bool last(
const Grid& g )
const;
287 {
return (
Coord_grid( -r1.u(), -r1.v(), -r1.w() ) ); }
291 {
return (
Coord_grid( s*r1.u(), s*r1.v(), s*r1.w() ) ); }
293 {
return (r1.u()==r2.u() && r1.v()==r2.v() && r1.w()==r2.w()); }
295 {
return (r1.u()!=r2.u() || r1.v()!=r2.v() || r1.w()!=r2.w()); }
297 {
return Coord_grid( op.rot() * r1 + op.trn() ); }
312 inline const ftype& x()
const {
return (*
this)[0]; }
313 inline const ftype& y()
const {
return (*
this)[1]; }
314 inline const ftype& z()
const {
return (*
this)[2]; }
321 {
return op*(*this); }
332 {
return Coord_orth( -x1.x(), -x1.y(), -x1.z() ); }
336 {
return Coord_orth( s*x1.x(), s*x1.y(), s*x1.z() ); }
350 inline const ftype& u()
const {
return (*
this)[0]; }
351 inline const ftype& v()
const {
return (*
this)[1]; }
352 inline const ftype& w()
const {
return (*
this)[2]; }
363 {
return op*(*this); }
366 {
return Coord_frac(u()-rint(u()),v()-rint(v()),w()-rint(w())); }
369 {
return Coord_frac(u()-floor(u()),v()-floor(v()),w()-floor(w())); }
377 {
return Coord_frac( -u1.u(), -u1.v(), -u1.w() ); }
378 friend inline Coord_frac operator +(
const Coord_frac& u1,
const Coord_frac& u2) {
return Coord_frac( u1.u()+u2.u(), u1.v()+u2.v(), u1.w()+u2.w() ); }
379 friend inline Coord_frac operator -(
const Coord_frac& u1,
const Coord_frac& u2) {
return Coord_frac( u1.u()-u2.u(), u1.v()-u2.v(), u1.w()-u2.w() ); }
380 friend inline Coord_frac operator *(
const ftype& s,
const Coord_frac& u1)
381 {
return Coord_frac( s*u1.u(), s*u1.v(), s*u1.w() ); }
382 friend inline Coord_frac operator *(
const RTop_frac& op,
const Coord_frac& x1) {
return Coord_frac( op.rot() * x1 + op.trn() ); }
408 inline const ftype& u()
const {
return (*
this)[0]; }
409 inline const ftype& v()
const {
return (*
this)[1]; }
410 inline const ftype& w()
const {
return (*
this)[2]; }
413 {
return Coord_map( -u1.u(), -u1.v(), -u1.w() ); }
415 {
return Coord_map( u1.u()+u2.u(), u1.v()+u2.v(), u1.w()+u2.w() ); }
417 {
return Coord_map( u1.u()-u2.u(), u1.v()-u2.v(), u1.w()-u2.w() ); }
419 {
return Coord_map( s*u1.u(), s*u1.v(), s*u1.w() ); }
435 Mat33sym<>( u, u, u, 0.0, 0.0, 0.0 ) {}
439 Mat33sym<>( u11, u22, u33, u12, u13, u23 ) {}
446 friend U_aniso_orth operator +(
const U_aniso_orth& u1,
const U_aniso_orth& u2) {
return U_aniso_orth( u1.mat00()+u2.mat00(), u1.mat11()+u2.mat11(), u1.mat22()+u2.mat22(), u1.mat01()+u2.mat01(), u1.mat02()+u2.mat02(), u1.mat12()+u2.mat12() ); }
465 Mat33sym<>( u11, u22, u33, u12, u13, u23 ) {}
470 friend U_aniso_frac operator +(
const U_aniso_frac& u1,
const U_aniso_frac& u2) {
return U_aniso_frac( u1.mat00()+u2.mat00(), u1.mat11()+u2.mat11(), u1.mat22()+u2.mat22(), u1.mat01()+u2.mat01(), u1.mat02()+u2.mat02(), u1.mat12()+u2.mat12() ); }
483 inline Grid(
const int& nu,
const int& nv,
const int& nw ) :
485 inline const int& nu()
const {
return (*
this)[0]; }
486 inline const int& nv()
const {
return (*
this)[1]; }
487 inline const int& nw()
const {
return (*
this)[2]; }
488 inline int size()
const {
return nu()*nv()*nw(); }
491 inline bool in_grid(
Coord_grid g )
const {
return (g.u() >= 0 && g.u() < nu() && g.v() >= 0 && g.v() < nv() && g.w() >= 0 && g.w() < nw()); }
522 Grid( nu, nv, nw ) {}
565 {
return ( m00*itype64(h.h()*h.h()) + m11*itype64(h.k()*h.k()) +
566 m22*itype64(h.l()*h.l()) + m01*itype64(h.h()*h.k()) +
567 m02*itype64(h.h()*h.l()) + m12*itype64(h.k()*h.l()) )
568 <= ( sqrt_limit_value*sqrt_limit_value ); }
573 {
return ( h1.m00==h2.m00 && h1.m11==h2.m11 && h1.m22==h2.m22 &&
574 h1.m01==h2.m01 && h1.m02==h2.m02 && h1.m12==h2.m12 ); }
576 static itype64 sqrt_limit_value;
577 itype64 m00, m11, m22, m01, m02, m12;
602 bool in_grid(
Coord_grid g )
const {
return (g.u() >= min_.u() && g.u() <= max_.u() && g.v() >= min_.v() && g.v() <= max_.v() && g.w() >= min_.w() && g.w() <= max_.w()); }
652 ftype occupancy_, u_iso_;
670 template<
class T>
Atom_list(
const T& list ) {
for (
int i = 0; i < list.size(); i++ ) push_back(
Atom( list[i] ) ); }
685 std::vector<Coord_orth> vsrc( src.size() );
686 std::vector<Coord_orth> vtgt( tgt.size() );
687 for (
int i = 0; i < src.size(); i++ ) vsrc[i] = src[i].coord_orth();
688 for (
int i = 0; i < tgt.size(); i++ ) vtgt[i] = tgt[i].coord_orth();
702 {
return op*(*this); }
714 { w()++;
if ( w() >= g.nw() ) { w() = 0; v()++;
if ( v() >= g.nv() ) { v() = 0; u()++; } }
return *
this; }
719 { w()++;
if ( w() > g.
max().w() ) { w() = g.
min().w(); v()++;
if ( v() > g.
max().v() ) { v() = g.
min().v(); u()++; } }
return *
this; }
724 {
return ( u() >= g.nu() ); }
729 {
return ( u() > g.
max().u() ); }
735 {
return ( u()*g.nv() + v() )*g.nw() + w(); }
741 { u() =
index/(g.nv()*g.nw()); v() = (
index/g.nw()) % g.nv(); w() = (
index) % g.nw(); }
767 {
return xs()*xs() + ys()*ys() + zs()*zs(); }
780 {
return x()*x()+y()*y()+z()*z(); }
Coord_map(const Coord_grid &c)
constructor: from Coord_grid
Definition: coords.h:395
Grid coordinate.
Definition: coords.h:236
Atom_list(const T &list)
Constructor: from vector-like list of atom-like objects.
Definition: coords.h:670
Atom(const T &atom)
Constructor: from atom-like object.
Definition: coords.h:626
Coord_frac transform(const RTop_frac &op) const
return transformed coordinate
Definition: coords.h:362
3x3-matrix class
Definition: clipper_types.h:182
void add_border(const int b)
border: increase grid to include given border
Definition: coords.cpp:419
U_aniso_orth u_aniso_orth(const Cell &cell) const
fractional-orthogonal conversion
Definition: coords.cpp:623
Coord_grid(const Grid &g, const int &index)
constructor: from a grid and an index in that grid
Definition: coords.h:246
ftype invresolsq(const Cell &cell) const
return inverse resolution squared for this reflection in given cell
Definition: coords.h:772
Mat33 matrix_grid_frac() const
return matrix which converts grid to fractional coordinates
Definition: coords.cpp:510
Coord_grid coord_grid(const Grid &g) const
fractional-grid coordinate conversion
Definition: coords.h:794
int index(const Grid &g) const
grid indexing operator
Definition: coords.h:734
HKL_sampling()
null constructor
Definition: coords.cpp:540
Orthogonal operator class.
Definition: coords.h:112
Coord_grid deindex(const int &index) const
grid deindexing operator
Definition: coords.h:607
ftype u_iso() const
return nearest isotropic U
Definition: coords.cpp:605
Coord_grid ceil() const
return integer Coord_grid above this coordinate
Definition: coords.h:407
Atom()
null constructor
Definition: coords.h:624
U_aniso_orth transform(const RTop_orth &op) const
return transformed U_aniso
Definition: coords.cpp:616
Vec3< int > unit() const
return unit vector with same direction as this vector
Definition: clipper_types.h:123
static const ftype & pi()
pi
Definition: clipper_util.h:162
void init(const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5)
initialiser: from Spacegroup, Cell, Resolution, Shannon rate
Definition: coords.cpp:457
void set_occupancy(const ftype &s)
set occupancy
Definition: coords.cpp:636
Coord_map coord_map() const
convert to Coord_map
Definition: coords.h:747
String format() const
return formatted String representation
Definition: coords.cpp:272
Coord_reci_frac coord_reci_frac() const
return fractional reciprocal coordinate (i.e. non-integer HKL)
Definition: coords.h:760
HKL hkl() const
round to HKL
Definition: coords.h:219
RTop_orth inverse() const
inverse operator
Definition: coords.cpp:225
HKL_class()
null constructor
Definition: coords.h:90
String format() const
return formatted String representation
Definition: coords.cpp:592
ftype epsilonc() const
get epsilon for acentric, 2x epsilon for centric
Definition: coords.h:96
U_aniso_orth(const ftype &u11, const ftype &u22, const ftype &u33, const ftype &u12, const ftype &u13, const ftype &u23)
constructor: from Uij
Definition: coords.h:437
Resolution(const ftype &resol_)
constructor: from ftype
Definition: coords.cpp:53
Coord_reci_orth coord_reci_orth(const Cell &cell) const
orthogonal-fractional reciprocal space coordinate conversion
Definition: coords.h:763
ftype64 ftype
ftype definition for floating point representation
Definition: clipper_precision.h:58
Integerised symmetry matrix.
Definition: symop.h:108
Coord_grid coord_grid() const
return integer Coord_grid nearest this coordinate
Definition: coords.h:403
fractional (cell) coordinates
Definition: coords.h:342
const ftype & limit() const
get resolution limit
Definition: coords.cpp:61
String format() const
return formatted String representation
Definition: coords.cpp:327
fractional reciprocal coordinate (i.e. non-integer hkl)
Definition: coords.h:208
Coord_grid(const Vec3< int > v)
constructor: copy/convert
Definition: coords.h:241
Coord_frac coord_frac(const Cell &cell) const
orthogonal-fractional coordinate conversion
Definition: coords.h:782
Resolution in angstroms.
Definition: coords.h:68
const Coord_orth & coord_orth() const
get atom orthogonal (Angstrom) coordinate
Definition: coords.h:630
Grid_sampling(const int &nu, const int &nv, const int &nw)
constructor: from nu, nv, nw
Definition: coords.h:521
ftype lengthsq(const Vec3<> &v) const
apply metric to vector
Definition: cell.h:71
Resolution resolution(const Cell &cell) const
return approximate resolution given cell
Definition: coords.cpp:576
Spacegroup object.
Definition: spacegroup.h:172
bool in_grid(Coord_grid g) const
determine if a point is in the grid
Definition: coords.h:491
reflection class
Definition: coords.h:86
ftype invresolsq(const Cell &cell) const
return inverse resolution squared for this reflection in given cell
Definition: coords.h:757
Cell object.
Definition: cell.h:121
String format() const
return formatted String representation
Definition: coords.cpp:358
ftype invresolsq() const
return inverse resolution squared for this coord
Definition: coords.h:766
RTop_orth(const Mat33<> &r, const Vec3<> &t)
constructor: from rotation and translation
Definition: coords.h:122
const Metric_tensor & metric_reci() const
return reciprocal space metric tensor
Definition: cell.h:165
Coord_map(const ftype &u, const ftype &v, const ftype &w)
constructor: from u,v,w
Definition: coords.h:398
Anisotropic orthogonal atomic displacement parameters.
Definition: coords.h:426
void set_coord_orth(const Coord_orth &s)
set coord_orth
Definition: coords.cpp:635
bool in_resolution(const HKL &h) const
test if a reflection is within the resolution limit
Definition: coords.h:564
ftype sym_phase_shift(const Symop &op) const
return symmetry phase shift for this HKL under op
Definition: coords.h:707
Coord_frac lattice_copy_near(const Coord_frac &n) const
return lattice copy near the specified coordinate
Definition: coords.h:371
Coord_grid(const int &u, const int &v, const int &w)
constructor: from u,v,w
Definition: coords.h:243
Coord_map(const Vec3<> &v)
constructor: copy/convert
Definition: coords.h:392
Coord_frac coord_frac(const Grid &g) const
grid-fractional coordinate conversion
Definition: coords.h:797
String format() const
return formatted String representation
Definition: coords.cpp:348
Compressed form for 3x3 symmetric matrix class.
Definition: clipper_types.h:56
Grid_range Grid_map
Obsolete form for Grid_range.
Definition: coords.h:612
Coord_reci_orth coord_reci_orth(const Cell &cell) const
fractional-orthogonal reciprocal space coordinate conversion
Definition: coords.h:775
bool is_null() const
test for null atom: atom is null is coord is null
Definition: coords.h:645
const ftype & u_iso() const
get atom orthogonal isotropic U value
Definition: coords.h:634
map coordinate: this is like Coord_grid, but non-integer
Definition: coords.h:387
Coord_orth screw_translation() const
return screw translation
Definition: coords.cpp:251
String format() const
return formatted String representation
Definition: coords.cpp:363
Grid_sampling()
null constructor
Definition: coords.h:519
Coord_reci_frac coord_reci_frac(const Cell &cell) const
orthogonal-fractional reciprocal space coordinate conversion
Definition: coords.h:769
Coord_reci_frac(const HKL &hkl)
constructor: from HKL
Definition: coords.h:216
Atom list class.
Definition: coords.h:662
reflection 'Miller' index
Definition: coords.h:145
Atom class.
Definition: coords.h:620
U_aniso_frac(const ftype &u11, const ftype &u22, const ftype &u33, const ftype &u12, const ftype &u13, const ftype &u23)
constructor: from Uij
Definition: coords.h:463
int index(const Coord_grid &c) const
grid indexing operator
Definition: coords.h:494
bool in_grid(Coord_grid g) const
determine if a point is in the grid
Definition: coords.h:602
Coord_frac lattice_copy_zero() const
return lattice copy nearest origin
Definition: coords.h:365
Atom_list(const std::vector< Atom > &list)
constructor: from std::vector<Atom>
Definition: coords.h:668
int size() const
return size of grid array
Definition: coords.h:489
String format() const
return formatted String representation
Definition: coords.cpp:277
generic grid
Definition: coords.h:479
static ftype torsion(const Coord_orth &x1, const Coord_orth &x2, const Coord_orth &x3, const Coord_orth &x4)
Return torsion between four coord orths.
Definition: coords.cpp:316
const Coord_grid & next(const Grid &g)
increment in storage order (see index())
Definition: coords.h:713
Grid sampling of a unit cell.
Definition: coords.h:515
RTop_orth()
null constructor
Definition: coords.h:116
String format() const
return formatted String representation
Definition: coords.cpp:353
const String & element() const
get atom element name: e.g. "C", "N", "Zn2+"
Definition: coords.h:628
const Mat33 & matrix_orth() const
return orthogonalisation matrix
Definition: cell.h:159
const Coord_grid & max() const
access grid limits
Definition: coords.h:598
Anisotropic fractional atomic displacement parameters.
Definition: coords.h:455
U_aniso_frac(const Mat33sym<> &m)
constructor: from Mat33sym
Definition: coords.h:461
static int intc(const ftype &a)
Truncate-to-integer above: int(ceil(a))
Definition: clipper_util.h:131
Coord_frac symmetry_copy_near(const Spacegroup &spgr, const Cell &cell, const Coord_frac &n) const
return symmetry copy near the specified coordinate
Definition: coords.cpp:331
U_aniso_orth(const ftype &u)
constructor: from isotropic U
Definition: coords.h:434
void set_u_iso(const ftype &s)
set u_iso
Definition: coords.cpp:637
Coord_reci_frac transform(const RTop_frac &op) const
return transformed coordinate
Definition: coords.h:229
String format() const
return formatted String representation
Definition: coords.cpp:282
Coord_map coord_map(const Grid &g) const
fractional-grid coordinate conversion
Definition: coords.h:791
String extension with simple parsing methods.
Definition: clipper_types.h:64
U_aniso_frac()
null constructor
Definition: coords.h:459
Grid_range()
null constructor
Definition: coords.h:588
const ftype & occupancy() const
get atom occupancy
Definition: coords.h:632
static const ftype & twopi()
2 pi
Definition: clipper_util.h:164
Coord_orth transform(const RTop_orth &op) const
return transformed coordinate
Definition: coords.h:320
static RTop_orth identity()
return identity operator
Definition: coords.cpp:263
bool is_null() const
test if object has been initialised
Definition: coords.cpp:532
bool is_null() const
test if object has been initialised
Definition: coords.cpp:590
static ftype angle(const Coord_orth &x1, const Coord_orth &x2, const Coord_orth &x3)
Return angle between three coord orths.
Definition: coords.cpp:311
void set_element(const String &s)
set element
Definition: coords.cpp:634
orthogonal reciprocal coordinate (length of which is invresolsq)
Definition: coords.h:186
U_aniso_orth(const Mat33sym<> &m)
constructor: from Mat33sym
Definition: coords.h:432
static int intr(const ftype &a)
Round-to-integer: int(round(a))
Definition: clipper_util.h:133
static ftype mod(const ftype &a, const ftype &b)
Corrected mod.
Definition: clipper_util.h:136
Fractional operator class.
Definition: symop.h:64
Coord_reci_orth transform(const RTop_orth &op) const
return transformed coordinate
Definition: coords.h:201
U_aniso_frac u_aniso_frac(const Cell &cell) const
orthogonal-fractional conversion
Definition: coords.cpp:611
ftype epsilon() const
get epsilon
Definition: coords.h:94
Coord_grid deindex(const int &index) const
grid deindexing operator
Definition: coords.h:496
ftype lengthsq() const
return square of length of vector in Angstroms
Definition: coords.h:779
const Coord_grid & min() const
access grid limits
Definition: coords.h:596
Grid range class: defines array limits for a grid.
Definition: coords.h:584
Rotation-translation operator.
Definition: clipper_types.h:322
HKL hkl_limit() const
return limiting values of H, K, L
Definition: coords.cpp:560
RTop_orth(const Mat33<> &r)
constructor: from rotation
Definition: coords.h:120
Crystallographic symmetry operator.
Definition: symop.h:92
ftype invresolsq_limit() const
get invresolsq limit
Definition: coords.cpp:65
const Metric_tensor & metric_real() const
return real space metric tensor
Definition: cell.h:163
void transform(const RTop_orth rt)
apply a rotation-translation operator (RTop) to the atom
Definition: coords.cpp:645
Coord_frac lattice_copy_unit() const
return lattice copy in unit box (0...1,0...1,0...1)
Definition: coords.h:368
int index(const Coord_grid &c) const
grid indexing operator
Definition: coords.h:605
Coord_grid transform(const Isymop &op) const
return transformed coordinate
Definition: coords.h:260
RTop_orth(const RTop<> &o)
constructor: copy/convert
Definition: coords.h:118
const Mat33 & matrix_frac() const
return fractionalisation matrix
Definition: cell.h:161
bool is_null() const
test if value has been initialised
Definition: coords.cpp:69
bool last(const Grid &g) const
test if done in storage order (see index())
Definition: coords.h:723
HKL transform(const Symop &op) const
return transformed hkl
Definition: coords.h:696
Coord_frac coord_frac(const Grid_sampling &g) const
convert to Coord_frac using given Grid_sampling
Definition: coords.h:752
static ftype length(const Coord_orth &x1, const Coord_orth &x2)
Return length of vector between two coord orths.
Definition: coords.cpp:307
const U_aniso_orth & u_aniso_orth() const
get atom orthogonal anisotropic U value
Definition: coords.h:636
bool is_null() const
test for null vector
Definition: clipper_types.h:130
void set_u_aniso_orth(const U_aniso_orth &s)
set u_aniso
Definition: coords.cpp:638
void init(const ftype &resol_)
initialiser: from ftype
Definition: coords.cpp:57
HKL sampling of reciprocal space.
Definition: coords.h:552
static int intf(const ftype &a)
Truncate-to-integer: int(floor(a))
Definition: clipper_util.h:129
ftype allowed() const
get allowed phase
Definition: coords.h:100
Atom_list()
null constructor
Definition: coords.h:666
void deindex(const Grid &g, const int &index)
grid deindexing operator
Definition: coords.h:740
Coord_orth axis_coordinate_near(const Coord_orth ¢re) const
return point on axis near the specified coordinate
Definition: coords.cpp:230
Coord_grid floor() const
return integer Coord_grid below this coordinate
Definition: coords.h:405
U_aniso_frac transform(const RTop_frac &op) const
return transformed U_aniso
Definition: coords.cpp:628
Coord_orth coord_orth(const Cell &cell) const
fractional-orthogonal coordinate conversion
Definition: coords.h:788
U_aniso_orth()
null constructor
Definition: coords.h:430
RTop_frac rtop_frac(const Cell &cell) const
orthogonal-fractional conversion
Definition: coords.cpp:219
Coord_orth(const Coord_orth &x1, const Coord_orth &x2, const Coord_orth &x3, const ftype &length, const ftype &angle, const ftype &torsion)
constructor: from 3 coords and bond length, angle, torsion
Definition: coords.cpp:295
Mat33 matrix_frac_grid() const
return matrix which converts fractional to grid coordinates
Definition: coords.cpp:522
ftype lengthsq(const Cell &cell) const
return square of length of vector in Angstroms
Definition: coords.h:785
orthogonal (Angstrom) coordinates
Definition: coords.h:302