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

CGrid_sampling container. More...

#include <container_types.h>

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

Public Member Functions

 CGrid_sampling (const String name="", const Grid_sampling &grid=NullGrid_sampling)
 constructor: make null object or top object in tree More...
 
 CGrid_sampling (Container &parent, const String name="", const ftype rate=1.5)
 constructor: make child object More...
 
 CGrid_sampling (Container &parent, const String name, const Grid_sampling &grid)
 constructor: make child object with explicit value More...
 
void init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resolution, const ftype rate)
 initialiser: from sampling rate More...
 
void init (const Grid_sampling &grid_sampling_)
 initialiser: from Grid_sampling More...
 
void update ()
 hierarchical update More...
 
- Public Member Functions inherited from clipper::Container
 Container (const String name="")
 constructor: make null object or top object in a tree
 
 Container (Container &parent, const String &path)
 constructor: from any other member and a relative path
 
String path () const
 get the path of this tree object
 
String name () const
 get the name of this tree object
 
void set_name (const String &name)
 set the name of this tree object
 
bool is_destroyed_with_parent () const
 is this object to be destroyed when parent is destroyed?
 
void set_destroyed_with_parent (const bool d=true)
 set this object to be destroyed when parent is destroyed
 
void move (const String &path)
 'move' method moves this object to somewhere else in the hierarchy
 
bool has_parent () const
 test if this object has a parent
 
const Containerparent () const
 get the parent of this object
 
Containerparent ()
 get the parent of this object
 
int num_children () const
 return number of children
 
const Containerchild (const int &i) const
 get the i'th child of this object
 
Containerchild (const int &i)
 get the i'th child of this object
 
const Containerultimate_parent () const
 get the ultimate parent of this object - the top of the tree
 
Containerultimate_parent ()
 get the ultimate parent of this object - the top of the tree
 
Containerparent_ptr ()
 get the parent of this object (NULL on fail)
 
template<class T >
T * parent_of_type_ptr ()
 search up the tree for a parent of the specified type (NULL on fail)
 
Containerfind_path_ptr (const String &path)
 find an object using a directory-like path (NULL on fail)
 
virtual ~Container ()
 destructor: virtual
 
void debug ()
 
- Public Member Functions inherited from clipper::Grid_sampling
 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 More...
 
void init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resol, const ftype rate=1.5)
 initialiser: from Spacegroup, Cell, Resolution, Shannon rate More...
 
Mat33 matrix_grid_frac () const
 return matrix which converts grid to fractional coordinates More...
 
Mat33 matrix_frac_grid () const
 return matrix which converts fractional to grid coordinates More...
 
bool is_null () const
 test if object has been initialised More...
 
const int & nu () const
 
const int & nv () const
 
const int & nw () const
 
int size () const
 
int index (const Coord_grid &c) const
 
Coord_grid deindex (const int &index) const
 
const String format () const
 
- 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

CGrid_sampling container.

CGrid_sampling: This has a name and a grid sampling It overrides the grid sampling for any objects below it.

Constructor & Destructor Documentation

clipper::CGrid_sampling::CGrid_sampling ( const String  name = "",
const Grid_sampling grid = NullGrid_sampling 
)

constructor: make null object or top object in tree

The top object in a tree is initialised from a known grid.

Parameters
nameThe object name.
gridThe grid sampling.
clipper::CGrid_sampling::CGrid_sampling ( Container parent,
const String  name = "",
const ftype  rate = 1.5 
)

constructor: make child object

The normal form for a child object - spacegroup and cell inherited.

Parameters
parentThe objects parent.
nameThe object name.
rateThe Shannon rate (default 1.5).
clipper::CGrid_sampling::CGrid_sampling ( Container parent,
const String  name,
const Grid_sampling grid 
)

constructor: make child object with explicit value

This is still a child object but is initialised directly.

Parameters
parentThe objects parent.
nameThe object name.
gridThe grid sampling.

Member Function Documentation

void clipper::CGrid_sampling::init ( const Spacegroup spacegroup,
const Cell cell,
const Resolution resolution,
const ftype  rate 
)

initialiser: from sampling rate

The object is initialised if the appropriate parent objects are available, and children are updated.

Parameters
spacegroupThe spacegroup.
cellThe cell.
resolutionThe resolution.
rate_The Shannon rate (If <1 previous value is used, default 1.5).
void clipper::CGrid_sampling::init ( const Grid_sampling grid_sampling_)

initialiser: from Grid_sampling

The object is initialised, and children are updated.

Parameters
grid_sampling_The value to give to the contained object.
void clipper::CGrid_sampling::update ( )
virtual

hierarchical update

Hierarchical update. If this object is uninitialised, an attempt is made to initialise the object using information from its parents in the hierarchy. The childen of the object are then updated.

Reimplemented from clipper::Container.


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