IMP
2.2.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
AmbiguousRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/AmbiguousRestraint.h
3
* \brief An implementation of the d-norm to make an ambiguous restraint.
4
*
5
* Copyright 2007-2014 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPISD_AMBIGUOUS_RESTRAINT_H
10
#define IMPISD_AMBIGUOUS_RESTRAINT_H
11
12
#include <IMP/isd/isd_config.h>
13
#include <
IMP/kernel/Restraint.h
>
14
#include <
IMP/kernel/Particle.h
>
15
#include <
IMP/kernel/ParticleTuple.h
>
16
#include <
IMP/generic.h
>
17
18
IMPISD_BEGIN_NAMESPACE
19
20
//! Apply an ambiguous restraint by computing the d-norm.
21
// d is an integer.
22
// If d>0, behaves like an "and" function.
23
// If d<0, behaves like an "or" function.
24
// Limits are fuzzy "and" (min) and fuzzy "or" (max) when d is infinite.
25
/*
26
The source code is as follows:
27
\include AmbiguousRestraint.h
28
\include AmbiguousRestraint.cpp
29
*/
30
class
IMPISDEXPORT
AmbiguousRestraint
:
public
kernel::Restraint
{
31
int
d_;
32
kernel::Restraints
rs_;
33
34
public
:
35
//! Create the restraint.
36
/** kernel::Restraints should store the particles they are to act on,
37
preferably in a Singleton or PairContainer as appropriate.
38
Two ways to call it: pass it two restraints, or a list of restraints.
39
*/
40
AmbiguousRestraint
(
kernel::Model
*m,
int
d,
kernel::Restraint
*r0,
41
kernel::Restraint
*r1);
42
AmbiguousRestraint
(
kernel::Model
*m,
int
d,
kernel::Restraints
rs);
43
44
double
get_probability()
const
{
return
exp(-unprotected_evaluate(
nullptr
)); }
45
46
/** This macro declares the basic needed methods: evaluate and show
47
*/
48
virtual
double
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
49
const
IMP_OVERRIDE;
50
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE;
51
IMP_OBJECT_METHODS
(
AmbiguousRestraint
);
52
};
53
54
IMPISD_END_NAMESPACE
55
56
#endif
/* IMPISD_AMBIGUOUS_RESTRAINT_H */
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
IMP::isd::AmbiguousRestraint
Apply an ambiguous restraint by computing the d-norm.
Definition:
AmbiguousRestraint.h:30
IMP::base::Vector< IMP::base::Pointer< Restraint > >
Restraint.h
Abstract base class for all restraints.
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/Restraint.h:52
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
Particle.h
Classes to handle individual model particles.
ParticleTuple.h
Classes to handle individual model particles.
IMP::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/Model.h:72
generic.h
Import IMP/kernel/generic.h in the namespace.