Clipper
clipper::ResolutionFn_nonlinear Class Reference

2nd order resolution function evaluator More...

#include <resol_fn.h>

Inheritance diagram for clipper::ResolutionFn_nonlinear:
clipper::ResolutionFn

Public Member Functions

 ResolutionFn_nonlinear (const HKL_info &hkl_info, const BasisFn_base &basisfn, const TargetFn_base &targetfn, const std::vector< ftype > &params, const ftype damp=0.0, const bool debug=false)
 constructor: need reflections, basis fn and target fn.
Public Member Functions inherited from clipper::ResolutionFn
 ResolutionFn (const HKL_info &hkl_info, const BasisFn_base &basisfn, const TargetFn_base &targetfn, const std::vector< ftype > &params, const ftype damp=0.0, const bool debug=false)
 constructor: need reflections, basis fn and target fn.
ftype f (const HKL_info::HKL_reference_index &ih) const
 return the value of the basis function with the current paramters
const std::vector< ftype > & params () const
 return the values of the parameters
void debug () const
 print the target, gradient, and curvatures with respect to the params

Additional Inherited Members

Protected Member Functions inherited from clipper::ResolutionFn
void calc_derivs (const std::vector< ftype > &params, ftype &r, std::vector< ftype > &drdp, Matrix<> &drdp2) const
 calculate derivatives of target wrt params
 ResolutionFn ()
 null constructor
Protected Attributes inherited from clipper::ResolutionFn
const HKL_infohkl_info_
 reflection list
const TargetFn_basetargetfn_
 target function
const BasisFn_basebasisfn_
 basis function
std::vector< ftypeparams_
 basis function parameters
Cell cell_
 cell

Detailed Description

2nd order resolution function evaluator

This is an automatic evaluator for arbitrary functions of HKL, most commonly used for evaluating a function of resolution (such a mean F^2 or sigmaa), although more general tasks including local scaling of reflections and anisotropic functions can also be handled. This form is for target functions which approach zero quadratically, e.g. least-squares targets.

Note
This version implements a minimiser which uses both Newton-Raphson and gradient steps depending on the situation. It can be used for non-quadratic targets or non-linear basis functions.

To evaluate a resolution function, this class must be provided with two objects:

  • The basis function (and gradients), which describes the value of the function for any reflection given a set of paramters.
  • The target function (and derivatives), which is used to determine the values of the basis function parameters.

Constructor & Destructor Documentation

◆ ResolutionFn_nonlinear()

clipper::ResolutionFn_nonlinear::ResolutionFn_nonlinear ( const HKL_info & hkl_info,
const BasisFn_base & basisfn,
const TargetFn_base & targetfn,
const std::vector< ftype > & params,
const ftype damp = 0.0,
const bool debug = false )

constructor: need reflections, basis fn and target fn.

The constructor performs the full minimisation calculation.

Parameters
hkl_infoHKL_info object which provides the reflection list.
basisfnThe basis function used to describe the desired property.
targetfnThe target function to be minimised.
damp_If > 0.0, shifts are fdamped during early cycles to help convergence with difficult bases/target conbinations

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