asu_mappings Class Template Reference

Container for mapping of sites to an asymmetric unit. More...

#include <direct_space_asu.h>

List of all members.

Public Types

typedef std::vector
< asu_mapping< FloatType,
IntShiftType > > 
array_of_mappings_for_one_site
 Type of array of mappings for one site.
typedef af::shared
< array_of_mappings_for_one_site
array_of_array_of_mappings_for_one_site
 Type of array of array of mappings for one site.

Public Member Functions

 asu_mappings ()
 Default constructor. Some data members are not initialized!
 asu_mappings (sgtbx::space_group const &space_group, float_asu< FloatType > const &asu, FloatType const &buffer_thickness)
 Grouping of the data needed to compute the mappings.
void reserve (std::size_t n_sites_final)
 Pre-allocates memory for mappings(); for efficiency.
void discard_last ()
 Support for site_cluster_analysis.
sgtbx::space_group const & space_group () const
 Space group as passed to the constructor.
float_asu< FloatType > const & asu () const
 Asymmetric unit as passed to the constructor.
uctbx::unit_cell const & unit_cell () const
 Equivalent to asu().unit_cell().
FloatType buffer_thickness () const
 Buffer thickness as passed to the constructor.
float_asu< FloatType > const & asu_buffer () const
 Reference to internalized result of asu().add_buffer(buffer_thickness()).
scitbx::math::sphere_3d
< FloatType > const & 
buffer_covering_sphere () const
 Sphere covering the asymmetric unit + buffer_thickness().
asu_mappingsprocess (fractional< FloatType > const &original_site, FloatType const &min_distance_sym_equiv=0.5)
 Processes one site and appends the results to mappings().
asu_mappingsprocess (fractional< FloatType > const &original_site, sgtbx::site_symmetry_ops const &site_symmetry_ops)
 Processes one site and appends the results to mappings().
asu_mappingsprocess_sites_frac (af::const_ref< scitbx::vec3< FloatType > > const &original_sites, FloatType const &min_distance_sym_equiv=0.5)
 Calls process() for each original site.
asu_mappingsprocess_sites_frac (af::const_ref< scitbx::vec3< FloatType > > const &original_sites, sgtbx::site_symmetry_table const &site_symmetry_table)
 Calls process() for each original site.
asu_mappingsprocess_sites_cart (af::const_ref< scitbx::vec3< FloatType > > const &original_sites, FloatType const &min_distance_sym_equiv=0.5)
 Calls process() for each original site.
asu_mappingsprocess_sites_cart (af::const_ref< scitbx::vec3< FloatType > > const &original_sites, sgtbx::site_symmetry_table const &site_symmetry_table)
 Calls process() for each original site.
std::size_t n_sites_in_asu_and_buffer () const
 Total number of sites in the asymmetric unit and the surrounding buffer.
array_of_array_of_mappings_for_one_site
const & 
mappings () const
 Accumulated mappings due to repeated calls of process().
af::const_ref
< array_of_mappings_for_one_site >
const & 
mappings_const_ref () const
 Use for maximum performance.
cartesian< FloatType > const & mapped_sites_min () const
 Minimum coordinates of all mapped sites.
cartesian< FloatType > const & mapped_sites_max () const
 Maximum coordinates of all mapped sites.
cartesian< FloatType > mapped_sites_span () const
 mapped_sites_max() - mapped_sites_min().
sgtbx::rt_mx const & special_op (std::size_t i_seq) const
 Special position operator for the i_seq'th processed site.
sgtbx::site_symmetry_table const & site_symmetry_table () const
 Table of unique site symmetries.
asu_mapping< FloatType,
IntShiftType > const & 
get_asu_mapping (std::size_t i_seq, std::size_t i_sym) const
 mappings()[i_seq][i_sym] with range checking of i_seq and i_sym.
sgtbx::rt_mx get_rt_mx (asu_mapping< FloatType, IntShiftType > const &mapping) const
 Symmetry operation original_site -> site in asu.
sgtbx::rt_mx get_rt_mx (std::size_t i_seq, std::size_t i_sym) const
 Symmetry operation original_site -> site in asu.
sgtbx::rt_mx get_rt_mx_i (asu_mapping_index_pair const &pair) const
 Symmetry operation original_site -> site in asu.
sgtbx::rt_mx get_rt_mx_j (asu_mapping_index_pair const &pair) const
 Symmetry operation original_site -> site in asu.
cartesian< FloatType > diff_vec (asu_mapping_index_pair const &pair) const
 Difference vector for the given pair.
cartesian< FloatType > map_moved_site_to_asu (cartesian< FloatType > const &moved_original_site, std::size_t i_seq, std::size_t i_sym) const
 Maps a moved site (e.g. during refinement) to the asymmetric unit.
scitbx::mat3< FloatType > r_inv_cart (std::size_t i_seq, std::size_t i_sym) const
 Rotation part of space_group(mappings()[i_seq][i_sym].i_sym_op()).inverse() in the cartesian system.
bool is_simple_interaction (asu_mapping_index_pair const &pair) const
 True if the interaction is between sites in general positions as passed to process().
