home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.5.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
include
IMP
core
DistanceRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/DistanceRestraint.h
3
* \brief Distance restraint between two particles.
4
*
5
* Copyright 2007-2015 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPCORE_DISTANCE_RESTRAINT_H
10
#define IMPCORE_DISTANCE_RESTRAINT_H
11
12
#include <IMP/core/core_config.h>
13
#include "
DistancePairScore.h
"
14
#include "
XYZ.h
"
15
#include <
IMP/generic.h
>
16
17
#include <
IMP/Restraint.h
>
18
19
#include <iostream>
20
21
IMPCORE_BEGIN_NAMESPACE
22
23
//! Distance restraint between two particles
24
/**
25
\note If the particles are closer than a certain distance, then
26
the contributions to the derivatives are set to 0.
27
28
\see PairRestraint
29
\see DistancePairScore
30
\see SphereDistancePairScore
31
*/
32
class
IMPCOREEXPORT
DistanceRestraint
:
33
#if defined(SWIG) || defined(IMP_DOXYGEN)
34
public
Restraint
35
#else
36
public
IMP::internal::TupleRestraint<DistancePairScore>
37
#endif
38
{
39
public
:
40
//! Create the distance restraint.
41
/** \param[in] m Model.
42
\param[in] score_func Scoring function for the restraint.
43
\param[in] a First particle in distance restraint.
44
\param[in] b Second particle in distance restraint.
45
\param[in] name restraint name
46
*/
47
DistanceRestraint
(
Model
*m,
UnaryFunction
*score_func,
48
ParticleIndexAdaptor
a,
49
ParticleIndexAdaptor
b,
50
std::string name =
"DistanceRestraint %1%"
);
51
52
#ifndef IMP_DOXYGEN
53
IMPCORE_DEPRECATED_METHOD_DECL(2.5)
54
DistanceRestraint
(
UnaryFunction
*score_func,
55
Particle
*a,
56
Particle
*b,
57
std::string name =
"DistanceRestraint %1%"
);
58
#endif
59
60
#ifdef SWIG
61
protected
:
62
double
unprotected_evaluate(
IMP::DerivativeAccumulator
*accum)
const
;
63
IMP::ModelObjectsTemp
do_get_inputs
()
const
;
64
IMP_OBJECT_METHODS
(
DistanceRestraint
);
65
#endif
66
};
67
68
IMPCORE_END_NAMESPACE
69
70
#endif
/* IMPCORE_DISTANCE_RESTRAINT_H */
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::ParticleIndexAdaptor
Definition:
particle_index.h:32
IMP::core::DistanceRestraint
Distance restraint between two particles.
Definition:
DistanceRestraint.h:32
IMP::Vector
Definition:
Vector.h:37
XYZ.h
Simple XYZ decorator.
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
DistancePairScore.h
A Score on the distance between a pair of particles.
IMP::Particle
Class to handle individual model particles.
Definition:
Particle.h:37
Restraint.h
Abstract base class for all restraints.
IMP::UnaryFunction
Abstract single variable functor class for score functions.
Definition:
UnaryFunction.h:25
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:25
IMP::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
Restraint.h:52
generic.h
Various important functionality for implementing decorators.