Clipper
|
Xmap_base: base for crystallographic map class. More...
#include <xmap.h>
Classes | |
class | Map_reference_base |
Map reference base class. More... | |
class | Map_reference_coord |
Map reference with coordinate-like behaviour. More... | |
class | Map_reference_index |
Map reference with index-like behaviour. More... | |
Public Types | |
enum | FFTtype { Default, Normal, Sparse } |
Public Member Functions | |
bool | is_null () const |
test if object has been initialised | |
const Cell & | cell () const |
get the cell | |
const Spacegroup & | spacegroup () const |
get the spacegroup | |
const Grid_sampling & | grid_sampling () const |
get the cell grid | |
const Grid_range & | grid_asu () const |
get the ASU grid | |
Coord_grid | coord_of (const int &index) const |
map coordinate from index | |
int | index_of (const Coord_grid &coord) const |
map index from coordinate | |
Coord_grid | to_map_unit (const Coord_grid &pos) const |
function to pick right cell repeat for any grid coord | |
const RTop & | operator_orth_grid () const |
return the orthogonal-to-grid coordinate operator (translation is zero) | |
const RTop & | operator_grid_orth () const |
return the grid-to-orthogonal coordinate operator (translation is zero) | |
Coord_orth | coord_orth (const Coord_map &cm) const |
convert map coordinate to orthogonal | |
Coord_map | coord_map (const Coord_orth &co) const |
convert orthogonal coordinate to map | |
bool | in_map (const Coord_grid &) const |
(This method is for compatibility with NXmap - it always returns true) | |
template<class I > | |
bool | in_map (const Coord_map &cm) const |
(This method is for compatibility with NXmap - it always returns true) | |
int | multiplicity (const Coord_grid &pos) const |
get multiplicity of a map grid point | |
Map_reference_index | first () const |
return a Map_reference_index for this map | |
Map_reference_coord | first_coord () const |
return a Map_reference_coord for this map | |
Static Public Member Functions | |
static FFTtype & | default_type () |
set/get default backend type | |
Protected Member Functions | |
Xmap_base () | |
Null constructor, for later initialisation. | |
void | init (const Spacegroup &spacegroup, const Cell &cell, const Grid_sampling &grid_sam) |
initialiser | |
void | find_sym (const Coord_grid &base, int &index, int &sym) const |
void | asu_error (const Coord_grid &pos) const |
Protected Attributes | |
ObjectCache< Xmap_cacheobj > ::Reference | cacheref |
object cache reference | |
const unsigned char * | asu |
fast access ptr | |
const Isymop * | isymop |
fast access ptr | |
const int * | du |
fast access ptr | |
const int * | dv |
fast access ptr | |
const int * | dw |
fast access ptr | |
Grid_range | asu_grid |
fast access copy | |
Grid_range | map_grid |
fast access copy | |
int | nsym |
fast access copy | |
Cell | cell_ |
unit cell | |
Spacegroup | spacegroup_ |
spacegroup | |
Grid_sampling | grid_sam_ |
grid for the whole cell | |
RTop | rt_orth_grid |
orth->grid operator | |
RTop | rt_grid_orth |
grid->orth operator | |
Static Protected Attributes | |
static FFTtype | default_type_ = Xmap_base::Sparse |
default backend type | |
Friends | |
class | Xmap_base::Map_reference_base |
class | Xmap_base::Map_reference_index |
class | Xmap_base::Map_reference_coord |
Xmap_base: base for crystallographic map class.
The crystallographic map class stores a map of arbitrary data type. Its main difference from a 3-d array is that the data extent appears to be infinite, and yet internally only a unique ASU is stored. Iterators provide efficient access to data.
This base contains everything except the data, which is templated in the derived type Xmap<T>
clipper::Xmap_base::Xmap_base | ( | ) | [protected] |
Null constructor, for later initialisation.
For later initialisation: see init()
References clipper::Message::message().
bool clipper::Xmap_base::is_null | ( | ) | const |
test if object has been initialised
References cell_, grid_sam_, clipper::Grid_sampling::is_null(), clipper::Cell::is_null(), clipper::Spacegroup::is_null(), and spacegroup_.
Referenced by init(), and clipper::CXmap< T >::update().
Coord_grid clipper::Xmap_base::coord_of | ( | const int & | index | ) | const [inline] |
map coordinate from index
index | The index. |
Reimplemented in clipper::Xmap< T >.
References cacheref.
int clipper::Xmap_base::index_of | ( | const Coord_grid & | coord | ) | const [inline] |
map index from coordinate
This does not check symmetry equivalents.
coord | The coordinate. |
Reimplemented in clipper::Xmap< T >.
Coord_orth clipper::Xmap_base::coord_orth | ( | const Coord_map & | cm | ) | const [inline] |
convert map coordinate to orthogonal
cm | The grid coordinate to be converted. |
References clipper::RTop< T >::rot(), and rt_grid_orth.
Coord_map clipper::Xmap_base::coord_map | ( | const Coord_orth & | co | ) | const [inline] |
convert orthogonal coordinate to map
co | The orthogonal coordinate to be converted. |
References clipper::RTop< T >::rot(), and rt_orth_grid.
int clipper::Xmap_base::multiplicity | ( | const Coord_grid & | pos | ) | const |
get multiplicity of a map grid point
The multiplicity is the number of times the spacegroup operators map a particular grid point onto itself. This is required in order to properly weight map statistics so as to get the same result from just an ASU as using the whole cell.
pos | The coordinate of the grid point. |
Reimplemented in clipper::Xmap< T >.
References cacheref, grid_sam_, isymop, clipper::Coord_grid::transform(), and clipper::Coord_grid::unit().
void clipper::Xmap_base::init | ( | const Spacegroup & | spacegroup, |
const Cell & | cell, | ||
const Grid_sampling & | grid_sam | ||
) | [protected] |
initialiser
The Xmap is initialised with a given cell, spacegroup, and grid sampling. A unique assymetric unit (ASU) of grid cells is selected and will be used to store a unique set of data.
If any of the parameters have null values, the existing values will be unchanged. The object will only be fully initialised once all parameters are available.
spacegroup | The spacegroup for the map |
cell | The cell for the map |
grid_sam | The grid sampling for the map, i.e. the sampling along each axis for one whole cell |
Reimplemented in clipper::CXmap< T >, and clipper::Xmap< T >.
References asu, asu_grid, clipper::ObjectCache< T >::cache(), cacheref, cell(), cell_, du, dv, dw, grid_sam_, clipper::RTop< T >::inverse(), is_null(), isymop, map_grid, clipper::Grid_sampling::matrix_grid_frac(), clipper::Cell::matrix_orth(), nsym, rt_grid_orth, rt_orth_grid, spacegroup(), and spacegroup_.