8 #ifndef IMPISD_NUISANCE_H
9 #define IMPISD_NUISANCE_H
11 #include "isd_config.h"
16 IMPISD_BEGIN_NAMESPACE
27 double nuisance = 1.0);
35 return m->get_has_attribute(get_nuisance_key(), pi);
39 Float get_nuisance()
const {
42 void set_nuisance(
Float d);
50 bool get_has_lower()
const;
51 Float get_lower()
const;
54 void set_lower(
Float d);
58 bool get_has_upper()
const;
59 Float get_upper()
const;
62 void set_upper(
Float d);
66 Float get_nuisance_derivative()
const {
67 return get_particle()->get_derivative(get_nuisance_key());
71 get_particle()->add_to_derivative(get_nuisance_key(), d, accum);
74 bool get_nuisance_is_optimized()
const {
75 return get_particle()->get_is_optimized(get_nuisance_key());
78 void set_nuisance_is_optimized(
bool val) {
79 get_particle()->set_is_optimized(get_nuisance_key(), val);
82 friend class NuisanceScoreState;
87 void enforce_bounds();
93 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
94 class IMPISDEXPORT NuisanceScoreState :
public ScoreState {
100 :
ScoreState(p->get_model(),
"NuisanceScoreState%1%"), p_(p) {}
103 friend class Nuisance;
Import IMP/kernel/Decorator.h in the namespace.
IMP::kernel::ScoreState ScoreState
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
Particle * get_particle() const
Returns the particle decorated by this decorator.
IMP::kernel::DerivativeAccumulator DerivativeAccumulator
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_DECORATOR_SETUP_0(Name)
Add nuisance parameter to particle.
Import IMP/kernel/decorator_macros.h in the namespace.
Class to handle individual model particles.
Key< 4, true > ObjectKey
The type used to identify an Object attribute.
IMP::kernel::Particle Particle
double Float
Basic floating-point value (could be float, double...)
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for storing model, its restraints, constraints, and particles.