IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
MoveStatisticsScoreState.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/MoveStatisticsScoreState.h
3 * \brief Write geometry to a file during optimization
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_MOVE_STATISTICS_SCORE_STATE_H
9#define IMPCORE_MOVE_STATISTICS_SCORE_STATE_H
10
11#include <IMP/core/core_config.h>
12#include <IMP/ScoreState.h>
13#include <IMP/internal/utility.h>
15#include <IMP/io.h>
16
17IMPCORE_BEGIN_NAMESPACE
18
19//! Keep track of statistics about how particles move.
20/** Keep track of average and maximum moves for a set
21 of particles during optimization.
22 */
23class IMPCOREEXPORT MoveStatisticsScoreState : public ScoreState {
24 Particles ps_;
26 double max_move_;
27 std::string max_mover_;
28 double max_average_;
29 double total_move_;
30 double total_movers_;
31 bool init_;
32
33 public:
34 MoveStatisticsScoreState(const ParticlesTemp& ps);
35 void show_statistics(std::ostream& out = std::cout) const;
36 void reset();
37 virtual void do_before_evaluate() override;
38 virtual void do_after_evaluate(DerivativeAccumulator* da) override;
39 virtual ModelObjectsTemp do_get_inputs() const override;
40 virtual ModelObjectsTemp do_get_outputs() const override;
41 IMP_OBJECT_METHODS(MoveStatisticsScoreState);
42};
43
44IMPCORE_END_NAMESPACE
45
46#endif /* IMPCORE_MOVE_STATISTICS_SCORE_STATE_H */
Shared score state.
Simple 3D vector class.
Class for adding derivatives from restraints to the model.
virtual ModelObjectsTemp do_get_inputs() const override
virtual void do_before_evaluate() override
Update the state given the current state of the model.
virtual ModelObjectsTemp do_get_outputs() const override
virtual void do_after_evaluate(DerivativeAccumulator *da) override
Do any necessary updates after the model score is calculated.
Write/read the state of the particles to/from a buffer in memory.
Vector< VectorD< 3 > > Vector3Ds
Definition VectorD.h:409
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
Definition base_types.h:138
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.