Clipper
Public Member Functions
clipper::Grid_sampling Class Reference

Grid sampling of a unit cell. More...

#include <coords.h>

Inheritance diagram for clipper::Grid_sampling:
clipper::Grid clipper::Vec3< int > clipper::CGrid_sampling

List of all members.

Public Member Functions

 Grid_sampling ()
 null constructor
 Grid_sampling (const int &nu, const int &nv, const int &nw)
 constructor: from nu, nv, nw
 Grid_sampling (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5)
 constructor: from Spacegroup, Cell, Resolution, Shannon rate
void init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5)
 initialiser: from Spacegroup, Cell, Resolution, Shannon rate
Mat33 matrix_grid_frac () const
 return matrix which converts grid to fractional coordinates
Mat33 matrix_frac_grid () const
 return matrix which converts fractional to grid coordinates
bool is_null () const
 test if object has been initialised
const int & nu () const
 get nu
const int & nv () const
 get nv
const int & nw () const
 get nw
int size () const
 return size of grid array
int index (const Coord_grid &c) const
 grid indexing operator
Coord_grid deindex (const int &index) const
 grid deindexing operator
const String format () const
 return formatted String representation

Detailed Description

Grid sampling of a unit cell.

This class represents the grid sampling of a unit cell. It is otherwise identical to its parent, clipper::Grid_cell, but has an additional constructor which takes a spacegroup, cell and resolution and produces an appropriate grid obeying all of the symmetry constraints, and using efficient factors for the calculation of FFTs.

Note:
The following methods are inherited from Grid and Grid_cell but are documented here for convenience: nu(), nv(), nw(), size(), index(), deindex(), format(), coord_frac(), coord_grid(), to_unit().

Constructor & Destructor Documentation

clipper::Grid_sampling::Grid_sampling ( const Spacegroup spacegroup,
const Cell cell,
const Resolution resol,
const ftype  rate = 1.5 
)

constructor: from Spacegroup, Cell, Resolution, Shannon rate

A grid is chosen to represent the specified cell at the given resolution, obeying any restrictions imposed by the spacegroup. A slightly finer grid may be chosen if doing so is liable to significantly increase the speed of FFTs on that grid.

Parameters:
spacegroupThe spacegroup which the grid must obey.
cellThe cell which the grid must contain.
resolThe resolution to which the grid must sample.
rateThe linear Shannon rate (oversampling) required. If rate = 1, the grid spaceing will be half the resolution (the the minimum required). For a grid spaceing of resol/3, use the default rate=1.5.

References init().


Member Function Documentation

void clipper::Grid_sampling::init ( const Spacegroup spacegroup,
const Cell cell,
const Resolution resol,
const ftype  rate = 1.5 
)

initialiser: from Spacegroup, Cell, Resolution, Shannon rate

A grid is chosen to represent the specified cell at the given resolution, obeying any restrictions imposed by the spacegroup. A slightly finer grid may be chosen if doing so is liable to significantly increase the speed of FFTs on that grid.

Parameters:
spacegroupThe spacegroup which the grid must obey.
cellThe cell which the grid must contain.
resolThe resolution to which the grid must sample.
rateThe linear Shannon rate (oversampling) required. If rate = 1, the grid spaceing will be half the resolution (the the minimum required). For a grid spaceing of resol/3, use the default rate=1.5.

Reimplemented in clipper::CGrid_sampling.

References clipper::Cell_descr::a(), clipper::Cell_descr::b(), clipper::Cell_descr::c(), clipper::Cell::descr(), clipper::Util::intc(), clipper::Resolution::limit(), clipper::Util::max(), clipper::Util::mod(), clipper::Spacegroup::num_symops(), and clipper::Spacegroup::symop().

Referenced by Grid_sampling(), and clipper::CGrid_sampling::init().

Mat33 clipper::Grid_sampling::matrix_grid_frac ( ) const

return matrix which converts grid to fractional coordinates

The result is an RT operator. This is a redudent representation, but is handy for assembling compound operators.

Returns:
The operator

References nu(), nv(), and nw().

Referenced by clipper::Xmap_base::init().

Mat33 clipper::Grid_sampling::matrix_frac_grid ( ) const

return matrix which converts fractional to grid coordinates

The result is an RT operator. This is a redudent representation, but is handy for assembling compound operators.

Returns:
The operator

References nu(), nv(), and nw().

Referenced by clipper::NX_operator::init(), and clipper::NXmap_base::init().

bool clipper::Grid_sampling::is_null ( ) const

test if object has been initialised

Returns:
true if the object has not been initalised.

Reimplemented from clipper::Vec3< int >.

References size().

Referenced by clipper::CNXmap_operator< T >::init(), clipper::CXmap< T >::init(), clipper::Xmap_base::is_null(), and clipper::CGrid_sampling::update().

const String clipper::Grid_sampling::format ( ) const

return formatted String representation

Returns:
The formatted text string

Reimplemented from clipper::Grid.

Referenced by clipper::Xmap_cacheobj::format().


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