|
Clipper
|
Xmap<T>: actual crystallographic map class. More...
#include <xmap.h>
Public Member Functions | |
| Xmap () | |
| Null constructor, for later initialisation. | |
| Xmap (const Spacegroup &spacegroup, const Cell &cell, const Grid_sampling &grid_sam) | |
| constructor: from spacegroup, cell, and grid | |
| void | init (const Spacegroup &spacegroup, const Cell &cell, const Grid_sampling &grid_sam) |
| initialiser: from spacegroup, cell, and grid | |
| const T & | operator[] (const Xmap_base::Map_reference_index &ix) const |
| get data by Map_reference_index | |
| T & | operator[] (const Xmap_base::Map_reference_index &ix) |
| set data by Map_reference_index | |
| const T & | operator[] (const Xmap_base::Map_reference_coord &ix) const |
| get data by Map_reference_coord | |
| T & | operator[] (const Xmap_base::Map_reference_coord &ix) |
| set data by Map_reference_coord | |
| const T & | get_data (const Coord_grid &pos) const |
| get a density value for an arbitrary position More... | |
| void | set_data (const Coord_grid &pos, const T &val) |
| set a density value for an arbitrary position More... | |
| const T & | get_data (const int &index) const |
| get data by index (not recommended) More... | |
| bool | set_data (const int &index, const T &val) |
| set data by index (not recommended) More... | |
| template<class I > | |
| T | interp (const Coord_frac &pos) const |
| get map value for fractional coord using supplied interpolator More... | |
| template<class I > | |
| void | interp_grad (const Coord_frac &pos, T &val, Grad_frac< T > &grad) const |
| get map value and grad for fractional coord using supplied interpolator More... | |
| template<class I > | |
| void | interp_curv (const Coord_frac &pos, T &val, Grad_frac< T > &grad, Curv_frac< T > &curv) const |
| get map value and curv for fractional coord using supplied interpolator More... | |
| 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... | |
| template<class H > | |
| void | fft_from (const H &fphidata, const FFTtype type=Default) |
| FFT from reflection list to map. More... | |
| template<class H > | |
| void | fft_to (H &fphidata, const FFTtype type=Default) const |
| FFT from map to reflection list. More... | |
| const Cell & | cell () const |
| const Spacegroup & | spacegroup () const |
| const Grid_sampling & | grid_sampling () const |
| const Grid_range & | grid_asu () const |
| Coord_grid | coord_of (const int &index) const |
| int | index_of (const Coord_grid &coord) const |
| const int | multiplicity (const Coord_grid &pos) const |
| const Coord_grid | to_map_unit (const Coord_grid &pos) const |
| const Map_reference_index | first () const |
| const Map_reference_coord | first_coord () const |
| const T & | operator= (const T &value) |
| assignment operator: assigns a single value to the whole map More... | |
| const Xmap< T > & | operator+= (const Xmap< T > &other) |
| add another map to this one More... | |
| const Xmap< T > & | operator-= (const Xmap< T > &other) |
| subtract another map from this one More... | |
Public Member Functions inherited from clipper::Xmap_base | |
| bool | is_null () const |
| test if object has been initialised More... | |
| 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 More... | |
| int | index_of (const Coord_grid &coord) const |
| map index from coordinate More... | |
| 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 More... | |
| Coord_map | coord_map (const Coord_orth &co) const |
| convert orthogonal coordinate to map More... | |
| 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 More... | |
| 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 | |
Additional Inherited Members | |
Public Types inherited from clipper::Xmap_base | |
| enum | FFTtype { Default, Normal, Sparse } |
Static Public Member Functions inherited from clipper::Xmap_base | |
| static FFTtype & | default_type () |
| set/get default backend type | |
Protected Member Functions inherited from clipper::Xmap_base | |
| Xmap_base () | |
| Null constructor, for later initialisation. More... | |
| void | init (const Spacegroup &spacegroup, const Cell &cell, const Grid_sampling &grid_sam) |
| initialiser More... | |
| void | find_sym (const Coord_grid &base, int &index, int &sym) const |
| void | asu_error (const Coord_grid &pos) const |
Protected Attributes inherited from clipper::Xmap_base | |
|
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 inherited from clipper::Xmap_base | |
| static FFTtype | default_type_ = Xmap_base::Sparse |
| default backend type | |
Xmap<T>: actual 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 is derived from Xmap_base, and adds the templatised data itself and the methods which deal with it.
| const T & clipper::Xmap< T >::get_data | ( | const Coord_grid & | pos | ) | const |
get a density value for an arbitrary position
Accessing the data by coordinate, rather than by Map_reference_index or Map_reference_coord, involves a symmetry lookup and is therefore slow. Avoid using these methods when you can.
| void clipper::Xmap< T >::set_data | ( | const Coord_grid & | pos, |
| const T & | val | ||
| ) |
set a density value for an arbitrary position
Accessing the data by coordinate, rather than by Map_reference_index or Map_reference_coord, involves a symmetry lookup and is therefore slow. Avoid using these methods when you can.
|
inline |
get data by index (not recommended)
Accessing the data by index, rather than by Map_reference_index or Map_reference_coord, is generally to be avoided since the indices do not start at zero and do not increase contiguously. These methods are only useful when a large number of references into a map must be stored, e.g. for sorting into density order.
| bool clipper::Xmap< T >::set_data | ( | const int & | index, |
| const T & | val | ||
| ) |
set data by index (not recommended)
Accessing the data by index, rather than by Map_reference_index or Map_reference_coord, is generally to be avoided since the indices do not start at zero and do not increase contiguously. These methods are only useful when a large number of references into a map must be stored, e.g. for sorting into density order.
get map value for fractional coord using supplied interpolator
The value of the map at the desired non-grid fractional coordinate are calculated using the supplied interpolator template.
| pos | The fractional coord at which the density is to be calcuated. |
| void clipper::Xmap< T >::interp_grad | ( | const Coord_frac & | pos, |
| T & | val, | ||
| Grad_frac< T > & | grad | ||
| ) | const |
get map value and grad for fractional coord using supplied interpolator
The value of the map at the desired non-grid fractional coordinate and its gradient are calculated using the supplied interpolator template.
| pos | The fractional 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 fractional coordinates (see Cell::coord_orth). |
| void clipper::Xmap< T >::interp_curv | ( | const Coord_frac & | pos, |
| T & | val, | ||
| Grad_frac< T > & | grad, | ||
| Curv_frac< T > & | curv | ||
| ) | const |
get map value and curv for fractional coord using supplied interpolator
The value of the map at the desired non-grid fractional coordinate and its gradient and curvature are calculated using the supplied interpolator template. e.g.
| pos | The fractional 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 fractional coordinates (see Cell::coord_orth). |
| curv | The interpolated curvature matrix with respect to the fractional coordinates (see Cell::coord_orth). |
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::Xmap< 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). |
| void clipper::Xmap< 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. e.g.
| 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::Xmap< T >::fft_from | ( | const H & | fphidata, |
| const FFTtype | type = Default |
||
| ) |
FFT from reflection list to map.
An FFT is calculated using the provided reflection list of F_phi, and used to fill this map. The reflection list is unchanged.
| fphidata | The reflection data list to use |
| void clipper::Xmap< T >::fft_to | ( | H & | fphidata, |
| const FFTtype | type = Default |
||
| ) | const |
FFT from map to reflection list.
The Fourier transform of this map is calculated and used to fill a reflection list of F_phi. The map is unchanged.
Arguably this should be part of hkl_data<F_phi<T>>. But that requires writing a specialisation of hkl_data for F_phi. This is simpler and imposes less demands on the compiler.
| fphidata | The reflection data list to set. |
| const T & clipper::Xmap< 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 Xmap< T > & clipper::Xmap< T >::operator+= | ( | const Xmap< T > & | other | ) |
add another map to this one
The map grids and spacegroups must match.
| const Xmap< T > & clipper::Xmap< T >::operator-= | ( | const Xmap< T > & | other | ) |
subtract another map from this one
The map grids and spacegroups must match.
1.8.7