Clipper
|
Grid range class: defines array limits for a grid. More...
#include <coords.h>
Public Member Functions | |
Grid_range () | |
null constructor | |
Grid_range (const Coord_grid &min, const Coord_grid &max) | |
constructor: takes grid limits | |
Grid_range (const Grid &grid, const Coord_frac &min, const Coord_frac &max) | |
constructor: takes cell grid and fractional limits | |
Grid_range (const Cell &cell, const Grid &grid, const ftype &radius) | |
constructor: make grid to hold a sphere from cell, grid, radius | |
const Coord_grid & | min () const |
access grid limits | |
const Coord_grid & | max () const |
access grid limits | |
void | add_border (const int b) |
border: increase grid to include given border | |
bool | in_grid (Coord_grid g) const |
determine if a point is in the grid | |
int | index (const Coord_grid &c) const |
grid indexing operator | |
Coord_grid | deindex (const int &index) const |
grid deindexing operator |
Grid range class: defines array limits for a grid.
This class is used for describing 3D grids covering an arbitrary part of the 3D space, i.e. which do not start from (0,0,0).
clipper::Grid_range::Grid_range | ( | const Coord_grid & | min, |
const Coord_grid & | max | ||
) |
constructor: takes grid limits
Make a map grid with an oblong bounded by the coordinates min and max.
min | The lower bound coordinate in u,v,w. |
max | The upper bound coordinate in u,v,w. |
References max(), min(), clipper::Coord_grid::u(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
clipper::Grid_range::Grid_range | ( | const Grid & | g, |
const Coord_frac & | min, | ||
const Coord_frac & | max | ||
) |
constructor: takes cell grid and fractional limits
Make a map grid with an oblong bounded by the fractional coordinates min and max, when the sampling of the cell is g
g | The grid sampling of the whole unit cell. |
min | The lower bound coordinate in u,v,w. |
max | The upper bound coordinate in u,v,w. |
References clipper::Util::intc(), clipper::Util::intf(), clipper::Grid::nu(), clipper::Grid::nv(), clipper::Grid::nw(), clipper::Coord_grid::u(), clipper::Coord_frac::u(), clipper::Coord_grid::v(), clipper::Coord_frac::v(), clipper::Coord_grid::w(), and clipper::Coord_frac::w().
constructor: make grid to hold a sphere from cell, grid, radius
Make a map grid large enough to fully enclose a sphere about the origin of a given radius with a given cell and grid sampling.
cell | The cell parameters. |
grid | The grid sampling of the whole cell. |
radius | The radius of the sphere in Angstroms. |
References clipper::Cell::a_star(), clipper::Cell::b_star(), clipper::Cell::c_star(), clipper::Util::intc(), clipper::Grid::nu(), clipper::Grid::nv(), clipper::Grid::nw(), clipper::Coord_grid::u(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
void clipper::Grid_range::add_border | ( | const int | b | ) |
border: increase grid to include given border
Enlarge the grid by adding b
cells in every direction. Will shrink the grid if b
is negative.
b | The number of cells by which to enlarge/shrink. |
References clipper::Coord_grid::u(), clipper::Coord_grid::v(), and clipper::Coord_grid::w().
Referenced by clipper::Xmap_cacheobj::Xmap_cacheobj().