9 #ifndef IMPKERNEL_GENERIC_H
10 #define IMPKERNEL_GENERIC_H
12 #include <IMP/kernel_config.h>
13 #include "internal/scoring_functions.h"
14 #include "internal/ContainerRestraint.h"
15 #include "internal/TupleRestraint.h"
16 #include "internal/TupleConstraint.h"
18 IMPKERNEL_BEGIN_NAMESPACE
22 template <
class Restra
intType>
35 template <
class Score>
36 inline Restraint *create_restraint(Score *s,
const typename Score::Argument &t,
37 std::string name = std::string()) {
38 return internal::create_tuple_restraint(
39 s, IMP::internal::get_model(t),
43 template <
class Score>
44 inline Restraint *create_restraint(
const Score *s,
45 const typename Score::Argument &t,
46 std::string name = std::string()) {
47 return internal::create_tuple_restraint(
48 const_cast<Score *>(s), IMP::internal::get_model(t),
52 template <
class Score,
class Container>
54 std::string name = std::string()) {
55 return internal::create_container_restraint(const_cast<Score *>(s), t, name);
62 template <
class Before,
class After>
64 const typename Before::Argument &t,
65 std::string name = std::string()) {
66 return internal::create_tuple_constraint(b, a, t, name);
69 IMPKERNEL_END_NAMESPACE
const double NO_MAX
Use this value when you want to turn off maximum for restraint evaluation.
Restraint * create_restraint(Score *s, Container *c, std::string name=std::string())
Constraint * create_constraint(Before *b, After *a, const typename Before::Argument &t, std::string name=std::string())
ScoringFunction * create_scoring_function(RestraintType *rs, double weight=1.0, double max=NO_MAX, std::string name=std::string())
Create a ScoringFunction on a single restraint.
Implement a constraint on the Model.
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Represents a scoring function on the model.
A restraint is a term in an IMP ScoringFunction.