angle Class Reference

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

#include <angle.h>

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_)
 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=1.e-100) const
 Core calculations.
af::shared< scitbx::vec3
< double > > 
grads_and_curvs (double epsilon=1.e-100) const
 Gradients and curvatures with respect to the three sites.
af::tiny< scitbx::vec3< double >, 3 > gradients (double epsilon=1.e-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.

Public Attributes

af::tiny< scitbx::vec3< double >, 3 > sites
 Cartesian coordinates of sites forming the angle.
double angle_ideal
 Parameter (usually as passed to the constructor).
double weight
 Parameter (usually as passed to the constructor).
bool have_angle_model
 false in singular situations.
double angle_model
 Value of angle formed by the sites.
double delta
 Smallest difference between angle_model and angle_ideal taking the periodicity into account.


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::delta, and angle::weight.

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

Core calculations.

Not available in Python.

References angle::delta, vec3::each_mul(), angle::have_angle_model, 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 = 1.e-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 = 1.e-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 optional_copy::get(), 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

Referenced by angle::grads_and_curvs_impl(), and angle::residual().


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