IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
ContactMapMetric.h
Go to the documentation of this file.
1/**
2 * \file IMP/spb/ContactMapMetric.h
3 * \brief Contact Map Metric
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPSPB_CONTACT_MAP_METRIC_H
9#define IMPSPB_CONTACT_MAP_METRIC_H
10
12#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 ContactMapMetric : public statistics::Metric {
19 Particles ps_;
20 double r0_;
21 int nn_;
22 int mm_;
23 Floats weight_;
24 std::vector<Floats> matrices_;
25
26 double get_rmsd(Floats m0, Floats m1) const;
27 Floats get_contact_map(algebra::Vector3Ds coords) const;
28
29 public:
30 ContactMapMetric(Particles ps, double r0, int nn, int mm);
31
32 void add_configuration(double weight = 1.0);
33 void add_map(Floats matrix, double weight = 1.0);
34
35 Float get_weight(unsigned i) const;
36 Floats get_item(unsigned i) const;
37
38 // IMP_METRIC(ContactMapMetric);
39 double get_distance(unsigned int i, unsigned int j) const override;
40 unsigned int get_number_of_items() const override;
41 IMP_OBJECT_METHODS(ContactMapMetric);
42};
43
44IMPSPB_END_NAMESPACE
45
46#endif /* IMPSPB_CONTACT_MAP_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.