IMP  2.1.1
The Integrative Modeling Platform
StateAdaptor.h
Go to the documentation of this file.
1 /**
2  * \file IMP/misc/StateAdaptor.h
3  * \brief XXXXXXXXXXXXXX
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPMISC_STATE_ADAPTOR_H
9 #define IMPMISC_STATE_ADAPTOR_H
10 
11 #include <IMP/misc/misc_config.h>
12 
13 #include <IMP/OptimizerState.h>
14 #include <IMP/ScoreState.h>
15 #include <IMP/score_state_macros.h>
16 
17 IMPMISC_BEGIN_NAMESPACE
18 
19 //! Allow OptimizerStates to be used as ScoreStates
20 /** You can have up to two, one for before, and one for after.
21  */
22 class IMPMISCEXPORT StateAdaptor : public ScoreState {
24 
25  public:
26  //! set the before and after states
28  virtual void do_before_evaluate() IMP_OVERRIDE;
29  virtual void do_after_evaluate(DerivativeAccumulator *da) IMP_OVERRIDE;
30  virtual kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
31  virtual kernel::ModelObjectsTemp do_get_outputs() const IMP_OVERRIDE;
33 };
34 
35 IMPMISC_END_NAMESPACE
36 
37 #endif /* IMPMISC_STATE_ADAPTOR_H */
Class for adding derivatives from restraints to the model.
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:147
Allow OptimizerStates to be used as ScoreStates.
Definition: StateAdaptor.h:22
Shared optimizer state that is invoked upon commitment of new coordinates.
ScoreStates maintian invariants in the Model.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Import IMP/kernel/ScoreState.h in the namespace.
Import IMP/kernel/score_state_macros.h in the namespace.
virtual ModelObjectsTemp do_get_inputs() const =0
Import IMP/kernel/OptimizerState.h in the namespace.
virtual ModelObjectsTemp do_get_outputs() const =0
Class for storing model, its restraints, constraints, and particles.