asu_mapping_index_pair make_trial_pair (unsigned i_seq, unsigned j_seq, unsigned j_sym) const
 Returns a new pair after checking the indices.
asu_mapping_index_pair make_pair (unsigned i_seq, unsigned j_seq, unsigned j_sym) const
int find_i_sym (unsigned i_seq, sgtbx::rt_mx const &rt_mx) const
 Determination of the index i_sym corresponding to the given rt_mx.


Detailed Description

template<typename FloatType = double, typename IntShiftType = int>
class cctbx::crystal::direct_space_asu::asu_mappings< FloatType, IntShiftType >

Container for mapping of sites to an asymmetric unit.

The array of mappings is kept together with the parameters used to compute them to maximize consistency.


Member Function Documentation

void discard_last (  )  [inline]

Support for site_cluster_analysis.

Not available in Python.

scitbx::math::sphere_3d<FloatType> const& buffer_covering_sphere (  )  const [inline]

Sphere covering the asymmetric unit + buffer_thickness().

The sphere is computed as the minimum covering sphere for the vertices of asu(), followed by adding buffer_thickness() to the radius. In general some of the vertices of buffer_asu() may be outside buffer_covering_sphere().

af::const_ref<array_of_mappings_for_one_site> const& mappings_const_ref (  )  const [inline]

asu_mapping<FloatType, IntShiftType> const& get_asu_mapping ( std::size_t  i_seq,
std::size_t  i_sym 
) const [inline]

mappings()[i_seq][i_sym] with range checking of i_seq and i_sym.

Not available in Python.

References CCTBX_ASSERT.

Referenced by asu_mappings::diff_vec(), asu_mappings::get_rt_mx(), asu_mappings::map_moved_site_to_asu(), and asu_mappings::r_inv_cart().

sgtbx::rt_mx get_rt_mx ( std::size_t  i_seq,
std::size_t  i_sym 
) const [inline]

Symmetry operation original_site -> site in asu.

Shorthand for: get_rt_mx(get_asu_mapping(i_seq, i_sym))

References asu_mappings::get_asu_mapping(), and asu_mappings::get_rt_mx().

sgtbx::rt_mx get_rt_mx_i ( asu_mapping_index_pair const &  pair  )  const [inline]

Symmetry operation original_site -> site in asu.

Shorthand for: get_rt_mx(pair.i_seq, 0)

References asu_mappings::get_rt_mx(), and asu_mapping_index_pair::i_seq.

sgtbx::rt_mx get_rt_mx_j ( asu_mapping_index_pair const &  pair  )  const [inline]

Symmetry operation original_site -> site in asu.

Shorthand for: get_rt_mx(pair.j_seq, pair.j_sym)

References asu_mappings::get_rt_mx(), asu_mapping_index_pair::j_seq, and asu_mapping_index_pair::j_sym.

cartesian<FloatType> diff_vec ( asu_mapping_index_pair const &  pair  )  const [inline]

Difference vector for the given pair.

result = site(j_seq,j_sym) - site(i_seq,0).

References asu_mappings::get_asu_mapping(), asu_mapping_index_pair::i_seq, asu_mapping_index_pair::j_seq, and asu_mapping_index_pair::j_sym.

scitbx::mat3<FloatType> r_inv_cart ( std::size_t  i_seq,
std::size_t  i_sym 
) const [inline]

Rotation part of space_group(mappings()[i_seq][i_sym].i_sym_op()).inverse() in the cartesian system.

Useful for mapping difference vectors in cartesian space from the asymmetric unit to the original sites.

The rotation matrices are cached for maximum performance.

References asu_mappings::get_asu_mapping(), space_group::order_z(), rt_mx::r(), and asu_mappings::unit_cell().

Referenced by nonbonded::add_gradients(), bond::add_gradients(), and asu_cache::add_gradients().

bool is_simple_interaction ( asu_mapping_index_pair const &  pair  )  const [inline]

asu_mapping_index_pair make_pair ( unsigned  i_seq,
unsigned  j_seq,
unsigned  j_sym 
) const [inline]

Returns a new pair after checking the indices and asserting pair.is_active().

References CCTBX_ASSERT, asu_mapping_index_pair::is_active(), and asu_mappings::make_trial_pair().

int find_i_sym ( unsigned  i_seq,
sgtbx::rt_mx const &  rt_mx 
) const [inline]

Determination of the index i_sym corresponding to the given rt_mx.

The result value i_sym satisfies the relation:

mappings()[i_seq][i_sym] * special_op(i_seq) == rt_mx * special_op(i_seq)

The result value is -1 if the site corresponding to rt_mx is not in the asymmetric unit or the surrounding buffer region.

References rt_mx::cancel(), CCTBX_ASSERT, asu_mappings::get_rt_mx(), rt_mx::multiply(), and asu_mappings::special_op().

Referenced by shell_asu_tables_actions::shell_complete().


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

Generated on Tue Sep 1 17:12:31 2009 for cctbx by  doxygen 1.5.6