12#ifndef IMPKERNEL_PAIR_SCORE_H
13#define IMPKERNEL_PAIR_SCORE_H
15#include <IMP/kernel_config.h>
18#include "internal/container_helpers.h"
20#include <cereal/access.hpp>
21#include <cereal/types/base_class.hpp>
24IMPKERNEL_BEGIN_NAMESPACE
52 PairScore(std::string name =
"PairScore %1%");
97 unsigned int lower_bound,
98 unsigned int upper_bound,
99 bool all_indexes_checked=
false)
const;
111 unsigned int lower_bound,
112 unsigned int upper_bound,
113 std::vector<double> &score,
114 bool all_indexes_checked=
false)
const;
127 const std::vector<unsigned> &indexes,
128 std::vector<double> &score,
129 bool all_indexes_checked=
false)
const;
153 unsigned int lower_bound,
154 unsigned int upper_bound,
155 bool all_indexes_checked=
false)
const;
175 friend class cereal::access;
177 template<
class Archive>
void serialize(Archive &ar) {
179 ar(cereal::base_class<Object>(
this));
183IMPKERNEL_END_NAMESPACE
Class for adding derivatives from restraints to the model.
Class for adding derivatives from restraints to the model.
Class for storing model, its restraints, constraints, and particles.
Object(std::string name)
Construct an object with the given name.
A base class for modifiers of ParticlePairsTemp.
Restraints create_current_decomposition(Model *m, const ParticleIndexPair &vt) const
virtual bool check_indexes(Model *m, const ParticleIndexes &pis) const
Check the given particle indexes for necessary attributes.
virtual double evaluate_if_good_index(Model *m, const ParticleIndexPair &vt, DerivativeAccumulator *da, double max) const
Compute the score and the derivative if needed, only if "good".
virtual Restraints do_create_current_decomposition(Model *m, const ParticleIndexPair &vt) const
Override this to return your own decomposition.
virtual double evaluate_indexes(Model *m, const ParticleIndexPairs &o, DerivativeAccumulator *da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=false) const
Compute the score and the derivative if needed over a set.
virtual double evaluate_index(Model *m, const ParticleIndexPair &vt, DerivativeAccumulator *da) const =0
Compute the score and the derivative if needed.
virtual double evaluate_indexes_scores(Model *m, const ParticleIndexPairs &o, DerivativeAccumulator *da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double > &score, bool all_indexes_checked=false) const
Compute the score and the derivative if needed over a set.
virtual double evaluate_indexes_delta(Model *m, const ParticleIndexPairs &o, DerivativeAccumulator *da, const std::vector< unsigned > &indexes, std::vector< double > &score, bool all_indexes_checked=false) const
Compute the change in score and the derivative if needed over a set.
virtual double evaluate_if_good_indexes(Model *m, const ParticleIndexPairs &o, DerivativeAccumulator *da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=false) const
Base class for objects that take particle arguments and read from them.
Classes used in the construction of ModelObjects.
IMP::Vector< IMP::Pointer< Restraint > > Restraints
IMP::Vector< ParticleIndexPair, std::allocator< ParticleIndexPair > > ParticleIndexPairs
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Array< 2, ParticleIndex > ParticleIndexPair
An ordered pair of particles, each identified by its ParticleIndex.
Array< 2, WeakPointer< Particle >, Particle * > ParticlePair
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Set up destructor for a ref counted object.
Various general useful macros for IMP.
#define IMP_UNUSED(variable)