9 #ifndef IMPISD_WEIGHT_H
10 #define IMPISD_WEIGHT_H
12 #include "isd_config.h"
19 IMPISD_BEGIN_NAMESPACE
21 static const int IMPISD_MAX_WEIGHTS = 1000;
57 IMPISD_DEPRECATED_METHOD_DECL(2.12)
58 static
IntKey get_nstates_key();
61 static
IntKey get_number_of_weights_key();
64 static
FloatKey get_weight_key(
int i);
70 Float get_weight(
int i) const;
73 algebra::
VectorKD get_weights() const;
77 void set_weight_lazy(
int i,
Float wi);
81 void set_weights_lazy(const algebra::
VectorKD& w);
85 void set_weights(const algebra::
VectorKD& w);
88 bool get_weights_are_optimized() const;
91 void set_weights_are_optimized(
bool tf);
94 Float get_weight_derivative(
int i) const;
97 algebra::
VectorKD get_weights_derivatives() const;
100 void add_to_weight_derivative(
int i,
Float dwi,
104 void add_to_weights_derivatives(const algebra::
VectorKD& dw,
113 void add_weight_lazy(
Float wi = 0);
119 void add_weight(
Float wi = 0);
121 IMPISD_DEPRECATED_METHOD_DECL(2.12)
122 Int get_number_of_states() const;
125 Int get_number_of_weights() const;
128 algebra::UnitSimplexKD get_unit_simplex() const;
136 void set_number_of_weights_lazy(
Int nweights);
142 void set_number_of_weights(
Int nweights);
150 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
156 WeightSimplexConstraint(
Particle *p)
157 : IMP::
Constraint(p->get_model(),
"WeightSimplexConstraint%1%")
The base class for decorators.
Add weights to a particle.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Storage of a model, its restraints, constraints and particles.
Simple unit simplex class.
Implement a constraint on the Model.
Class for storing model, its restraints, constraints, and particles.
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Various general useful macros for IMP.
#define IMP_DECORATOR_SETUP_0(Name)
Interface to specialized Particle types (e.g. atoms)
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
#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.
int Int
Basic integer value.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.