Clipper
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
clipper::HKL_info Class Reference

HKL list container and tree root. More...

#include <hkl_info.h>

Inheritance diagram for clipper::HKL_info:
clipper::CHKL_info clipper::HKL_data_cacheobj

Classes

class  HKL_reference_base
 HKL reference base class. More...
 
class  HKL_reference_coord
 HKL reference with coord-like behaviour. More...
 
class  HKL_reference_index
 HKL reference with index-like behaviour. More...
 

Public Member Functions

 HKL_info ()
 null constructor
 
 HKL_info (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resolution, const bool &generate=false)
 constructor: Takes spacegroup, cell, and resolution More...
 
void init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resolution, const bool &generate=false)
 initialiser: Takes spacegroup, cell, and resolution More...
 
void init (const Spacegroup &spacegroup, const Cell &cell, const HKL_sampling &hkl_sampling, const bool &generate=true)
 initialiser: Takes spacegroup, cell, and HKL_sampling More...
 
bool is_null () const
 test if object has been initialised More...
 
const Cellcell () const
 get the cell
 
const Spacegroupspacegroup () const
 get the spacegroup
 
const HKL_samplinghkl_sampling () const
 [CLIPPER2] get HKL_sampling
 
const Resolutionresolution () const
 get the resolution
 
void generate_hkl_list ()
 synthesize hkl list More...
 
void add_hkl_list (const std::vector< HKL > &add)
 add new reflections to the list More...
 
int num_reflections () const
 get number of reflections in the object
 
const HKLhkl_of (const int &index) const
 reflection hkl from index More...
 
int index_of (const HKL &rfl) const
 reflection index from hkl More...
 
const ftype32 & invresolsq (const int &index) const
 get reflection resolution using lookup
 
const Range< ftype > & invresolsq_range () const
 get resolution limits of the list
 
const HKL_classhkl_class (const int &index) const
 get reflection class using lookup
 
HKL find_sym (const HKL &rfl, int &sym, bool &friedel) const
 find symop no and friedel to bring an HKL into ASU More...
 
HKL_reference_index first () const
 return HKL_reference_index pointing to first reflection
 
void debug () const
 

Protected Member Functions

void update_hkl_list ()
 finalise reflection list More...
 

Protected Attributes

Spacegroup spacegroup_
 spacegroup
 
Cell cell_
 unit cell
 
HKL_sampling hkl_sampling_
 hkl sampling
 
Resolution resolution_
 resolution limit
 
std::vector< Isymopisymop
 integer symops
 
std::vector< HKLhkl
 the reflection list
 
std::vector< HKL_classhkl_class_lookup
 fast epsilon/centricity lookup table
 
std::vector< ftype32 > invresolsq_lookup
 fast resolution lookup table
 
HKL_lookup lookup
 fast reflection lookup table
 
Range< ftypeinvresolsq_range_
 resolution limit of the current reflection list
 

Friends

class HKL_info::HKL_reference_base
 
class HKL_info::HKL_reference_index
 
class HKL_info::HKL_reference_coord
 

Detailed Description

HKL list container and tree root.

This object contains contains a reflection list, and all the properties on which such a list depends, i.e. spacegroup, cell, resolution. It also keeps a fast reflection lookup list and lookup lists for resolutions and reflection classes.

Constructor & Destructor Documentation

clipper::HKL_info::HKL_info ( const Spacegroup spacegroup,
const Cell cell,
const Resolution resolution,
const bool &  generate = false 
)

constructor: Takes spacegroup, cell, and resolution

Construct and initialise HKL_info object. This updates the spacegroup and cell and clears the reflection list. The resolution is used as a rejection criterion for reflections - no HKL will be stored beyond the given limit. Initially there are no reflections in the reflection list: see generate_hkl_list().

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.
cellThe unit cell.
resolutionThe resolution limit.

Member Function Documentation

void clipper::HKL_info::init ( const Spacegroup spacegroup,
const Cell cell,
const Resolution resolution,
const bool &  generate = false 
)

initialiser: Takes spacegroup, cell, and resolution

Initialise the HKL_info object. This updates the spacegroup and cell and clears the reflection list. The resolution is used as a rejection criterion for reflections - no HKL will be stored beyond the given limit. Initially there are no reflections in the reflection list: see generate_hkl_list().

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.
cellThe unit cell.
resolutionThe resolution limit.
generateIf true, a reflection list will be generated for an ASU.
void clipper::HKL_info::init ( const Spacegroup spacegroup,
const Cell cell,
const HKL_sampling hkl_sampling,
const bool &  generate = true 
)

initialiser: Takes spacegroup, cell, and HKL_sampling

Initialise the HKL_info object. This updates the spacegroup and cell and clears the reflection list. The HKL_sampling determines the reflection list.

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.
cellThe unit cell.
hkl_samplingThe resolution limit.
generateIf true, a reflection list will be generated for an ASU.
bool clipper::HKL_info::is_null ( ) const

test if object has been initialised

Returns
true if the object has not been initalised.
void clipper::HKL_info::generate_hkl_list ( )

synthesize hkl list

Using current cell, spacegroup, resolution.

void clipper::HKL_info::add_hkl_list ( const std::vector< HKL > &  add)

add new reflections to the list

The new HKLs are transformed to the default reciprocal ASU, and added to the reflection list. Duplicates and reflections outside the resoluution limit are ignored. Then the fast lookup tables for HKL, invresolsq, and reflection class are rebuilt.

Parameters
addThe list of new reflections to add.
const HKL& clipper::HKL_info::hkl_of ( const int &  index) const
inline

reflection hkl from index

Parameters
indexThe index.
Returns
The corresponding HKL.
int clipper::HKL_info::index_of ( const HKL rfl) const
inline

reflection index from hkl

This does not check symmetry equivalents (see find_sym).

Parameters
rflThe HKL.
Returns
The index, or -1 if it does not exist.
HKL clipper::HKL_info::find_sym ( const HKL rfl,
int &  sym,
bool &  friedel 
) const

find symop no and friedel to bring an HKL into ASU

Returns the index of the reflection, the sym no. and Friedel flag.

void clipper::HKL_info::update_hkl_list ( )
protected

finalise reflection list

Update all the lookup tables to be consistent with the modified reflection list


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