home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.16.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 2.16.0
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-2021 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/Restraint.h
>
14
#include <
IMP/Particle.h
>
15
#include <
IMP/generic.h
>
16
17
IMPISD_BEGIN_NAMESPACE
18
19
//! Apply an ambiguous restraint by computing the d-norm.
20
// d is an integer.
21
// If d>0, behaves like an "and" function.
22
// If d<0, behaves like an "or" function.
23
// Limits are fuzzy "and" (min) and fuzzy "or" (max) when d is infinite.
24
/*
25
The source code is as follows:
26
\include AmbiguousRestraint.h
27
\include AmbiguousRestraint.cpp
28
*/
29
class
IMPISDEXPORT
AmbiguousRestraint
:
public
Restraint
{
30
int
d_;
31
Restraints
rs_;
32
33
public
:
34
//! Create the restraint.
35
/** Two ways to call it: pass it two restraints, or a list of restraints.
36
*/
37
AmbiguousRestraint
(
Model
*m,
int
d,
Restraint
*r0,
38
Restraint
*r1);
39
AmbiguousRestraint
(
Model
*m,
int
d,
Restraints
rs);
40
41
double
get_probability()
const
{
return
exp(-unprotected_evaluate(
nullptr
)); }
42
43
virtual
double
unprotected_evaluate(
IMP::DerivativeAccumulator
*accum)
44
const
IMP_OVERRIDE
;
45
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
46
IMP_OBJECT_METHODS
(
AmbiguousRestraint
);
47
};
48
49
IMPISD_END_NAMESPACE
50
51
#endif
/* IMPISD_AMBIGUOUS_RESTRAINT_H */
IMP::isd::AmbiguousRestraint
Apply an ambiguous restraint by computing the d-norm.
Definition:
AmbiguousRestraint.h:29
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Vector< IMP::Pointer< Restraint > >
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:73
Particle.h
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Restraint.h
Abstract base class for all restraints.
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:78
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:24
IMP::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
Restraint.h:54
generic.h
Compile-time generic restraint and constraint support.