IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
kernel/SingletonScore.h
Go to the documentation of this file.
1
/**
2
* \file IMP/kernel/SingletonScore.h
3
* \brief Define SingletonScore.
4
*
5
* WARNING This file was generated from SingletonScore.h
6
* in /tmp/nightly-build-5687/imp-2.0.0/tools/build/container_templates/kernel
7
* by tools/maintenance/setup_containers.py.
8
*
9
* Copyright 2007-2013 IMP Inventors. All rights reserved.
10
*/
11
12
#ifndef IMPKERNEL_SINGLETON_SCORE_H
13
#define IMPKERNEL_SINGLETON_SCORE_H
14
15
#include <IMP/kernel/kernel_config.h>
16
#include "
base_types.h
"
17
#include "
ParticleTuple.h
"
18
#include "
DerivativeAccumulator.h
"
19
#include "internal/container_helpers.h"
20
#include <
IMP/base/utility_macros.h
>
21
#include "
input_output_macros.h
"
22
23
IMPKERNEL_BEGIN_NAMESPACE
24
25
//! Abstract score function
26
/** SingletonScores will evaluate the score and derivatives
27
for the passed particles. Use in conjunction with various
28
restraints such as IMP::core::SingletonsRestraint or
29
IMP::core::SingletonRestraint.
30
31
Implementers should check out IMP_SINGLETON_SCORE().
32
*/
33
class
IMPKERNELEXPORT
SingletonScore
:
public
base::Object
34
{
35
public
:
36
typedef
Particle
*
Argument
;
37
typedef
ParticleIndex
IndexArgument
;
38
typedef
Particle
*
PassArgument
;
39
typedef
ParticleIndex
PassIndexArgument
;
40
typedef
SingletonModifier
Modifier
;
41
SingletonScore
(std::string name=
"SingletonScore %1%"
);
42
//! Compute the score and the derivative if needed.
43
IMP_DEPRECATED_WARN
44
virtual
double
evaluate(
Particle
* vt,
45
DerivativeAccumulator
*da)
const
;
46
47
//! Compute the score and the derivative if needed.
48
virtual
double
evaluate_index(
Model
*m,
ParticleIndex
vt,
49
DerivativeAccumulator
*da)
const
;
50
51
/** Implementations
52
for these are provided by the IMP_SINGLETON_SCORE()
53
macro.
54
*/
55
virtual
double
evaluate_indexes(
Model
*m,
56
const
ParticleIndexes
&o,
57
DerivativeAccumulator
*da,
58
unsigned
int
lower_bound,
59
unsigned
int
upper_bound)
const
;
60
61
//! Compute the score and the derivative if needed.
62
virtual
double
evaluate_if_good_index(
Model
*m,
63
ParticleIndex
vt,
64
DerivativeAccumulator
*da,
65
double
max)
const
;
66
67
/** Implementations
68
for these are provided by the IMP_SINGLETON_SCORE()
69
macro.
70
*/
71
virtual
double
evaluate_if_good_indexes(
Model
*m,
72
const
ParticleIndexes
&o,
73
DerivativeAccumulator
*da,
74
double
max,
75
unsigned
int
lower_bound,
76
unsigned
int
upper_bound)
77
const
;
78
/** Decompose this pair score acting on the pair into a set of
79
restraints. The scoring function and derivatives should
80
be equal to the current score. The defualt implementation
81
just returns this object bound to the pair.*/
82
Restraints
create_current_decomposition(
Model
*m,
83
ParticleIndex
vt)
const
;
84
85
IMP_INPUTS_DECL
(
SingletonScore
);
86
87
protected
:
88
/** Overide this to return your own decomposition.*/
89
virtual
Restraints
do_create_current_decomposition
90
(
Model
*m,
ParticleIndex
vt)
const
;
91
92
IMP_REF_COUNTED_DESTRUCTOR
(
SingletonScore
);
93
};
94
95
IMPKERNEL_END_NAMESPACE
96
97
#endif
/* IMPKERNEL_SINGLETON_SCORE_H */