scatterer Class Template Reference

Information about an atom that is needed for a structure factor calculation. More...

#include <scatterer.h>

List of all members.

Public Types

typedef FloatType float_type
 Facilitates meta-programming.
typedef LabelType label_type
 Facilitates meta-programming.
typedef ScatteringTypeType scattering_type_type
 Facilitates meta-programming.

Public Member Functions

 scatterer ()
 Default constructor. Data members are not initialized!
 scatterer (LabelType const &label_, fractional< FloatType > const &site_, FloatType const &u_iso_, FloatType const &occupancy_, ScatteringTypeType const &scattering_type_, FloatType fp_, FloatType fdp_)
 Initialization with isotropic displacement parameter.
 scatterer (LabelType const &label_, fractional< FloatType > const &site_, scitbx::sym_mat3< FloatType > const &u_star_, FloatType const &occupancy_, ScatteringTypeType const &scattering_type_, FloatType fp_, FloatType fdp_)
 Initialization with anisotropic displacement parameters.
void set_use_u (bool iso, bool aniso)
void set_use_u_iso_only ()
void set_use_u_aniso_only ()
void convert_to_isotropic (uctbx::unit_cell const &unit_cell)
 Converts u_star to the equivalent u_iso in place.
void convert_to_anisotropic (uctbx::unit_cell const &unit_cell)
 Converts u_iso to u_star in place.
bool is_positive_definite_u (uctbx::unit_cell const &unit_cell) const
 Tests u_iso > 0 or adptbx::is_positive_definite(u_cart).
bool is_positive_definite_u (uctbx::unit_cell const &unit_cell, FloatType const &u_cart_tolerance) const
FloatType b_iso (void) const
 get u_iso as b_iso.
FloatType u_iso_or_equiv (const uctbx::unit_cell *unit_cell) const
 Extracts sum of u_iso and u_star_as_u_iso (considering flags).
scitbx::sym_mat3< double > u_cart_plus_u_iso (const uctbx::unit_cell *unit_cell) const
 Extracts sum of u_iso and u_star_as_u_cart (considering flags).
void tidy_u (uctbx::unit_cell const &unit_cell, sgtbx::site_symmetry_ops const &site_symmetry_ops, FloatType const &u_min, FloatType const &u_max, FloatType const &anisotropy_min)
 Changes u_iso or u_star in place such that u_iso >= u_min.
void shift_u (uctbx::unit_cell const &unit_cell, FloatType const &u_shift)
 Changes u_iso or u_star in place by adding u_shift.
void shift_occupancy (FloatType const &q_shift)
 Changes occupancy in place by adding q_shift.
sgtbx::site_symmetry apply_symmetry (uctbx::unit_cell const &unit_cell, sgtbx::space_group const &space_group, FloatType const &min_distance_sym_equiv=0.5, FloatType const &u_star_tolerance=0, bool assert_min_distance_sym_equiv=true)
 Computes multiplicity(), weight_without_occupancy(), weight() and symmetry-averaged anisotropic displacement parameters.
void apply_symmetry (sgtbx::site_symmetry_ops const &site_symmetry_ops, FloatType const &u_star_tolerance=0)
 Computes multiplicity(), weight_without_occupancy(), weight() and symmetry-averaged anisotropic displacement parameters.
void apply_symmetry_site (sgtbx::site_symmetry_ops const &site_symmetry_ops)
 Apply previously determined site symmetry to site.
void apply_symmetry_u_star (sgtbx::site_symmetry_ops const &site_symmetry_ops, FloatType const &u_star_tolerance=0)
 Apply previously determined site symmetry to u_star.
int multiplicity () const
 Access to "multiplicity" computed by apply_symmetry().
FloatType weight_without_occupancy () const
 Access to "weight_without_occupancy" computed by apply_symmetry().
FloatType weight () const
 Access to "weight" computed by apply_symmetry().
void setstate (int multiplicity, FloatType weight_without_occupancy)
 Helper function for object serialization (Python pickle).
std::string report_negative_u_iso (const char *where_file_name, long where_line_number) const
 Exception message. Not available in Python.
std::string report_details (uctbx::unit_cell const &unit_cell, const char *prefix) const
 Details for exception messages.

Public Attributes

LabelType label
 Direct access to label.
ScatteringTypeType scattering_type
 Direct access to the scattering type.
FloatType fp
 Direct access to f-prime.
FloatType fdp
 Direct access to f-double-prime.
fractional< FloatType > site
 Direct access to fractional coordinates.
FloatType occupancy
 Direct access to occupancy factor.
FloatType u_iso
 Direct access to isotropic displacement parameter.
scitbx::sym_mat3< FloatType > u_star
 Direct access to anisotropic displacement parameters.
scatterer_flags flags
 Support for refinement.


Detailed Description

template<typename FloatType = double, typename LabelType = std::string, typename ScatteringTypeType = std::string>
class cctbx::xray::scatterer< FloatType, LabelType, ScatteringTypeType >

Information about an atom that is needed for a structure factor calculation.

Constructors are provided for scatterers with isotropic and anisotropic displacement parameters (temperature factors).

The anisotropic displacement parameters have to be "u_star." Conversions between different conventions for the representation of anisotropic displacement parameters are provided by cctbx::adptbx.

