IMP  2.3.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-2014 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 
16 IMPMISC_BEGIN_NAMESPACE
17 
18 //! Allow OptimizerStates to be used as ScoreStates
19 /** You can have up to two, one for before, and one for after.
20  */
21 class IMPMISCEXPORT StateAdaptor : public ScoreState {
23 
24  public:
25  //! set the before and after states
27  virtual void do_before_evaluate() IMP_OVERRIDE;
28  virtual void do_after_evaluate(DerivativeAccumulator *da) IMP_OVERRIDE;
32 };
33 
34 IMPMISC_END_NAMESPACE
35 
36 #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 member.
Definition: Pointer.h:147
Allow OptimizerStates to be used as ScoreStates.
Definition: StateAdaptor.h:21
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Shared optimizer state that is invoked upon commitment of new coordinates.
ScoreStates maintain invariants in the Model.
Import IMP/kernel/ScoreState.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
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73