8 #ifndef IMPISD_NUISANCE_H
9 #define IMPISD_NUISANCE_H
11 #include "isd_config.h"
17 IMPISD_BEGIN_NAMESPACE
37 return m->get_has_attribute(get_nuisance_key(), pi);
41 Float get_nuisance()
const {
44 void set_nuisance(
Float d);
52 bool get_has_lower()
const;
53 Float get_lower()
const;
56 void set_lower(
Float d);
60 bool get_has_upper()
const;
61 Float get_upper()
const;
64 void set_upper(
Float d);
68 Float get_nuisance_derivative()
const {
69 return get_particle()->get_derivative(get_nuisance_key());
73 get_particle()->add_to_derivative(get_nuisance_key(), d, accum);
76 bool get_nuisance_is_optimized()
const {
77 return get_particle()->get_is_optimized(get_nuisance_key());
80 void set_nuisance_is_optimized(
bool val) {
81 get_particle()->set_is_optimized(get_nuisance_key(), val);
84 friend class NuisanceScoreState;
89 void enforce_bounds();
96 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
97 class IMPISDEXPORT NuisanceScoreState :
public ScoreState
104 ScoreState(p->get_model(),
"NuisanceScoreState%1%"), p_(p) {}
107 friend class Nuisance;
108 virtual void do_before_evaluate() IMP_OVERRIDE;
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
IMP::kernel::DerivativeAccumulator DerivativeAccumulator
#define IMP_DECORATOR_METHODS(Name, Parent)
static bool get_is_setup(Particle *p)
Return true if the particle can be cast to the decorator.
#define IMP_DECORATOR_SETUP_0(Name)
Add nuisance parameter to particle.
Import IMP/kernel/decorator_macros.h in the namespace.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
Key< 4, true > ObjectKey
The type used to identify an Object attribute.
IMP::kernel::Particle Particle
Import IMP/kernel/score_state_macros.h in the namespace.
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.
Class for storing model, its restraints, constraints, and particles.