IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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 perturbs a Weight particle.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 *
7 */
8
9#ifndef IMPISD_WEIGHT_MOVER_H
10#define IMPISD_WEIGHT_MOVER_H
11
12#include <IMP/isd/isd_config.h>
14#include <IMP/algebra/VectorD.h>
15#include <IMP/isd/Weight.h>
16
17IMPISD_BEGIN_NAMESPACE
18
19//! A mover that perturbs a Weight particle.
20class IMPISDEXPORT WeightMover : public core::MonteCarloMover {
21 public:
22 /** Mover for weight decorator
23 \param[in] w particle
24 \param[in] radius maximum radius of displacement
25 */
27 void set_radius(Float radius) { radius_ = radius; }
28 Float get_radius() { return radius_; }
29
30 protected:
31 virtual ModelObjectsTemp do_get_inputs() const override;
33 virtual void do_reject() override;
35
36 private:
37 Weight w_;
38 algebra::VectorKD oldweights_;
39 Float radius_;
40};
41
42IMPISD_END_NAMESPACE
43
44#endif /* IMPISD_WEIGHT_MOVER_H */
The base class for movers for Monte Carlo optimization.
Add weights constrained to the unit simplex to a particle.
Simple D vector class.
Class to handle individual particles of a Model object.
Definition Particle.h:45
A base class for classes which perturb particles.
WeightMover(Particle *w, Float radius)
virtual core::MonteCarloMoverResult do_propose() override
Implement propose_move().
virtual void do_reject() override
Implement reset_proposed_move().
virtual ModelObjectsTemp do_get_inputs() const override
Add weights to a particle.
Definition Weight.h:29
double Float
Basic floating-point value (could be float, double...).
Definition types.h:19
VectorD<-1 > VectorKD
Definition VectorD.h:423
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Return value of the MonteCarloMover::propose() function.