ObjCryst++  1.5CVS
Public Member Functions | Private Attributes
ObjCryst::Restraint Class Reference

Restraint: generic class for a restraint of a given model. More...

Inheritance diagram for ObjCryst::Restraint:
ObjCryst::MolBond ObjCryst::MolBondAngle ObjCryst::MolDihedralAngle ObjCryst::RefinablePar

List of all members.

Public Member Functions

 Restraint ()
 Default constructor, sets RefParType to gpRefParTypeObjCryst.
 Restraint (const RefParType *type)
 constructor specifying the type
virtual const RefParTypeGetType () const
virtual void SetType (const RefParType *type)
virtual REAL GetLogLikelihood () const
 Get -ln(likelihood) for this restraint.

Private Attributes

const RefParTypempRefParType

Detailed Description

Restraint: generic class for a restraint of a given model.

This defines only the category (RefParType) of restraint, and the function to access the log(likelihood) associated to this restraint and the current model.

By default: -log(likelihood)=0, and the function must be overloaded for "real" restraints.

Note:
the log(likelihood) must always include the normalization term, so that variances can also optimized during the maximum likelihood optimization. e.g.:
  • $ P=\frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-(calc-expected)^2}{\sigma^2}}$
  • $ -\log(P)= \log\left(\sqrt{2\pi\sigma^2}\right) + \left(\frac{calc-expected}{\sigma} \right)^2$

forgetting the normalization term would result in making the optimization diverge towards infinite variances.


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