8 #ifndef IMPISD_NUISANCE_H
9 #define IMPISD_NUISANCE_H
11 #include "isd_config.h"
16 IMPISD_BEGIN_NAMESPACE
27 double nuisance = 1.0);
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());
70 void add_to_nuisance_derivative(
Float d, DerivativeAccumulator &accum) {
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 {
99 NuisanceScoreState(Particle *p)
100 : ScoreState(p->get_model(),
"NuisanceScoreState%1%"), p_(p) {}
103 friend class Nuisance;
105 virtual
void do_after_evaluate(DerivativeAccumulator *da)
IMP_OVERRIDE;
The base class for decorators.
Smart pointer to Object-derived classes that does not refcount.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Class for storing model, its restraints, constraints, and particles.
Add nuisance parameter to particle.
Various general useful macros for IMP.
#define IMP_DECORATOR_SETUP_0(Name)
Particle * get_particle() const
Returns the particle decorated by this decorator.
Key< 4 > ObjectKey
The type used to identify an Object attribute.
Interface to specialized Particle types (e.g. atoms)
#define IMP_DECORATOR_METHODS(Name, Parent)
double Float
Basic floating-point value (could be float, double...)
Class to handle individual particles of a Model object.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.