home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
spb
version 20261205.develop.7482b7c7af
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
11
#include <
IMP/algebra/Transformation3D.h
>
12
#include <
IMP/algebra/Vector3D.h
>
13
#include <
IMP/statistics/Metric.h
>
14
#include <
IMP/statistics/PartitionalClustering.h
>
15
#include <IMP/spb/spb_config.h>
16
17
IMPSPB_BEGIN_NAMESPACE
18
19
/** Compute the RMSD between two sets of particles in two configurations.
20
*/
21
class
IMPSPBEXPORT DistanceRMSDMetric :
public
statistics::Metric
{
22
Particles
ps_;
23
algebra::Transformation3Ds
tr_;
24
IMP::PointerMember<IMP::Particle>
px_;
25
IMP::PointerMember<IMP::Particle>
py_;
26
IMP::PointerMember<IMP::Particle>
pz_;
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
51
IMPSPBEXPORT
statistics::PartitionalClustering
*create_gromos_clustering(
52
statistics::Metric
*d,
double
cutoff);
53
54
IMPSPB_END_NAMESPACE
55
56
#endif
/* IMPSPB_DISTANCE_RMSD_METRIC_H */
Metric.h
Cluster sets of points.
PartitionalClustering.h
Compute a distance metric between two points.
Transformation3D.h
Simple 3D transformation class.
Vector3D.h
Simple 3D vector class.
IMP::Particle
Class to handle individual particles of a Model object.
Definition
Particle.h:45
IMP::algebra::Transformation3D
Simple 3D transformation class.
Definition
Transformation3D.h:37
IMP::statistics::Metric
Store data to be clustered for distance metric based algorithms.
Definition
Metric.h:25
IMP::statistics::PartitionalClustering
A base class for clustering results where each item is in one cluster.
Definition
PartitionalClustering.h:25
IMP::algebra::Transformation3Ds
IMP::Vector< Transformation3D > Transformation3Ds
Definition
Transformation3D.h:130
IMP::Vector3Ds
Vector< VectorD< 3 > > Vector3Ds
Definition
VectorD.h:409
IMP::Particles
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
Definition
base_types.h:138
IMP::Float
double Float
Basic floating-point value (could be float, double...).
Definition
types.h:19
IMP::Ints
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
Definition
types.h:48
IMP::Vector3D
VectorD< 3 > Vector3D
Definition
VectorD.h:407
IMP::Floats
IMP::Vector< Float > Floats
Standard way to pass a bunch of Float values.
Definition
types.h:46
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition
object_macros.h:25
IMP::PointerMember
A smart pointer to a ref-counted Object that is a class member.
Definition
Pointer.h:144