IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPSPB_RMSD_METRIC_H
9#define IMPSPB_RMSD_METRIC_H
10
11#include <IMP/spb/spb_config.h>
13
14IMPSPB_BEGIN_NAMESPACE
15
16/** Compute the RMSD between two sets of particles in two configurations.
17 */
18class IMPSPBEXPORT RMSDMetric : public statistics::Metric {
19 Particles ps_;
20 Floats weight_;
21 std::vector<algebra::Vector3Ds> coords_;
22
23 double get_rmsd(algebra::Vector3Ds v0, algebra::Vector3Ds v1) const;
24
25 public:
26 RMSDMetric(Particles ps);
27 void add_configuration(double weight = 1.0);
28 Float get_weight(unsigned i);
29
30 // IMP_METRIC(RMSDMetric);
31 double get_distance(unsigned int i, unsigned int j) const override;
32 unsigned int get_number_of_items() const override;
33 IMP_OBJECT_METHODS(RMSDMetric);
34};
35
36IMPSPB_END_NAMESPACE
37
38#endif /* IMPSPB_RMSD_METRIC_H */
Cluster sets of points.
Store data to be clustered for distance metric based algorithms.
Definition Metric.h:25
Vector< VectorD< 3 > > Vector3Ds
Definition VectorD.h:409
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
Definition base_types.h:138
double Float
Basic floating-point value (could be float, double...).
Definition types.h:19
IMP::Vector< Float > Floats
Standard way to pass a bunch of Float values.
Definition types.h:46
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.