10#ifndef IMPCORE_CONSTANT_RESTRAINT_H
11#define IMPCORE_CONSTANT_RESTRAINT_H
13#include <IMP/core/core_config.h>
17#include <cereal/access.hpp>
18#include <cereal/types/base_class.hpp>
19#include <cereal/types/polymorphic.hpp>
21IMPCORE_BEGIN_NAMESPACE
30 friend class cereal::access;
32 template<
class Archive>
void serialize(Archive &ar) {
33 ar(cereal::base_class<Restraint>(
this), v_);
Abstract base class for all restraints.
Class for adding derivatives from restraints to the model.
Restraint(Model *m, std::string name)
Create a restraint and register it with the model.
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ConstantRestraint(Model *m, Float v)
Add v to the total score.
virtual IMP::ModelObjectsTemp do_get_inputs() const override
double Float
Basic floating-point value (could be float, double...).
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.