9#ifndef IMPCORE_BALL_MOVER_H
10#define IMPCORE_BALL_MOVER_H
12#include <IMP/core/core_config.h>
16#include <cereal/access.hpp>
17#include <cereal/types/base_class.hpp>
18#include <cereal/types/polymorphic.hpp>
20IMPCORE_BEGIN_NAMESPACE
26class IMPCOREEXPORT
BallMover :
public MonteCarloMover {
32 friend class cereal::access;
34 template<
class Archive>
void serialize(Archive &ar) {
35 ar(cereal::base_class<MonteCarloMover>(
this),
36 pis_, keys_, radius_, originals_);
74 void set_radius(
Float radius) {
80 Float get_radius()
const {
return radius_; }
82 ParticleIndexes get_indexes()
const {
return pis_; }
83 FloatKeys get_keys()
const {
return keys_; }
The base class for movers for Monte Carlo optimization.
#define IMP_ALWAYS_CHECK(condition, message, exception_name)
Throw an exception if a check fails.
An exception for an invalid value being passed to IMP.
BallMover(Model *m, ParticleIndex pi, double radius)
Move the x,y,z coordinates of pi within a ball of specified radius.
BallMover(Model *m, const ParticleIndexes &pis, const FloatKeys &vars, Float radius)
Move specified variables of particles within a ball of specified radius.
BallMover(Model *m, const ParticleIndexes &pis, Float radius)
Move the x,y,z coordinates of pis within a ball of specified radius.
virtual ModelObjectsTemp do_get_inputs() const override
virtual void do_reject() override
Restore original attributes from before do_propose().
BallMover(Model *m, ParticleIndex pi, const FloatKeys &vars, double radius)
Move specified variables of particle pi within a ball of specified radius.
virtual MonteCarloMoverResult do_propose() override
Move particle attributes within a ball, as specified in constructor.
Exception definitions and assertions.
Index< ParticleIndexTag > ParticleIndex
Vector< VectorD<-1 > > VectorKDs
double Float
Basic floating-point value (could be float, double...).
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
IMP::Vector< FloatKey > FloatKeys
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.
Return value of the MonteCarloMover::propose() function.