Clipper
Public Member Functions | List of all members
clipper::NXmap< T > Class Template Reference

NXmap<T>: actual non-crystallographic map class. More...

#include <nxmap.h>

Inheritance diagram for clipper::NXmap< T >:
clipper::NXmap_base clipper::CNXmap< T >

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 >
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 Gridgrid () 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...
 
- Public Member Functions inherited from clipper::NXmap_base
bool is_null () const
 test if object has been initialised More...
 
const Gridgrid () const
 return the grid dimensions for this map
 
const RTopoperator_orth_grid () const
 return the orthogonal-to-grid coordinate operator
 
const RTopoperator_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

- Protected Member Functions inherited from clipper::NXmap_base
 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...
 
- Protected Attributes inherited from clipper::NXmap_base
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
 

Detailed Description

template<class T>
class clipper::NXmap< T >

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.

Note
The following methods are inherited from NXmap_base but are documented here for convenience: grid(), coord_orth(), coord_grid(), first(), first_coord().

Constructor & Destructor Documentation

template<class T >
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.

Parameters
gridThe grid dimensions of the desired map.
rtThe rotation/transln op from orthogonal to grid coordinates.
template<class T >
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.

Parameters
cellUnit cell defining the crystal space.
gridThe grid sampling of the given unit cell.
grid_extentThe map extent within that cell.

Member Function Documentation

template<class T >
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.

Parameters
gridThe grid dimensions of the desired map.
rtThe rotation/transln op from orthogonal to grid coordinates.
template<class T >
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.

Parameters
cellUnit cell defining the crystal space.
gridThe grid sampling of the given unit cell.
grid_extentThe map extent within that cell.
template<class T >
template<class I >
T clipper::NXmap< T >::interp ( const Coord_map pos) const

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.

Parameters
posThe map coord at which the density is to be calcuated.
Returns
The value of the density at that point. map coordinates (see Cell::coord_orth).
template<class T >
template<class I >
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.

Parameters
posThe map coord at which the density is to be calcuated.
valThe value of the density at that point.
gradThe interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth).
curvThe interpolated curvature matrix with respect to the map coordinates (see Cell::coord_orth).
template<class T >
template<class I >
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.

Parameters
posThe map coord at which the density is to be calcuated.
valThe value of the density at that point.
gradThe interpolated gradient vector with respect to the map coordinates (see Cell::coord_orth).
curvThe interpolated curvature matrix with respect to the map coordinates (see Cell::coord_orth).
template<class T >
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.

Parameters
valueThe value to which the map is to be set.
template<class T >
const NXmap< T > & clipper::NXmap< T >::operator+= ( const NXmap< T > &  other)

add another map to this one

The map grids must match.

template<class T >
const NXmap< T > & clipper::NXmap< T >::operator-= ( const NXmap< T > &  other)

subtract another map from this one

The map grids must match.


The documentation for this class was generated from the following file: