IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
RMSDMetric.h
Go to the documentation of this file.
1 /**
2  * \file IMP/spb/RMSDMetric.h
3  * \brief Distance RMSD Metric
4  *
5  * Copyright 2007-2018 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPSPB_RMSD_METRIC_H
9 #define IMPSPB_RMSD_METRIC_H
10 
11 #include <IMP/algebra.h>
12 #include <IMP/statistics.h>
13 #include "spb_config.h"
14 
15 IMPSPB_BEGIN_NAMESPACE
16 
17 /** Compute the RMSD between two sets of particles in two configurations.
18  */
19 class IMPSPBEXPORT RMSDMetric : public statistics::Metric {
20  Particles ps_;
21  Floats weight_;
22  std::vector<algebra::Vector3Ds> coords_;
23 
24  double get_rmsd(algebra::Vector3Ds v0, algebra::Vector3Ds v1) const;
25 
26  public:
28  void add_configuration(double weight = 1.0);
29  Float get_weight(unsigned i);
30 
31  // IMP_METRIC(RMSDMetric);
32  double get_distance(unsigned int i, unsigned int j) const IMP_OVERRIDE;
33  unsigned int get_number_of_items() const IMP_OVERRIDE;
35 };
36 
37 IMPSPB_END_NAMESPACE
38 
39 #endif /* IMPSPB_RMSD_METRIC_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Include all non-deprecated headers in IMP.statistics.
Include all non-deprecated headers in IMP.algebra.
double get_weight(unsigned int i) const
Return a weight for the point.
Definition: Metric.h:37
double get_rmsd(const Vector3DsOrXYZs0 &m1, const Vector3DsOrXYZs1 &m2)
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:20
double get_distance(const Line3D &s, const Vector3D &p)
Get closest distance between a line and a point.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Store data to be clustered for distance metric based algorithms.
Definition: Metric.h:25