IMP  2.3.1
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-2014 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/base/object_macros.h>
16 #include <IMP/base/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 IMP_OVERRIDE;
29  unsigned int get_number_of_items() const IMP_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 IMP_OVERRIDE;
56  unsigned int get_number_of_items() const IMP_OVERRIDE;
58 };
59 
60 IMPSTATISTICS_END_NAMESPACE
61 
62 #endif /* IMPSTATISTICS_METRICS_H */
A class to store a set of configurations of a model.
Various general useful macros for IMP.
Import IMP/kernel/SingletonContainer.h in the namespace.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:147
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
double get_distance(const Plane3D &pln, const Vector3D &p)
Return the distance between a plane and a point in 3D.
Definition: Plane3D.h:71
Store data to be clustered for embedding based algorithms.
A nullptr-initialized pointer to an IMP Object.
Import IMP/kernel/ConfigurationSet.h in the namespace.
Cluster sets of points.
Cluster sets of points.
A shared container for Singletons.
#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