IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
kernel/TripletScore.h
Go to the documentation of this file.
1
/**
2
* \file IMP/kernel/TripletScore.h
3
* \brief Define TripletScore.
4
*
5
* WARNING This file was generated from TripletScore.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_TRIPLET_SCORE_H
13
#define IMPKERNEL_TRIPLET_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
/** TripletScores will evaluate the score and derivatives
27
for the passed particles. Use in conjunction with various
28
restraints such as IMP::core::TripletsRestraint or
29
IMP::core::TripletRestraint.
30
31
Implementers should check out IMP_TRIPLET_SCORE().
32
*/
33
class
IMPKERNELEXPORT
TripletScore
:
public
base::Object
34
{
35
public
:
36
typedef
ParticleTriplet
Argument
;
37
typedef
ParticleIndexTriplet
IndexArgument
;
38
typedef
const
ParticleTriplet
&
PassArgument
;
39
typedef
const
ParticleIndexTriplet
&
PassIndexArgument
;
40
typedef
TripletModifier
Modifier
;
41
TripletScore
(std::string name=
"TripletScore %1%"
);
42
//! Compute the score and the derivative if needed.
43
IMP_DEPRECATED_WARN
44
virtual
double
evaluate(
const
ParticleTriplet
& vt,
45
DerivativeAccumulator
*da)
const
;
46
47
//! Compute the score and the derivative if needed.
48
virtual
double
evaluate_index(
Model
*m,
const
ParticleIndexTriplet
& vt,
49
DerivativeAccumulator
*da)
const
;
50
51
/** Implementations
52
for these are provided by the IMP_TRIPLET_SCORE()
53
macro.
54
*/
55
virtual
double
evaluate_indexes(
Model
*m,
56
const
ParticleIndexTriplets
&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
const
ParticleIndexTriplet
& vt,
64
DerivativeAccumulator
*da,
65
double
max)
const
;
66
67
/** Implementations
68
for these are provided by the IMP_TRIPLET_SCORE()
69
macro.
70
*/
71
virtual
double
evaluate_if_good_indexes(
Model
*m,
72
const
ParticleIndexTriplets
&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
const
ParticleIndexTriplet
& vt)
const
;
84
85
IMP_INPUTS_DECL
(
TripletScore
);
86
87
protected
:
88
/** Overide this to return your own decomposition.*/
89
virtual
Restraints
do_create_current_decomposition
90
(
Model
*m,
const
ParticleIndexTriplet
& vt)
const
;
91
92
IMP_REF_COUNTED_DESTRUCTOR
(
TripletScore
);
93
};
94
95
IMPKERNEL_END_NAMESPACE
96
97
#endif
/* IMPKERNEL_TRIPLET_SCORE_H */