7 #ifndef IMPISD_FNORMAL_H
8 #define IMPISD_FNORMAL_H
10 #include <IMP/isd/isd_config.h>
16 IMPISD_BEGIN_NAMESPACE
34 FNormal(
double FA,
double JA,
double FM,
double sigma)
35 :
base::Object(
"FNormal %1%"), FA_(FA), JA_(JA), FM_(FM), sigma_(sigma) {}
38 virtual double evaluate()
const {
39 return -log(JA_ / sigma_) + 0.5 * log(2 *
IMP::PI) +
40 1 / (2 * square(sigma_)) * square(FA_ - FM_);
44 virtual double evaluate_derivative_FA()
const {
45 return (FA_ - FM_) / square(sigma_);
48 virtual double evaluate_derivative_JA()
const {
return -1 / JA_; }
51 virtual double evaluate_derivative_FM()
const {
52 return (FM_ - FA_) / square(sigma_);
55 virtual double evaluate_derivative_sigma()
const {
56 return 1 / sigma_ - square(FA_ - FM_) / pow(sigma_, 3);
60 virtual double density()
const {
61 return JA_ / (sqrt(2 *
IMP::PI) * sigma_) *
62 exp(-square(FA_ - FM_) / (2 * square(sigma_)));
66 void set_FA(
double f) { FA_ = f; }
67 void set_JA(
double f) { JA_ = f; }
68 void set_FM(
double f) { FM_ = f; }
69 void set_sigma(
double f) { sigma_ = f; }
76 double FA_, JA_, FM_, sigma_;
static const double PI
the constant pi
Import IMP/kernel/constants.h in the namespace.
Import IMP/kernel/macros.h in the namespace.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Storage of a model, its restraints, constraints and particles.
Common base class for heavy weight IMP objects.