IMP logo

IMP::ScoreState Class Reference


Detailed Description

Shared score state.

ScoreStates allow code to be injected before and after the restraint evaluation process. Such code can be used to, for example:

ScoreStates have two methods which are called during the Model::evaluate() function

Note:
The functions Interaction::get_input_particles() and Interaction::get_output_particles() should return the input and output respectively for the before_evaluate() call. The after_evaluate() call must have input particles chosen from among the union of the input and output sets for the before call and output particles chosen from among the inputs of the before call.
Implementors
Developers who wish to implement a ScoreState should inherit from this class and use the IMP_SCORE_STATE() macro to help define the needed functions. Lamentably, we do not provide an example.
Inheritance diagram for IMP::ScoreState:

Inheritance graph
[legend]

Public Member Functions

def __disown__
void after_evaluate (DerivativeAccumulator *accpt)
void before_evaluate ()
Modelget_model () const
 ScoreState (std::string name=std::string())
Interactions
Certain sorts of operations, such as evaluation of restraints in isolation, benefit from being able to determine which containers and particles are needed by which restraints.

Input and output particles are ones whose attributes are read.

virtual ContainersTemp get_input_containers () const =0
virtual ParticlesTemp get_input_particles () const =0
virtual ParticlesList get_interacting_particles () const =0
virtual ContainersTemp get_output_containers () const =0
virtual ParticlesTemp get_output_particles () const =0

Protected Member Functions

virtual void do_after_evaluate (DerivativeAccumulator *accpt)=0
virtual void do_before_evaluate ()=0
virtual void set_model (Model *model)

Friends

template<class T >
void IMP::internal::unref (T *)

Member Function Documentation

virtual ParticlesTemp IMP::ScoreState::get_input_particles (  )  const [pure virtual]

Given that the containers are up to date.

Model* IMP::ScoreState::get_model (  )  const

Returns:
the stored model data

virtual ParticlesTemp IMP::ScoreState::get_output_particles (  )  const [pure virtual]

Given that the containers are up to date.

virtual void IMP::ScoreState::set_model ( Model model  )  [protected, virtual]

Override this method to take action when the score stated is added to a model.


The documentation for this class was generated from the following files:

Generated on Mon Mar 8 23:08:45 2010 for IMP by doxygen 1.5.8