Clipper
|
NXmap<T>: actual non-crystallographic map class. More...
#include <nxmap.h>
Public Member Functions | |
NXmap () | |
Null constructor, for later initialisation. | |
NXmap (const Grid &grid, const RTop<> &rt) | |
Constructor: takes grid and orthogonal->grid coordinate operator. More... | |
NXmap (const Cell &cell, const Grid_sampling &grid, const Grid_range &grid_extent) | |
Constructor: takes grid, cell, and extent. More... | |
void | init (const Grid &grid, const RTop<> &rt) |
initialiser: takes grid and orthogonal->grid coordinate operator More... | |
void | init (const Cell &cell, const Grid_sampling &grid, const Grid_range &grid_extent) |
initialiser: takes grid, cell, and fraction limits More... | |
const T & | operator[] (const NXmap_base::Map_reference_index i) const |
get data by Map_reference_index | |
T & | operator[] (const NXmap_base::Map_reference_index i) |
set data by Map_reference_index | |
const T & | operator[] (const NXmap_base::Map_reference_coord i) const |
get data by Map_reference_coord | |
T & | operator[] (const NXmap_base::Map_reference_coord i) |
set data by Map_reference_coord | |
const T & | get_data (const Coord_grid &pos) const |
get a density value for an arbitrary position | |
void | set_data (const Coord_grid &pos, const T &val) |
set a density value for an arbitrary position | |
template<class I > | |
T | interp (const Coord_map &pos) const |
get map value for map coord using supplied interpolator More... | |
template<class I > | |
void | interp_grad (const Coord_map &pos, T &val, Grad_map< T > &grad) const |
get map value and grad for map coord using supplied interpolator More... | |
template<class I > | |
void | interp_curv (const Coord_map &pos, T &val, Grad_map< T > &grad, Curv_map< T > &curv) const |
get map value and curv for map coord using supplied interpolator More... | |
const Grid & | grid () const |
const RTop | operator_orth_grid () const |
const RTop | operator_grid_orth () const |
const Coord_orth | coord_orth (const Coord_map &cg) const |
const Coord_map | coord_map (const Coord_orth &co) const |
const Map_reference_index | first () |
const Map_reference_coord | first_coord () |
const T & | operator= (const T &value) |
assignment operator: assigns a single value to the whole map More... | |
const NXmap< T > & | operator+= (const NXmap< T > &other) |
add another map to this one More... | |
const NXmap< T > & | operator-= (const NXmap< T > &other) |
subtract another map from this one More... | |
![]() | |
bool | is_null () const |
test if object has been initialised More... | |
const Grid & | grid () const |
return the grid dimensions for this map | |
const RTop & | operator_orth_grid () const |
return the orthogonal-to-grid coordinate operator | |
const RTop & | operator_grid_orth () const |
return the grid-to-orthogonal coordinate operator | |
Coord_orth | coord_orth (const Coord_map &cm) const |
convert map coordinate to orthogonal More... | |
Coord_map | coord_map (const Coord_orth &co) const |
convert orthogonal coordinate to map More... | |
bool | in_map (const Coord_grid &pos) const |
is the given coord available in the map? | |
template<class I > | |
bool | in_map (const Coord_map &cm) const |
is the given coord available in the map using the given interpolant? More... | |
int | multiplicity (const Coord_grid &) const |
get multiplicity of a map grid point (always 1 for NXmap) | |
Map_reference_index | first () const |
return a basic Map_reference_index for this map | |
Map_reference_coord | first_coord () const |
return a coord Map_reference_index for this map | |
Additional Inherited Members | |
![]() | |
NXmap_base () | |
Null constructor, for later initialisation. More... | |
void | init (const Grid &grid, const RTop<> &rt) |
initialiser: takes grid and orthogonal->grid coordinate operator More... | |
void | init (const Cell &cell, const Grid_sampling &grid, const Grid_range &grid_extent) |
initialiser: takes grid, cell, and fraction limits More... | |
![]() | |
Grid | grid_ |
grid for the map | |
RTop | rt_orth_grid |
orth->grid operator | |
RTop | rt_grid_orth |
grid->orth operator | |
int | du |
int | dv |
int | dw |
steps for shifts along u,v,w | |
NXmap<T>: actual non-crystallographic map class.
The non-crystallographic map class stores a map of arbitrary data type. Unlike an Xmap it is finite in extent and has no symmetry. An RT operator provides mapping onto an arbitrary orthogonal coordinate frame. Iterators provide efficient access to data.
This is derived from NXmap_base, and adds the templatised data itself and the methods which deal with it.
clipper::NXmap< T >::NXmap | ( | const Grid & | grid, |
const RTop<> & | rt | ||
) |
Constructor: takes grid and orthogonal->grid coordinate operator.
Initialise an NXmap to some rhomboid chosen from within a crystal coordinate space, specified by the grid and a transformation from orthogonal to grid coordinates.
grid | The grid dimensions of the desired map. |
rt | The rotation/transln op from orthogonal to grid coordinates. |
clipper::NXmap< T >::NXmap | ( | const Cell & | cell, |
const Grid_sampling & | grid, | ||
const Grid_range & | grid_extent | ||
) |
Constructor: takes grid, cell, and extent.
Initialise an NXmap to some rhomboid chosen from within a crystal grid coordinate space, specified by a cell, sampling and box within that grid. This is useful for creating an NXmap which exactly matches some subregion of a crystallographic map.
cell | Unit cell defining the crystal space. |
grid | The grid sampling of the given unit cell. |
grid_extent | The map extent within that cell. |
void clipper::NXmap< T >::init | ( | const Grid & | grid, |
const RTop<> & | rt | ||
) |
initialiser: takes grid and orthogonal->grid coordinate operator
Initialise an NXmap to some rhomboid chosen from within a crystal coordinate space, specified by the grid and a transformation from orthogonal to grid coordinates.
grid | The grid dimensions of the desired map. |
rt | The rotation/transln op from orthogonal to grid coordinates. |
void clipper::NXmap< T >::init | ( | const Cell & | cell, |
const Grid_sampling & | grid, | ||
const Grid_range & | grid_extent | ||
) |
initialiser: takes grid, cell, and fraction limits
Initialise an NXmap to some rhomboid chosen from within a crystal grid coordinate space, specified by a cell, sampling and box within that grid. This is useful for creating an NXmap which exactly matches some subregion of a crystallographic map.
cell | Unit cell defining the crystal space. |
grid | The grid sampling of the given unit cell. |
grid_extent | The map extent within that cell. |
get map value for map coord using supplied interpolator
The value of the map at the desired non-grid map coordinate are calculated using the supplied interpolator template.
pos | The map coord at which the density is to be calcuated. |
void clipper::NXmap< T >::interp_grad | ( | const Coord_map & | pos, |
T & | val, | ||
Grad_map< T > & | grad | ||
) | const |
get map value and grad for map coord using supplied interpolator
The value of the map at the desired non-grid map coordinate and its gradient are calculated using the supplied interpolator template.
pos | The map coord at which the density is to be calcuated. |
val | The value of the density at that point. |
grad | The interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth). |
curv | The interpolated curvature matrix with respect to the map coordinates (see Cell::coord_orth). |
void clipper::NXmap< T >::interp_curv | ( | const Coord_map & | pos, |
T & | val, | ||
Grad_map< T > & | grad, | ||
Curv_map< T > & | curv | ||
) | const |
get map value and curv for map coord using supplied interpolator
The value of the map at the desired non-grid map coordinate and its gradient and curvature are calculated using the supplied interpolator template.
pos | The map coord at which the density is to be calcuated. |
val | The value of the density at that point. |
grad | The interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth). |
curv | The interpolated curvature matrix with respect to the map coordinates (see Cell::coord_orth). |
const T & clipper::NXmap< T >::operator= | ( | const T & | value | ) |
assignment operator: assigns a single value to the whole map
All values, including missing values, are overwritten by the value.
value | The value to which the map is to be set. |
const NXmap< T > & clipper::NXmap< T >::operator+= | ( | const NXmap< T > & | other | ) |
add another map to this one
The map grids must match.
const NXmap< T > & clipper::NXmap< T >::operator-= | ( | const NXmap< T > & | other | ) |
subtract another map from this one
The map grids must match.