Clipper
Public Member Functions | List of all members
clipper::Grid_range Class Reference

Grid range class: defines array limits for a grid. More...

#include <coords.h>

Inheritance diagram for clipper::Grid_range:
clipper::Grid clipper::Vec3< int >

Public Member Functions

 Grid_range ()
 null constructor
 
 Grid_range (const Coord_grid &min, const Coord_grid &max)
 constructor: takes grid limits More...
 
 Grid_range (const Grid &grid, const Coord_frac &min, const Coord_frac &max)
 constructor: takes cell grid and fractional limits More...
 
 Grid_range (const Cell &cell, const Grid &grid, const ftype &radius)
 constructor: make grid to hold a sphere from cell, grid, radius More...
 
const Coord_gridmin () const
 access grid limits
 
const Coord_gridmax () const
 access grid limits
 
void add_border (const int b)
 border: increase grid to include given border More...
 
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
 
- Public Member Functions inherited from clipper::Grid
 Grid ()
 null constructor
 
 Grid (const int &nu, const int &nv, const int &nw)
 constructor: from nu,nv,nw
 
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
 
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
 
String format () const
 return formatted String representation More...
 
void debug () const
 
- Public Member Functions inherited from clipper::Vec3< int >
 Vec3 ()
 null constructor
 
 Vec3 (const int &v0, const int &v1, const int &v2)
 constructor: from individual values
 
 Vec3 (const Vec3< TT > &v)
 constructor: copy/convert
 
bool equals (const Vec3< int > &v, const int &tol) const
 test equality
 
const int & operator[] (const int &i) const
 get element
 
int & operator[] (const int &i)
 set element
 
Vec3< int > unit () const
 return unit vector with same direction as this vector
 
bool is_null () const
 test for null vector
 
String format () const
 return formatted String representation
 
const Vec3< int > & operator+= (const Vec3< int > &v)
 add another vector to this one
 
const Vec3< int > & operator-= (const Vec3< int > &v)
 subtract another vector from this one
 

Additional Inherited Members

- Static Public Member Functions inherited from clipper::Vec3< int >
static Vec3< int > zero ()
 return zero vector
 
static Vec3< int > null ()
 return null vector (only valid for floating point types)
 
static int dot (const Vec3< int > &v1, const Vec3< int > &v2)
 Vector dot product (equivalent to *)
 
static Vec3< int > cross (const Vec3< int > &v1, const Vec3< int > &v2)
 Vector cross product.
 

Detailed Description

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).

Constructor & Destructor Documentation

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.

Parameters
minThe lower bound coordinate in u,v,w.
maxThe upper bound coordinate in u,v,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

Parameters
gThe grid sampling of the whole unit cell.
minThe lower bound coordinate in u,v,w.
maxThe upper bound coordinate in u,v,w.
clipper::Grid_range::Grid_range ( const Cell cell,
const Grid grid,
const ftype radius 
)

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.

Parameters
cellThe cell parameters.
gridThe grid sampling of the whole cell.
radiusThe radius of the sphere in Angstroms.

Member Function Documentation

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.

Parameters
bThe number of cells by which to enlarge/shrink.

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