Clipper
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
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

List of all members.

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
void init (const Spacegroup &spacegroup, const Cell &cell, const Resolution &resolution, const bool &generate=false)
 initialiser: Takes spacegroup, cell, and resolution
void init (const Spacegroup &spacegroup, const Cell &cell, const HKL_sampling &hkl_sampling, const bool &generate=true)
 initialiser: Takes spacegroup, cell, and HKL_sampling
bool is_null () const
 test if object has been initialised
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
void add_hkl_list (const std::vector< HKL > &add)
 add new reflections to the list
int num_reflections () const
 get number of reflections in the object
const HKLhkl_of (const int &index) const
 reflection hkl from index
int index_of (const HKL &rfl) const
 reflection index from hkl
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
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

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.

References init(), and clipper::Message::message().


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.

Reimplemented in clipper::CHKL_info.

References cell(), cell_, generate_hkl_list(), hkl, is_null(), isymop, clipper::Spacegroup::num_symops(), resolution(), resolution_, spacegroup(), spacegroup_, clipper::Spacegroup::symop(), and update_hkl_list().

Referenced by clipper::HKL_data< T >::HKL_data(), HKL_info(), clipper::HKL_data< T >::init(), clipper::CHKL_info::init(), clipper::HKL_data< T >::operator=(), and clipper::data::Test_data::Test_data().

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.

References add_hkl_list(), cell(), cell_, clipper::HKL::h(), hkl, clipper::Spacegroup::hkl_class(), clipper::HKL_sampling::hkl_limit(), hkl_sampling(), hkl_sampling_, clipper::HKL_sampling::in_resolution(), clipper::HKL_sampling::is_null(), clipper::Cell::is_null(), clipper::Spacegroup::is_null(), isymop, clipper::HKL::k(), clipper::HKL::l(), clipper::Spacegroup::num_symops(), clipper::Spacegroup::recip_asu(), clipper::HKL_sampling::resolution(), resolution_, spacegroup(), spacegroup_, clipper::Spacegroup::symop(), clipper::HKL_class::sys_abs(), and update_hkl_list().

bool clipper::HKL_info::is_null ( ) const

test if object has been initialised

Returns:
true if the object has not been initalised.

References cell_, clipper::Resolution::is_null(), clipper::Cell::is_null(), clipper::Spacegroup::is_null(), resolution_, and spacegroup_.

Referenced by init(), clipper::CHKL_data< T >::init(), clipper::HKL_data_base::is_null(), and clipper::CHKL_info::update().

void clipper::HKL_info::generate_hkl_list ( )
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.

References cell_, find_sym(), hkl, clipper::HKL_lookup::index_of(), invresolsq(), clipper::Resolution::invresolsq_limit(), lookup, resolution_, and update_hkl_list().

Referenced by generate_hkl_list(), and init().

const HKL& clipper::HKL_info::hkl_of ( const int &  index) const [inline]

reflection hkl from index

Parameters:
indexThe index.
Returns:
The corresponding HKL.

References hkl.

Referenced by clipper::HKL_info::HKL_reference_index::hkl(), clipper::HKL_data_base::invresolsq(), clipper::HKL_info::HKL_reference_coord::next(), and update_hkl_list().

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.

References clipper::HKL_lookup::index_of(), and lookup.

Referenced by clipper::HKL_info::HKL_reference_coord::HKL_reference_coord(), and clipper::HKL_info::HKL_reference_coord::set_hkl().

HKL clipper::HKL_info::find_sym ( const HKL rfl,
int &  sym,
bool &  friedel 
) const
void clipper::HKL_info::update_hkl_list ( ) [protected]

finalise reflection list

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

References cell_, hkl, clipper::Spacegroup::hkl_class(), hkl_class_lookup, hkl_of(), clipper::Range< T >::include(), clipper::HKL_lookup::init(), clipper::HKL::invresolsq(), invresolsq_lookup, invresolsq_range_, lookup, num_reflections(), and spacegroup_.

Referenced by add_hkl_list(), and init().


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