Clipper
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
clipper::Xmap_base Class Reference

Xmap_base: base for crystallographic map class. More...

#include <xmap.h>

Inheritance diagram for clipper::Xmap_base:
clipper::Xmap< T > clipper::CXmap< T >

List of all members.

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 Cellcell () const
 get the cell
const Spacegroupspacegroup () const
 get the spacegroup
const Grid_samplinggrid_sampling () const
 get the cell grid
const Grid_rangegrid_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 RTopoperator_orth_grid () const
 return the orthogonal-to-grid coordinate operator (translation is zero)
const RTopoperator_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 Isymopisymop
 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

Detailed Description

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>


Constructor & Destructor Documentation

clipper::Xmap_base::Xmap_base ( ) [protected]

Null constructor, for later initialisation.

For later initialisation: see init()

References clipper::Message::message().


Member Function Documentation

bool clipper::Xmap_base::is_null ( ) const

test if object has been initialised

Returns:
true if the object has not been initalised.

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

Parameters:
indexThe index.
Returns:
The corresponding grid coordinate.

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.

Parameters:
coordThe coordinate.
Returns:
The index, or -1 if it does not exist.

Reimplemented in clipper::Xmap< T >.

References asu, and cacheref.

Coord_orth clipper::Xmap_base::coord_orth ( const Coord_map cm) const [inline]

convert map coordinate to orthogonal

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

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

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

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.

Parameters:
posThe coordinate of the grid point.
Returns:
The multiplicty of the 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.

Parameters:
spacegroupThe spacegroup for the map
cellThe cell for the map
grid_samThe 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_.


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