IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
model_statistics.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/model_statistics.h
3 * \brief Write the scores of the passed restraints to a file.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_MODEL_STATISTICS_H
9#define IMPCORE_MODEL_STATISTICS_H
10
11#include <IMP/core/core_config.h>
12#include <IMP/Model.h>
13#include <IMP/OptimizerState.h>
14#include <IMP/io.h>
15
16IMPCORE_BEGIN_NAMESPACE
17
18//! Write the scores of the passed restraints to a file during optimization.
19/** The file starts with a line whose first character
20 is a # with the names of the restraints separated by commas
21 and then has one line per periodic update with comma
22 separated scores for each restraint.
23*/
24class IMPCOREEXPORT WriteRestraintScoresOptimizerState
25 : public OptimizerState {
26 Restraints rs_;
27 TextOutput out_;
28
29 public:
30 WriteRestraintScoresOptimizerState(const Restraints &rs,
31 TextOutput out);
32
33 protected:
34 virtual void do_update(unsigned int call_num) override;
35 IMP_OBJECT_METHODS(WriteRestraintScoresOptimizerState);
36};
37
38IMPCORE_END_NAMESPACE
39
40#endif /* IMPCORE_MODEL_STATISTICS_H */
Storage of a model, its restraints, constraints and particles.
Shared optimizer state.
OptimizerState(Model *m, std::string name)
Constructor.
virtual void do_update(unsigned int call_num) override
Write/read the state of the particles to/from a buffer in memory.
IMP::Vector< IMP::Pointer< Restraint > > Restraints
Definition base_types.h:120
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.