Clipper
|
Grid sampling of a unit cell. More...
#include <coords.h>
Public Member Functions | |
Grid_sampling () | |
null constructor | |
Grid_sampling (const int &nu, const int &nv, const int &nw) | |
constructor: from nu, nv, nw | |
Grid_sampling (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5) | |
constructor: from Spacegroup, Cell, Resolution, Shannon rate More... | |
void | init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5) |
initialiser: from Spacegroup, Cell, Resolution, Shannon rate More... | |
Mat33 | matrix_grid_frac () const |
return matrix which converts grid to fractional coordinates More... | |
Mat33 | matrix_frac_grid () const |
return matrix which converts fractional to grid coordinates More... | |
bool | is_null () const |
test if object has been initialised More... | |
const int & | nu () const |
const int & | nv () const |
const int & | nw () const |
int | size () const |
int | index (const Coord_grid &c) const |
Coord_grid | deindex (const int &index) const |
const String | format () const |
![]() | |
Grid () | |
null constructor | |
Grid (const int &nu, const int &nv, const int &nw) | |
constructor: from nu,nv,nw | |
const int & | nu () const |
get nu | |
const int & | nv () const |
get nv | |
const int & | nw () const |
get nw | |
int | size () const |
return size of grid array | |
bool | in_grid (Coord_grid g) const |
determine if a point is in the grid | |
int | index (const Coord_grid &c) const |
grid indexing operator | |
Coord_grid | deindex (const int &index) const |
grid deindexing operator | |
String | format () const |
return formatted String representation More... | |
void | debug () const |
![]() | |
Vec3 () | |
null constructor | |
Vec3 (const int &v0, const int &v1, const int &v2) | |
constructor: from individual values | |
Vec3 (const Vec3< TT > &v) | |
constructor: copy/convert | |
bool | equals (const Vec3< int > &v, const int &tol) const |
test equality | |
const int & | operator[] (const int &i) const |
get element | |
int & | operator[] (const int &i) |
set element | |
Vec3< int > | unit () const |
return unit vector with same direction as this vector | |
bool | is_null () const |
test for null vector | |
String | format () const |
return formatted String representation | |
const Vec3< int > & | operator+= (const Vec3< int > &v) |
add another vector to this one | |
const Vec3< int > & | operator-= (const Vec3< int > &v) |
subtract another vector from this one | |
Additional Inherited Members | |
![]() | |
static Vec3< int > | zero () |
return zero vector | |
static Vec3< int > | null () |
return null vector (only valid for floating point types) | |
static int | dot (const Vec3< int > &v1, const Vec3< int > &v2) |
Vector dot product (equivalent to *) | |
static Vec3< int > | cross (const Vec3< int > &v1, const Vec3< int > &v2) |
Vector cross product. | |
Grid sampling of a unit cell.
This class represents the grid sampling of a unit cell. It is otherwise identical to its parent, clipper::Grid_cell, but has an additional constructor which takes a spacegroup, cell and resolution and produces an appropriate grid obeying all of the symmetry constraints, and using efficient factors for the calculation of FFTs.
clipper::Grid_sampling::Grid_sampling | ( | const Spacegroup & | spacegroup, |
const Cell & | cell, | ||
const Resolution & | resol, | ||
const ftype | rate = 1.5 |
||
) |
constructor: from Spacegroup, Cell, Resolution, Shannon rate
A grid is chosen to represent the specified cell at the given resolution, obeying any restrictions imposed by the spacegroup. A slightly finer grid may be chosen if doing so is liable to significantly increase the speed of FFTs on that grid.
spacegroup | The spacegroup which the grid must obey. |
cell | The cell which the grid must contain. |
resol | The resolution to which the grid must sample. |
rate | The linear Shannon rate (oversampling) required. If rate = 1, the grid spaceing will be half the resolution (the the minimum required). For a grid spaceing of resol/3, use the default rate=1.5. |
void clipper::Grid_sampling::init | ( | const Spacegroup & | spacegroup, |
const Cell & | cell, | ||
const Resolution & | resol, | ||
const ftype | rate = 1.5 |
||
) |
initialiser: from Spacegroup, Cell, Resolution, Shannon rate
A grid is chosen to represent the specified cell at the given resolution, obeying any restrictions imposed by the spacegroup. A slightly finer grid may be chosen if doing so is liable to significantly increase the speed of FFTs on that grid.
spacegroup | The spacegroup which the grid must obey. |
cell | The cell which the grid must contain. |
resol | The resolution to which the grid must sample. |
rate | The linear Shannon rate (oversampling) required. If rate = 1, the grid spaceing will be half the resolution (the the minimum required). For a grid spaceing of resol/3, use the default rate=1.5. |
Mat33 clipper::Grid_sampling::matrix_grid_frac | ( | ) | const |
return matrix which converts grid to fractional coordinates
The result is an RT operator. This is a redudent representation, but is handy for assembling compound operators.
Mat33 clipper::Grid_sampling::matrix_frac_grid | ( | ) | const |
return matrix which converts fractional to grid coordinates
The result is an RT operator. This is a redudent representation, but is handy for assembling compound operators.
bool clipper::Grid_sampling::is_null | ( | ) | const |
test if object has been initialised