IMP logo
IMP Reference Guide  2.6.2
The Integrative Modeling Platform
SerialMover.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/SerialMover.h
3  * \brief A mover that applies other movers one at a time
4  *
5  * Copyright 2007-2016 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPCORE_SERIAL_MOVER_H
10 #define IMPCORE_SERIAL_MOVER_H
11 
12 #include <IMP/core/core_config.h>
13 #include "MonteCarlo.h"
14 #include "MonteCarloMover.h"
15 
16 IMPCORE_BEGIN_NAMESPACE
17 
18 //! Applies a list of movers one at a time
19 /** Each time a move is requested, only the next mover in the list
20  is applied. This should probably be used in conjunction with
21  incremental scoring (MonteCarlo::set_use_incremental()).
22  */
23 class IMPCOREEXPORT SerialMover : public MonteCarloMover {
24  int imov_;
25  MonteCarloMovers movers_;
26 
27  public:
28  /** Constructor.
29  \param[in] mvs list of movers to apply one after another
30  */
32 
33  const MonteCarloMovers& get_movers() const { return movers_; }
34 
35  protected:
38  virtual void do_reject() IMP_OVERRIDE;
39  virtual void do_accept() IMP_OVERRIDE;
41 };
42 
43 IMPCORE_END_NAMESPACE
44 
45 #endif /* IMPCORE_SERIAL_MOVER_H */
Simple Monte Carlo optimizer.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
virtual void do_accept()
Implement accept_proposed_move(); default implementation is empty.
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.
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
Applies a list of movers one at a time.
Definition: SerialMover.h:23
virtual ModelObjectsTemp do_get_inputs() const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.