One of the apply_symmetry() member functions has to be called before the scatterer can be used in a structure factor calculation.


Member Function Documentation

void convert_to_isotropic ( uctbx::unit_cell const &  unit_cell  )  [inline]

Converts u_star to the equivalent u_iso in place.

The u_star values are reset to -1.

void convert_to_anisotropic ( uctbx::unit_cell const &  unit_cell  )  [inline]

Converts u_iso to u_star in place.

The u_iso value is reset to -1.

bool is_positive_definite_u ( uctbx::unit_cell const &  unit_cell,
FloatType const &  u_cart_tolerance 
) const [inline]

Tests u_iso >= u_cart_tolerance or adptbx::is_positive_definite(u_cart, u_cart_tolerance).

void tidy_u ( uctbx::unit_cell const &  unit_cell,
sgtbx::site_symmetry_ops const &  site_symmetry_ops,
FloatType const &  u_min,
FloatType const &  u_max,
FloatType const &  anisotropy_min 
) [inline]

Changes u_iso or u_star in place such that u_iso >= u_min.

In the anisotropic case the eigenvalues of u_cart are changed using adptbx::eigenvalue_filtering().

void shift_u ( uctbx::unit_cell const &  unit_cell,
FloatType const &  u_shift 
) [inline]

Changes u_iso or u_star in place by adding u_shift.

If u_shift is negative tidy_u() should be called after shift_u().

sgtbx::site_symmetry apply_symmetry ( uctbx::unit_cell const &  unit_cell,
sgtbx::space_group const &  space_group,
FloatType const &  min_distance_sym_equiv = 0.5,
FloatType const &  u_star_tolerance = 0,
bool  assert_min_distance_sym_equiv = true 
) [inline]

Computes multiplicity(), weight_without_occupancy(), weight() and symmetry-averaged anisotropic displacement parameters.

This member function or the other overload must be called before the scatterer is used in a structure factor calculation.

See also: apply_symmetry_site, apply_symmetry_u_star, cctbx::sgtbx::site_symmetry, cctbx::sgtbx::site_symmetry::exact_site, cctbx::sgtbx::site_symmetry_ops::average_u_star

void apply_symmetry ( sgtbx::site_symmetry_ops const &  site_symmetry_ops,
FloatType const &  u_star_tolerance = 0 
) [inline]

Computes multiplicity(), weight_without_occupancy(), weight() and symmetry-averaged anisotropic displacement parameters.

This member function or the other overload must be called before the scatterer is used in a structure factor calculation.

See also: apply_symmetry_site, apply_symmetry_u_star

References site_symmetry_ops::is_point_group_1(), site_symmetry_ops::matrices(), and site_symmetry_ops::multiplicity().

void apply_symmetry_site ( sgtbx::site_symmetry_ops const &  site_symmetry_ops  )  [inline]

Apply previously determined site symmetry to site.

Shorthand for: site = site_symmetry_ops.special_op() * site

void apply_symmetry_u_star ( sgtbx::site_symmetry_ops const &  site_symmetry_ops,
FloatType const &  u_star_tolerance = 0 
) [inline]

Apply previously determined site symmetry to u_star.

For scatterers with anisotropic displacement parameters, the symmetry-averaged u_star is determined using cctbx::sgtbx::site_symmetry_ops::average_u_star . If u_star_tolerance is greater than zero an exception is thrown if the discrepancy between components of u_star before and after the application of the site symmetry is greater than u_star_tolerance.

References site_symmetry_ops::average_u_star(), CCTBX_ASSERT, site_symmetry_ops::is_compatible_u_star(), and site_symmetry_ops::is_point_group_1().

int multiplicity (  )  const [inline]

Access to "multiplicity" computed by apply_symmetry().

multiplicity is the number of symmetry equivalent positions of this scatterer in the unit cell.

FloatType weight_without_occupancy (  )  const [inline]

Access to "weight_without_occupancy" computed by apply_symmetry().

weight_without_occupancy is defined as multiplicity() / space_group.order_z(), with space_group as passed to apply_symmetry(). weight_without_occupancy() is used in the computation of structure factor derivatives.

FloatType weight (  )  const [inline]

Access to "weight" computed by apply_symmetry().

The weight is defined as occupancy * multiplicity() / space_group.order_z(), with space_group as passed to apply_symmetry(). The weight() is used in structure factor calculations.

void setstate ( int  multiplicity,
FloatType  weight_without_occupancy 
) [inline]

Helper function for object serialization (Python pickle).

For internal use only.


Member Data Documentation

ScatteringTypeType scattering_type

Direct access to the scattering type.

See also: eltbx::xray_scattering::it1992, eltbx::xray_scattering::wk1995

Referenced by scatterer< float_type >::report_details().

FloatType fp

Direct access to f-prime.

f-prime is the dispersive contribution to the scattering factor.

Referenced by scatterer< float_type >::report_details().

FloatType fdp

Direct access to f-double-prime.

f-double-prime is the anomalous contribution to the scattering factor.

Referenced by scatterer< float_type >::report_details().

fractional<FloatType> site


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

Generated on Thu Jun 19 15:35:07 2014 for cctbx by  doxygen 1.5.6