IMP logo
IMP Reference Guide  2.19.0
The Integrative Modeling Platform
metrics.h
Go to the documentation of this file.
1 /**
2  * \file IMP/statistics/metrics.h
3  * \brief Cluster sets of points.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPSTATISTICS_METRICS_H
10 #define IMPSTATISTICS_METRICS_H
11 
12 #include <IMP/statistics/statistics_config.h>
13 #include "Metric.h"
14 #include "Embedding.h"
15 #include <IMP/object_macros.h>
16 #include <IMP/Pointer.h>
17 #include <IMP/ConfigurationSet.h>
18 #include <IMP/SingletonContainer.h>
19 
20 IMPSTATISTICS_BEGIN_NAMESPACE
21 
22 /** Apply a Euclidean metric to an Embedding. */
23 class IMPSTATISTICSEXPORT EuclideanMetric : public Metric {
25 
26  public:
28  double get_distance(unsigned int i, unsigned int j) const override;
29  unsigned int get_number_of_items() const override;
31 };
32 
33 /** Compute the RMSD between specified sets of particles
34  in pairs of configurations, within a configuration set
35  */
36 class IMPSTATISTICSEXPORT ConfigurationSetRMSDMetric : public Metric {
39  bool align_;
40 
41  public:
42  /**
43  Constructor for creating a metric that computes RMSD between
44  pairs of configurations in a configuration set, using joint particles
45  specified in a singleton container
46 
47  @param cs the set of configurations
48  @param sc the particles used for RMSD calculation between each pair of
49  configuration
50  @param align whether to align pair of configurations prior to RMSD
51  calculations
52  */
54  bool align = false);
55  double get_distance(unsigned int i, unsigned int j) const override;
56  unsigned int get_number_of_items() const override;
58 };
59 
60 IMPSTATISTICS_END_NAMESPACE
61 
62 #endif /* IMPSTATISTICS_METRICS_H */
Helper macros for implementing IMP Objects.
A container for Singletons.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:143
A class to store a set of configurations of a model.
A shared container for Singletons.
Store data to be clustered for embedding based algorithms.
A nullptr-initialized pointer to an IMP Object.
Store a set of configurations of the model.
Cluster sets of points.
Cluster sets of points.
double get_distance(const Line3D &s, const Vector3D &p)
Get closest distance between a line and a point.
Store data to be clustered for distance metric based algorithms.
Definition: Metric.h:25