IMP  2.1.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-2013 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 continer
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.
Import IMP/kernel/SingletonContainer.h in the namespace.
A nullptr-initialized pointer to an IMP Object.
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:146
double get_distance(const Plane3D &pln, const Vector3D &p)
Return the distance between a plane and a point in 3D.
Definition: Plane3D.h:68
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Store data to be clustered for embedding based algorithms.
Various general useful macros for IMP.
Import IMP/kernel/ConfigurationSet.h in the namespace.
Cluster sets of points.
Cluster sets of points.
A shared container for Singletons.
Store data to be clustered for distance metric based algorithms.
Definition: Metric.h:25