IMP  2.3.1
The Integrative Modeling Platform
WeightMover.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/WeightMover.h
3  * \brief A mover that transforms a rigid body
4  *
5  * Copyright 2007-2014 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPISD_WEIGHT_MOVER_H
10 #define IMPISD_WEIGHT_MOVER_H
11 
12 #include "isd_config.h"
14 #include <IMP/algebra/VectorD.h>
15 #include <IMP/isd/Weight.h>
16 
17 IMPISD_BEGIN_NAMESPACE
18 
19 //! Modify the transformation of a rigid body
20 /** The transformation of a rigid body is moved in a ball of given
21  size. The probability distribution is uniform over the ball.
22  \see MonteCarlo
23  */
24 class IMPISDEXPORT WeightMover : public core::MonteCarloMover {
25  public:
26  /** Mover for weight decorator
27  \param[in] w particle
28  \param[in] radius maximum radius of displacement
29  */
31  void set_radius(Float radius) { radius_ = radius; }
32  Float get_radius() { return radius_; }
33 
34  protected:
37  virtual void do_reject() IMP_OVERRIDE;
39 
40  private:
41  Weight w_;
42  algebra::VectorKD oldweights_;
43  Float radius_;
44 };
45 
46 IMPISD_END_NAMESPACE
47 
48 #endif /* IMPISD_WEIGHT_MOVER_H */
Add weights for a set of states to a particle.
Definition: Weight.h:24
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
virtual void do_reject()=0
Implement reset_proposed_move()
A base class for classes which perturb particles.
The base class for movers for MC optimization.
Simple D vector class.
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
Modify the transformation of a rigid body.
Definition: WeightMover.h:24
Class to handle individual model particles.
Add weights for a set of states to a particle.
virtual ModelObjectsTemp do_get_inputs() const =0
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:20
VectorD<-1 > VectorKD
Definition: VectorD.h:411
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.