Clipper
Public Member Functions | Protected Attributes
clipper::NX_operator Class Reference

NX_operator: non-crystal map operator. More...

#include <nxmap_operator.h>

Inheritance diagram for clipper::NX_operator:
clipper::NXmap_operator< T > clipper::CNXmap_operator< T >

List of all members.

Public Member Functions

 NX_operator ()
 null constructor
 NX_operator (const Xmap_base &xmap, const NXmap_base &nxmap, const RTop_orth &rtop)
 constructor: from Xmap, NXmap, and operator
 NX_operator (const Cell &cell, const Grid_sampling &grid, const NXmap_base &nxmap, const RTop_orth &rtop)
 constructor: from cell, grid sampling, NXmap, and operator
void init (const Xmap_base &xmap, const NXmap_base &nxmap, const RTop_orth &rtop)
 initialiser:: from Xmap, NXmap, and operator
void init (const Cell &cell, const Grid_sampling &grid, const NXmap_base &nxmap, const RTop_orth &rtop)
 initialiser:: from cell, grid sampling, NXmap, and operator
Coord_map coord_map (const Coord_frac &c) const
 convert xtal frac coord to nxmap map coord
Coord_frac coord_frac (const Coord_map &c) const
 convert nxmap map coord to xtal frac coord
template<class I , class T , class M >
nxmap_data (const M &nxmap, const Coord_grid &c) const
 get value of nxmap at xmap grid coord using fastest appropriate method
template<class I , class T , class M >
xmap_data (const M &xmap, const Coord_grid &c) const
 get value of xmap at nxmap grid coord using fastest appropriate method
bool is_null () const
 test if object has been initialised
void debug () const

Protected Attributes

RTop xfrac_nxgrid
 xtal_cell -> nxmap operator
RTop nxgrid_xfrac
 nxmap -> xtal_cell operator
RTop xgrid_nxgrid
 xtal_grid -> nxmap operator
RTop nxgrid_xgrid
 nxmap -> xtal_grid operator
RTop< int > xgrid_nxgrid_int
 xtal_grid -> nxmap integer operator
RTop< int > nxgrid_xgrid_int
 nxmap -> xtal_grid integer operator
bool x_nx_is_int
 true if int operator exists
bool x_nx_is_trn
 true if int operator exists and is pure transln
bool nx_x_is_int
 true if int operator exists
bool nx_x_is_trn
 true if int operator exists and is pure transln

Detailed Description

NX_operator: non-crystal map operator.

This class holds a reference to a non-crystal map frame from somewhere within a crystallographic map frame. In the general case, an orthogonal rotation-translation operator is provided which maps the orthogonal frame of the crystal space onto the orthogonal frame of the NXmap space.

The object calculates and stores optimised transformations between the crystallgoraphic frame (described either in fractional or grid coordinates), and the NXmap grid. Fast paths are generated automatically if the grids are related.


Constructor & Destructor Documentation

clipper::NX_operator::NX_operator ( )

null constructor

The object is not initialised, and will return is_null().

References xfrac_nxgrid.

clipper::NX_operator::NX_operator ( const Xmap_base xmap,
const NXmap_base nxmap,
const RTop_orth rtop 
)

constructor: from Xmap, NXmap, and operator

The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator.

Parameters:
xmapAn Xmap defining the crystal grid frame.
nxmapAn NXmap defining the non-crystal grid frame.
rtopThe operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap.

References init().

clipper::NX_operator::NX_operator ( const Cell cell,
const Grid_sampling grid,
const NXmap_base nxmap,
const RTop_orth rtop 
)

constructor: from cell, grid sampling, NXmap, and operator

The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator.

Parameters:
cellThe cell defining the crystal grid frame.
gridThe grid defining the crystal grid frame.
nxmapAn NXmap defining the non-crystal grid frame.
rtopThe operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap.

References init().


Member Function Documentation

void clipper::NX_operator::init ( const Xmap_base xmap,
const NXmap_base nxmap,
const RTop_orth rtop 
)

initialiser:: from Xmap, NXmap, and operator

The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator.

Parameters:
xmapAn Xmap defining the crystal grid frame.
nxmapAn NXmap defining the non-crystal grid frame.
rtopThe operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap.

References clipper::Xmap_base::cell(), and clipper::Xmap_base::grid_sampling().

Referenced by NX_operator().

void clipper::NX_operator::init ( const Cell cell,
const Grid_sampling grid,
const NXmap_base nxmap,
const RTop_orth rtop 
)

initialiser:: from cell, grid sampling, NXmap, and operator

The operator and inverse operator, together with any possible optimisations, are constructed to relate the give crystallographic and non-crystallographic grid frames, using the supplied orthogonal operator.

Parameters:
cellThe cell defining the crystal grid frame.
gridThe grid defining the crystal grid frame.
nxmapAn NXmap defining the non-crystal grid frame.
rtopThe operator relating the orthogonal frame of the NXmap onto the orthogonal frame of the Xmap.

References clipper::Mat33< T >::equals(), clipper::RTop< T >::equals(), clipper::RTop< T >::inverse(), clipper::Cell::matrix_frac(), clipper::Grid_sampling::matrix_frac_grid(), nx_x_is_int, nx_x_is_trn, nxgrid_xfrac, nxgrid_xgrid, nxgrid_xgrid_int, clipper::NXmap_base::operator_grid_orth(), clipper::RTop< T >::rot(), clipper::RTop< T >::trn(), x_nx_is_int, x_nx_is_trn, xfrac_nxgrid, xgrid_nxgrid, and xgrid_nxgrid_int.

template<class I , class T , class M >
T clipper::NX_operator::nxmap_data ( const M &  nxmap,
const Coord_grid c 
) const

get value of nxmap at xmap grid coord using fastest appropriate method

The density of the non-crystal map at the position corresponding to a crystallographic map grid coordinate is returned. If the grids match exactly either by pure translation or by rotation+translation, then fast paths are used to return the requested density directly. Otherwise the supplied interpolation template is used. No checking is performed for coordinates outside the NXmap.

Parameters:
nxmapThe non-crystal map (NXmap) to be queried.
cThe grid coordinate in the crystallographic coordinate frame.
Returns:
The value of the NXmap at the requested position.

References clipper::Coord_grid::coord_map(), clipper::RTop< T >::trn(), x_nx_is_int, x_nx_is_trn, xgrid_nxgrid, and xgrid_nxgrid_int.

template<class I , class T , class M >
T clipper::NX_operator::xmap_data ( const M &  xmap,
const Coord_grid c 
) const

get value of xmap at nxmap grid coord using fastest appropriate method

The density of the crystal map at the position corresponding to a non-crystallographic map grid coordinate is returned. If the grids match exactly either by pure translation or by rotation+translation, then fast paths are used to return the requested density directly. Otherwise the supplied interpolation template is used.

Parameters:
xmapThe crystal map (Xmap) to be queried.
cThe grid coordinate in the crystallographic coordinate frame.
Returns:
The value of the Xmap at the requested position.

References clipper::Coord_grid::coord_map(), nx_x_is_int, nx_x_is_trn, nxgrid_xgrid, nxgrid_xgrid_int, and clipper::RTop< T >::trn().


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