IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
DummyRestraint.h
Go to the documentation of this file.
1
/**
2
* \file DummyRestraint.h
3
* \brief
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPEM2D_DUMMY_RESTRAINT_H
10
#define IMPEM2D_DUMMY_RESTRAINT_H
11
12
#include "IMP/em2d/em2d_config.h"
13
#include "
IMP/log.h
"
14
#include <
IMP/Restraint.h
>
15
#include "
IMP/restraint_macros.h
"
16
#include "
IMP/Pointer.h
"
17
18
19
#include <
IMP/Restraint.h
>
20
#include <
IMP/log.h
>
21
#include <
IMP/SingletonContainer.h
>
22
23
24
IMPEM2D_BEGIN_NAMESPACE
25
26
27
//! Dummy restraint between two particles
28
/*!
29
The restraint does do anything and returns 0 as a value. Use this
30
restraint to force two particles to be considered by DOMINO as belonging
31
to a restraint. This trick can be useful when building the merge tree for
32
DOMINO, as can add branches that consider pairs of particles before entire
33
subsets.
34
NOTE: Using this restraint for DOMINO requires a fairly good knowledge of
35
the works of merge trees.
36
*/
37
class
IMPEM2DEXPORT
DummyRestraint
:
public
Restraint
{
38
Pointer<Particle> p0_;
39
Pointer<Particle> p1_;
40
41
public
:
42
43
/**
44
* Inits the dummy restraint between the particles
45
* @param p First particle
46
* @param q Second particle
47
*/
48
DummyRestraint
(
IMP::Particle
*p,
IMP::Particle
*q) {
49
p0_ = p;
50
p1_ = q;
51
}
52
53
/**
54
* Shows information about the class
55
* @param out Stream used to show the information
56
*/
57
void
show
(std::ostream &out = std::cout)
const
{
58
out <<
"Dummy Restraint"
<< std::endl;
59
}
60
61
IMP_RESTRAINT
(
DummyRestraint
);
62
63
};
64
IMP_OBJECTS
(
DummyRestraint
,
DummyRestraints
);
65
66
67
68
//! Dummy restraint for a set of particles. Same use as DummyRestraint
69
class
IMPEM2DEXPORT
ParticlesDummyRestraint
:
public
Restraint
{
70
Pointer<SingletonContainer> container_;
71
72
public
:
73
74
/**
75
* Sets a dummy restraint for a set of particles
76
* @param sc Must contain all the particles that are going to be restrained
77
*/
78
ParticlesDummyRestraint
(
SingletonContainer
*sc) {
79
container_ = sc;
80
}
81
82
/**
83
* Shows information about the class
84
* @param out Stream used to show the information
85
*/
86
void
show
(std::ostream &out = std::cout)
const
{
87
out <<
"ParticlesDummyRestraint"
<< std::endl;
88
}
89
90
IMP_RESTRAINT
(
ParticlesDummyRestraint
);
91
92
};
93
IMP_OBJECTS
(
ParticlesDummyRestraint
,
ParticlesDummyRestraints
);
94
95
96
IMPEM2D_END_NAMESPACE
97
98
#endif
/* IMPEM2D_DUMMY_RESTRAINT_H */