IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
FittingSolutionRecord.h
Go to the documentation of this file.
1 /**
2  * \file IMP/multifit/FittingSolutionRecord.h
3  * \brief stored a multifit fitting solution
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPMULTIFIT_FITTING_SOLUTION_RECORD_H
10 #define IMPMULTIFIT_FITTING_SOLUTION_RECORD_H
11 
13 #include <IMP/Model.h>
14 #include <IMP/core/Hierarchy.h>
15 #include <IMP/multifit/multifit_config.h>
16 #include <cereal/access.hpp>
17 
18 IMPMULTIFIT_BEGIN_NAMESPACE
19 
20 //! A fitting solution record
21 /**
22 \todo discuss with Daniel - should it be an object ?
23  */
24 class IMPMULTIFITEXPORT FittingSolutionRecord {
25  public:
26  //! Constructor
27  /**
28  \todo consider using better initialization
29  */
31  inline unsigned int get_index() const { return index_; }
32  void set_index(unsigned int new_ind) { index_ = new_ind; }
33  inline std::string get_solution_filename() const { return sol_fn_; }
34  void set_solution_filename(std::string sol_fn) { sol_fn_ = sol_fn; }
35  inline algebra::Transformation3D get_fit_transformation() const {
36  return fit_transformation_;
37  }
38  void set_fit_transformation(algebra::Transformation3D t) {
39  fit_transformation_ = t;
40  }
41  inline unsigned int get_match_size() const { return match_size_; }
42  void set_match_size(unsigned int match_size) { match_size_ = match_size; }
43  inline Float get_match_average_distance() const { return match_avg_dist_; }
44  void set_match_average_distance(Float match_avg_dist) {
45  match_avg_dist_ = match_avg_dist;
46  }
47  inline Float get_fitting_score() const { return fitting_score_; }
48  void set_fitting_score(Float fit_score) { fitting_score_ = fit_score; }
49  inline Float get_rmsd_to_reference() const { return rmsd_to_ref_; }
50  void set_rmsd_to_reference(Float rmsd_to_ref) { rmsd_to_ref_ = rmsd_to_ref; }
51  inline algebra::Transformation3D get_dock_transformation() const {
52  return dock_transformation_;
53  }
54  void set_dock_transformation(algebra::Transformation3D t) {
55  dock_transformation_ = t;
56  }
57  inline Float get_envelope_penetration_score() const { return env_pen_; }
58  void set_envelope_penetration_score(Float s) { env_pen_ = s; }
59  //! Show
60  /**
61  \todo consider using initialization mechanism
62  */
63  void show(std::ostream& out = std::cout) const;
64  static std::string get_record_header() {
65  std::stringstream ss;
66  ss << "solution index | solution filename | fit rotation | fit translation "
67  " |"
68  << " match size | match average distance | "
69  << " envelope penetration score | fitting score|"
70  << "dock rotation | dock translation |"
71  << " RMSD to reference" << std::endl;
72  return ss.str();
73  }
74 
75  protected:
76  unsigned int index_;
77  std::string sol_fn_;
78  algebra::Transformation3D fit_transformation_; // fit to map
79  algebra::Transformation3D dock_transformation_; // best geo dock to partners
80  unsigned int match_size_;
81  Float match_avg_dist_;
82  Float env_pen_;
83  Float fitting_score_;
84  Float rmsd_to_ref_;
85 
86 private:
87  friend class cereal::access;
88 
89  template<class Archive> void serialize(Archive &ar) {
90  ar(index_, sol_fn_, fit_transformation_, dock_transformation_,
91  match_size_, match_avg_dist_, env_pen_, fitting_score_,
92  rmsd_to_ref_);
93  }
94 };
96 
97 IMPMULTIFIT_END_NAMESPACE
98 #endif /* IMPMULTIFIT_FITTING_SOLUTION_RECORD_H */
Decorator for helping deal with a hierarchy.
Simple 3D transformation class.
Storage of a model, its restraints, constraints and particles.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Definition: value_macros.h:23
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Simple 3D transformation class.
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:19