Clipper
Public Member Functions
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 >

List of all members.

Public Member Functions

 NXmap ()
 Null constructor, for later initialisation.
 NXmap (const Grid &grid, const RTop<> &rt)
 Constructor: takes grid and orthogonal->grid coordinate operator.
 NXmap (const Cell &cell, const Grid_sampling &grid, const Grid_range &grid_extent)
 Constructor: takes grid, cell, and extent.
void init (const Grid &grid, const RTop<> &rt)
 initialiser: takes grid and orthogonal->grid coordinate operator
void init (const Cell &cell, const Grid_sampling &grid, const Grid_range &grid_extent)
 initialiser: takes grid, cell, and fraction limits
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
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
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
const Gridgrid () 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
const Coord_orth coord_orth (const Coord_map &cg) const
 convert map coordinate to orthogonal
const Coord_map coord_map (const Coord_orth &co) const
 convert orthogonal coordinate to map
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
const NXmap< T > & operator+= (const NXmap< T > &other)
 add another map to this one
const NXmap< T > & operator-= (const NXmap< T > &other)
 subtract another map from this one

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.

Reimplemented from clipper::NXmap_base.

References clipper::NXmap_base::init(), and clipper::Grid::size().

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.

Reimplemented from clipper::NXmap_base.

References clipper::NXmap_base::init(), and clipper::Grid::size().

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 Coord_orth clipper::NXmap< T >::coord_orth ( const Coord_map cm) const

convert map coordinate to orthogonal

Parameters:
cmThe grid coordinate to be converted.
Returns:
The equivalent orthogonal coordinate.

Reimplemented from clipper::NXmap_base.

template<class T>
const Coord_map clipper::NXmap< T >::coord_map ( const Coord_orth co) const

convert orthogonal coordinate to map

Parameters:
coThe orthogonal coordinate to be converted.
Returns:
The equivalent grid coordinate.

Reimplemented from clipper::NXmap_base.

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.

References clipper::NXmap_base::Map_reference_index::index(), clipper::NXmap_base::Map_reference_index::last(), and clipper::NXmap_base::Map_reference_index::next().

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

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