IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
DistanceRMSDMetric.h
Go to the documentation of this file.
1/**
2 * \file IMP/spb/DistanceRMSDMetric.h
3 * \brief Distance RMSD Metric
4 *
5 * Copyright 2007-2026 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPSPB_DISTANCE_RMSD_METRIC_H
9#define IMPSPB_DISTANCE_RMSD_METRIC_H
10
15#include <IMP/spb/spb_config.h>
16
17IMPSPB_BEGIN_NAMESPACE
18
19/** Compute the RMSD between two sets of particles in two configurations.
20 */
21class IMPSPBEXPORT DistanceRMSDMetric : public statistics::Metric {
22 Particles ps_;
27 Floats weight_;
28 std::vector<Floats> matrices_;
29 std::vector<std::vector<unsigned>> matrixmap_;
30
31 void initialize(Ints align);
32 Floats get_distance_matrix(algebra::Vector3Ds coords) const;
33 Float get_distance(algebra::Vector3D v0, algebra::Vector3D v1) const;
34 double get_drmsd(const Floats &m0, const Floats &m1) const;
35 algebra::Vector3D get_vector(algebra::Vector3D center) const;
36 algebra::Transformation3D get_transformation(
37 algebra::Transformation3D trans) const;
38
39 public:
40 DistanceRMSDMetric(Particles ps, Ints align, algebra::Transformation3Ds tr,
41 Particle *px, Particle *py, Particle *pz);
42 void add_configuration(double weight = 1.0);
43 Float get_weight(unsigned i);
44
45 // IMP_METRIC(DistanceRMSDMetric);
46 double get_distance(unsigned int i, unsigned int j) const override;
47 unsigned int get_number_of_items() const override;
48 IMP_OBJECT_METHODS(DistanceRMSDMetric);
49};
50
51IMPSPBEXPORT statistics::PartitionalClustering *create_gromos_clustering(
52 statistics::Metric *d, double cutoff);
53
54IMPSPB_END_NAMESPACE
55
56#endif /* IMPSPB_DISTANCE_RMSD_METRIC_H */
Cluster sets of points.
Compute a distance metric between two points.
Simple 3D transformation class.
Simple 3D vector class.
Class to handle individual particles of a Model object.
Definition Particle.h:45
Simple 3D transformation class.
Store data to be clustered for distance metric based algorithms.
Definition Metric.h:25
A base class for clustering results where each item is in one cluster.
IMP::Vector< Transformation3D > Transformation3Ds
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< Int > Ints
Standard way to pass a bunch of Int values.
Definition types.h:48
VectorD< 3 > Vector3D
Definition VectorD.h:407
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.
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144