IMP
2.1.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
ConnectivityRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/ConnectivityRestraint.h \brief Connectivity restraint.
3
*
4
* Restrict max distance between at least one pair of particles of any
5
* two distinct types.
6
*
7
* Copyright 2007-2013 IMP Inventors. All rights reserved.
8
*
9
*/
10
11
#ifndef IMPCORE_CONNECTIVITY_RESTRAINT_H
12
#define IMPCORE_CONNECTIVITY_RESTRAINT_H
13
14
#include <IMP/core/core_config.h>
15
#include "
DistanceRestraint.h
"
16
17
#include <
IMP/SingletonContainer.h
>
18
#include <
IMP/kernel/Restraint.h
>
19
#include <
IMP/PairScore.h
>
20
21
IMPCORE_BEGIN_NAMESPACE
22
23
//! Ensure that a set of particles remains connected with one another.
24
/** The restraint implements ambiguous connectivity. That is, it takes
25
several particles and ensures that they remain
26
connected, but allows how they are connected to change. If you wish
27
to restraint the connectivity of sets of
28
particles (i.e. each protein is represented using a set of balls)
29
use an appropriate PairScore which calls a Refiner (such
30
as ClosePairsPairScore).
31
32
\include connectivity_restraint.py
33
34
More precisely, the restraint scores by computing the MST on the complete
35
graph connecting all the particles. The edge weights are given by
36
the value of the PairScore for the two endpoints of the edge.
37
*/
38
class
IMPCOREEXPORT
ConnectivityRestraint
:
public
kernel::Restraint
{
39
IMP::base::PointerMember<PairScore>
ps_;
40
IMP::base::PointerMember<SingletonContainer>
sc_;
41
42
public
:
43
//! Use the given PairScore
44
ConnectivityRestraint
(
PairScore
*ps,
SingletonContainer
*sc);
45
/** \deprecated_at{2.1} Use constructor that takes a container instead.
46
*/
47
IMPCORE_DEPRECATED_METHOD_DECL(2.1)
48
ConnectivityRestraint
(
PairScore
*ps);
49
#ifndef IMP_DOXYGEN
50
/** @name kernel::Particles to be connected
51
52
The following methods are used to manipulate the list of particles
53
that are to be connected. Each particle should have all the
54
attributes expected by the PairScore used.
55
56
Ideally, one should pass a singleton container instead. These
57
can only be used if none is passed.
58
*/
59
/*@{*/
60
void
add_particle
(
kernel::Particle
*p);
61
void
add_particles
(
const
kernel::ParticlesTemp
&ps);
62
void
set_particles(
const
kernel::ParticlesTemp
&ps);
63
/*@}*/
64
#endif
65
66
//! Return the set of pairs which are connected by the restraint
67
/** This set of pairs reflects the current configuration at the time of
68
the get_connected_pairs() call, not the set at the time of the last
69
evaluate() call.
70
*/
71
kernel::ParticlePairsTemp
get_connected_pairs()
const
;
72
73
//! Return the pair score used for scoring
74
PairScore
*
get_pair_score
()
const
{
return
ps_; }
75
76
kernel::Restraints
do_create_current_decomposition
()
const
;
77
78
public
:
79
double
unprotected_evaluate(
IMP::DerivativeAccumulator
*accum)
const
80
IMP_OVERRIDE;
81
IMP::kernel::ModelObjectsTemp
do_get_inputs
() const IMP_OVERRIDE;
82
IMP_OBJECT_METHODS
(
ConnectivityRestraint
);
83
;
84
};
85
86
IMPCORE_END_NAMESPACE
87
88
#endif
/* IMPCORE_CONNECTIVITY_RESTRAINT_H */
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
DistanceRestraint.h
Distance restraint between two particles.
SingletonContainer.h
Import IMP/kernel/SingletonContainer.h in the namespace.
IMP::base::PointerMember< PairScore >
IMP::base::Vector< base::WeakPointer< Particle > >
IMP::kernel::PairScore
Abstract score function.
Definition:
kernel/PairScore.h:33
Restraint.h
Abstract base class for all restraints.
IMP::rmf::add_particles
void add_particles(RMF::FileHandle fh, const kernel::ParticlesTemp &hs)
PairScore.h
Import IMP/kernel/PairScore.h in the namespace.
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/declare_Restraint.h:52
IMP::core::ConnectivityRestraint::get_pair_score
PairScore * get_pair_score() const
Return the pair score used for scoring.
Definition:
ConnectivityRestraint.h:74
IMP::core::ConnectivityRestraint
Ensure that a set of particles remains connected with one another.
Definition:
ConnectivityRestraint.h:38
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
IMP::kernel::Restraint::do_create_current_decomposition
virtual Restraints do_create_current_decomposition() const
Definition:
kernel/declare_Restraint.h:226
IMP::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::rmf::add_particle
void add_particle(RMF::FileHandle fh, kernel::Particle *hs)
IMP::kernel::SingletonContainer
A shared container for Singletons.
Definition:
kernel/SingletonContainer.h:37