Clipper
|
HKL list container and tree root. More...
#include <hkl_info.h>
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 Cell & | cell () const |
get the cell | |
const Spacegroup & | spacegroup () const |
get the spacegroup | |
const HKL_sampling & | hkl_sampling () const |
[CLIPPER2] get HKL_sampling | |
const Resolution & | resolution () 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 HKL & | hkl_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_class & | hkl_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< Isymop > | isymop |
integer symops | |
std::vector< HKL > | hkl |
the reflection list | |
std::vector< HKL_class > | hkl_class_lookup |
fast epsilon/centricity lookup table | |
std::vector< ftype32 > | invresolsq_lookup |
fast resolution lookup table | |
HKL_lookup | lookup |
fast reflection lookup table | |
Range< ftype > | invresolsq_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 |
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.
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.
spacegroup | The spacegroup. |
cell | The unit cell. |
resolution | The resolution limit. |
References init(), and clipper::Message::message().
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.
spacegroup | The spacegroup. |
cell | The unit cell. |
resolution | The resolution limit. |
generate | If 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.
spacegroup | The spacegroup. |
cell | The unit cell. |
hkl_sampling | The resolution limit. |
generate | If 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
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 | ( | ) |
synthesize hkl list
Using current cell, spacegroup, resolution.
Reimplemented in clipper::CHKL_info.
References clipper::Cell_descr::a(), add_hkl_list(), clipper::Cell_descr::b(), clipper::Cell_descr::c(), cell_, clipper::Cell::descr(), clipper::HKL::h(), hkl, clipper::Spacegroup::hkl_class(), clipper::HKL::invresolsq(), clipper::Resolution::invresolsq_limit(), clipper::HKL::k(), clipper::HKL::l(), clipper::Resolution::limit(), clipper::Spacegroup::recip_asu(), resolution_, spacegroup_, and clipper::HKL_class::sys_abs().
Referenced by init().
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.
add | The 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
index | The index. |
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).
rfl | The HKL. |
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().
find symop no and friedel to bring an HKL into ASU
Returns the index of the reflection, the sym no. and Friedel flag.
References isymop, clipper::Message::message(), clipper::Spacegroup::num_primops(), clipper::Spacegroup::recip_asu(), spacegroup_, and clipper::HKL::transform().
Referenced by add_hkl_list(), clipper::HKL_data< T >::get_data(), clipper::HKL_info::HKL_reference_coord::HKL_reference_coord(), clipper::HKL_data< T >::operator[](), clipper::HKL_data< T >::set_data(), and clipper::HKL_info::HKL_reference_coord::set_hkl().
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().