9 #ifndef IMPKERNEL_RESTRAINT_SET_H
10 #define IMPKERNEL_RESTRAINT_SET_H
12 #include <IMP/kernel_config.h>
17 #include <cereal/access.hpp>
18 #include <cereal/types/base_class.hpp>
19 #include <cereal/types/polymorphic.hpp>
21 IMPKERNEL_BEGIN_NAMESPACE
45 void show_it(std::ostream &out)
const;
47 friend class cereal::access;
49 template<
class Archive>
void serialize(Archive &ar) {
50 ar(cereal::base_class<Restraint>(
this), mutable_access_restraints());
58 const std::string &name =
"RestraintSet %1%");
63 const std::string &name =
"RestraintSet %1%");
77 if (container) on_remove(container, obj));
84 std::pair<RestraintsTemp, RestraintSetsTemp> get_non_sets_and_sets()
const;
91 double max = std::numeric_limits<double>::max())
const override;
94 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
99 void do_add_score_and_derivatives_moved(
113 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
117 for (It c = b; c != e; ++c) {
121 get_restraints_internal(rs->restraints_begin(), rs->restraints_end(),
134 get_restraints_internal(b, e, ret);
135 std::sort(ret.begin(), ret.end());
136 ret.erase(std::unique(ret.begin(), ret.end()), ret.end());
140 IMPKERNEL_END_NAMESPACE
RestraintsTemp get_restraints(const Subset &s, const ParticleStatesTable *pst, const DependencyGraph &dg, RestraintSet *rs)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
virtual ScoringFunction * create_scoring_function(double weight=1.0, double max=NO_MAX) const
Create a scoring function with only this restraint.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
virtual Restraints do_create_decomposition() const
IMP::Vector< IMP::WeakPointer< Restraint > > RestraintsTemp
Macros to define containers of objects.
Object used to hold a set of restraints.
Class for storing model, its restraints, constraints, and particles.
virtual Restraints do_create_current_decomposition() const
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Class for adding up scores during ScoringFunction evaluation.
virtual double get_last_score() const
Represents a scoring function on the model.
Represents a scoring function on the model.
Abstract base class for all restraints.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.