home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.20.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
core
version 2.20.0
ChecksScoreState.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/ChecksScoreState.h \brief Turn checks on and off.
3
*
4
* Copyright 2007-2022 IMP Inventors. All rights reserved.
5
*/
6
7
#ifndef IMPCORE_CHECKS_SCORE_STATE_H
8
#define IMPCORE_CHECKS_SCORE_STATE_H
9
10
#include <IMP/core/core_config.h>
11
#include <
IMP/macros.h
>
12
#include <
IMP/Particle.h
>
13
#include <
IMP/ScoreState.h
>
14
#include <cereal/access.hpp>
15
#include <cereal/types/base_class.hpp>
16
17
IMPCORE_BEGIN_NAMESPACE
18
19
//! Turn checks on with a given probability each evaluate call.
20
class
IMPCOREEXPORT
ChecksScoreState
:
public
ScoreState
{
21
double
probability_;
22
unsigned
int
num_checked_;
23
24
friend
class
cereal::access;
25
template
<
class
Archive>
void
serialize(Archive &ar) {
26
ar(cereal::base_class<ScoreState>(
this
), probability_, num_checked_);
27
}
28
IMP_OBJECT_SERIALIZE_DECL
(
ChecksScoreState
);
29
30
public
:
31
ChecksScoreState
(
Model
*m,
double
probability);
32
ChecksScoreState
() {}
33
34
unsigned
int
get_number_of_checked()
const
{
return
num_checked_; }
35
36
virtual
void
do_before_evaluate
()
override
;
37
virtual
void
do_after_evaluate
(
DerivativeAccumulator
*da)
override
;
38
virtual
ModelObjectsTemp
do_get_outputs
()
const override
;
39
virtual
ModelObjectsTemp
do_get_inputs
()
const override
;
40
IMP_OBJECT_METHODS
(
ChecksScoreState
);
41
};
42
43
IMPCORE_END_NAMESPACE
44
45
#endif
/* IMPCORE_CHECKS_SCORE_STATE_H */
IMP::ScoreState::do_before_evaluate
virtual void do_before_evaluate()=0
Update the state given the current state of the model.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::core::ChecksScoreState
Turn checks on with a given probability each evaluate call.
Definition:
ChecksScoreState.h:20
macros.h
Various general useful macros for IMP.
IMP::ScoreState::do_after_evaluate
virtual void do_after_evaluate(DerivativeAccumulator *accpt)=0
Do any necessary updates after the model score is calculated.
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:42
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:86
IMP::ScoreState
ScoreStates maintain invariants in the Model.
Definition:
ScoreState.h:56
IMP_OBJECT_SERIALIZE_DECL
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition:
object_macros.h:95
ScoreState.h
Shared score state.
Particle.h
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
IMP::ModelObject::do_get_outputs
virtual ModelObjectsTemp do_get_outputs() const =0
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:24