13 #ifndef IMPCONTAINER_PREDICATE_QUADS_RESTRAINT_H
14 #define IMPCONTAINER_PREDICATE_QUADS_RESTRAINT_H
16 #include <IMP/container/container_config.h>
18 #include <IMP/internal/InternalDynamicListQuadContainer.h>
19 #include <IMP/compatibility/map.h>
26 IMPCONTAINER_BEGIN_NAMESPACE
42 typedef IMP::kernel::internal::InternalDynamicListQuadContainer List;
43 typedef compatibility::map<unsigned int, base::Pointer<List> >
48 mutable bool updated_;
49 bool error_on_unknown_;
50 void update_lists_if_necessary()
const;
51 bool assign_pair(
const ParticleIndexQuad& index)
const;
54 QuadContainerAdaptor input,
55 std::string name=
"PredicateQuadsRestraint %1%");
62 template <
class Score>
65 "You must add this restraint to the model"
66 <<
" first, sorry, this can be fixed.");
68 score->get_name()+
" input"));
70 restraints_.back()->set_model(get_model());
71 restraints_.back()->set_was_used(
true);
72 containers_[predicate_value]=c;
77 template <
class Score>
82 "You must add this restraint to the model"
83 <<
" first, sorry, this can be fixed.");
85 score->get_name()+
" input"));
87 restraints_.back()->set_model(get_model());
91 void set_score(
int predicate_value,
QuadScore *score) {
92 set_score<QuadScore>(predicate_value, score);
94 void set_unknown_score(
QuadScore *score) {
95 set_unknown_score<QuadScore>(score);
102 error_on_unknown_=tf;
109 return containers_.find(predicate_value)->second
119 Restraints do_create_current_decomposition() const;
122 IMPCONTAINER_END_NAMESPACE