angle Class Reference

Residual and gradient calculations for angle restraint. More...

#include <angle.h>

Inheritance diagram for angle:

List of all members.

Public Member Functions

 angle ()
 Default constructor. Some data members are not initialized!
 angle (af::tiny< scitbx::vec3< double >, 3 > const &sites_, double angle_ideal_, double weight_, double slack_=0)
 Constructor.
 angle (af::const_ref< scitbx::vec3< double > > const &sites_cart, angle_proxy const &proxy)
 Coordinates are copied from sites_cart according to proxy.i_seqs, parameters are copied from proxy. This constructor ignores any symmetry operations and assumes all i_seqs to be in the asymmetric unit.
 angle (uctbx::unit_cell const &unit_cell, af::const_ref< scitbx::vec3< double > > const &sites_cart, angle_proxy const &proxy)
 Coordinates are obtained from sites_cart according to proxy.i_seqs by applying proxy.sym_ops and unit_cell, parameters are copied from proxy.
double residual () const
 weight * delta**2.
void grads_and_curvs_impl (scitbx::vec3< double > *grads, scitbx::vec3< double > *curvs, double epsilon=1e-100) const
 Core calculations.
af::shared< scitbx::vec3
< double > > 
grads_and_curvs (double epsilon=1e-100) const
 Gradients and curvatures with respect to the three sites.
af::tiny< scitbx::vec3< double >, 3 > gradients (double epsilon=1e-100) const
 Gradients with respect to the three sites.
void add_gradients (af::ref< scitbx::vec3< double > > const &gradient_array, angle_proxy::i_seqs_type const &i_seqs) const
 Support for angle_residual_sum.
void add_gradients (uctbx::unit_cell const &unit_cell, af::ref< scitbx::vec3< double > > const &gradient_array, angle_proxy const &proxy) const
 Support for angle_residual_sum.
void linearise (uctbx::unit_cell const &unit_cell, cctbx::restraints::linearised_eqns_of_restraint< double > &linearised_eqns, cctbx::xray::parameter_map< cctbx::xray::scatterer< double > > const &parameter_map, angle_proxy const &proxy) const

Public Attributes

double angle_ideal
 Parameter (usually as passed to the constructor).
double weight
 Parameter (usually as passed to the constructor).
double slack
 Parameter (can be passed to the constructor).
double delta
 Smallest difference between angle_model and angle_ideal taking the periodicity into account.
double delta_slack


Detailed Description

Residual and gradient calculations for angle restraint.

Member Function Documentation

double residual (  )  const [inline]

weight * delta**2.

See also: Hendrickson, W.A. (1985). Meth. Enzym. 115, 252-270.

References angle::weight.

void grads_and_curvs_impl ( scitbx::vec3< double > *  grads,
scitbx::vec3< double > *  curvs,
double  epsilon = 1e-100 
) const [inline]

Core calculations.

Not available in Python.

References vec3::each_mul(), angle::slack, and angle::weight.

Referenced by angle::add_gradients(), angle::gradients(), and angle::grads_and_curvs().

af::shared<scitbx::vec3<double> > grads_and_curvs ( double  epsilon = 1e-100  )  const [inline]

Gradients and curvatures with respect to the three sites.

The formula for the gradients is singular at delta = 0 and delta = 180. However, the gradients converge to zero near these singularities. To avoid numerical problems, the gradients and curvatures are set to zero exactly if the intermediate result sqrt(1-cos(angle_model)**2) < epsilon.

gradients = result[0:3] curvatures = result[3:6]

See also: http://salilab.org/modeller/manual/manual.html, "Features and their derivatives"

References angle::grads_and_curvs_impl().

af::tiny<scitbx::vec3<double>, 3> gradients ( double  epsilon = 1e-100  )  const [inline]

Gradients with respect to the three sites.

See also: grads_and_curvs()

References angle::grads_and_curvs_impl().

void add_gradients ( af::ref< scitbx::vec3< double > > const &  gradient_array,
angle_proxy::i_seqs_type const &  i_seqs 
) const [inline]

Support for angle_residual_sum.

Not available in Python.

References angle::grads_and_curvs_impl().

void add_gradients ( uctbx::unit_cell const &  unit_cell,
af::ref< scitbx::vec3< double > > const &  gradient_array,
angle_proxy const &  proxy 
) const [inline]

Support for angle_residual_sum.

Not available in Python.

Inefficient implementation, r_inv_cart is not cached. TODO: use asu_mappings to take advantage of caching of r_inv_cart.

References angle::grads_and_curvs_impl(), angle_proxy::i_seqs, cctbx::geometry_restraints::r_inv_cart(), and angle_proxy::sym_ops.


Member Data Documentation

double delta

Smallest difference between angle_model and angle_ideal taking the periodicity into account.

See also: angle_delta_deg


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

Generated on Thu Jun 19 15:34:56 2014 for cctbx by  doxygen 1.5.6