9 #ifndef IMPCORE_MONTE_CARLO_MOVER_H
10 #define IMPCORE_MONTE_CARLO_MOVER_H
12 #include <IMP/core/core_config.h>
18 #include <cereal/access.hpp>
19 #include <cereal/types/base_class.hpp>
21 IMPCORE_BEGIN_NAMESPACE
30 ParticleIndexes, moved_particles,
double,
45 unsigned int num_proposed_;
46 unsigned int num_rejected_;
49 friend class cereal::access;
51 template<
class Archive>
void serialize(Archive &ar) {
52 ar(cereal::base_class<ModelObject>(
this),
53 num_proposed_, num_rejected_, has_move_);
70 "Mover already had proposed a move. "
71 <<
" This probably means you added it twice: " << get_name());
97 unsigned int get_number_of_proposed()
const {
return num_proposed_; }
98 unsigned int get_number_of_accepted()
const {
99 return num_proposed_ - num_rejected_;
101 void reset_statistics() {
108 virtual MonteCarloMoverResult do_propose() = 0;
110 virtual void do_reject() = 0;
121 IMPCORE_END_NAMESPACE
Functions and adaptors for dealing with particle indexes.
virtual void do_accept()
Implement accept_proposed_move(); default implementation is empty.
#define IMP_OBJECT_LOG
Set the log level to the object's log level.
Storage of a model, its restraints, constraints and particles.
Return value of the MonteCarloMover::propose() function.
Macros to help in defining tuple classes.
A more IMP-like version of the std::vector.
Class for storing model, its restraints, constraints, and particles.
Base class for objects in a Model that depend on other objects.
A base class for classes which perturb particles.
void accept()
Accept/commit any changes made to the Particles.
void reject()
Roll back any changes made to the Particles.
Base class for objects in a Model that depend on other objects.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
virtual ModelObjectsTemp do_get_outputs() const override
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
ModelObjectsTemp get_inputs() const
IMP::Vector< MonteCarloMoverResult > MonteCarloMoverResults
void set_was_used(bool tf) const
MonteCarloMoverResult propose()
Propose a modification.