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
QuadScore.h
Go to the documentation of this file.
1
// Autogenerated by ../../../../tmp/nightly-build-6636/imp-2.5.0/tools/build/make_containers.py
2
// from ../../../../tmp/nightly-build-6636/imp-2.5.0/tools/build/container_templates/kernel/ClassnameScore.h
3
// Do not edit - any changes will be lost!
4
5
/**
6
* \file IMP/QuadScore.h
7
* \brief Define QuadScore.
8
*
9
* Copyright 2007-2015 IMP Inventors. All rights reserved.
10
*/
11
12
#ifndef IMPKERNEL_QUAD_SCORE_H
13
#define IMPKERNEL_QUAD_SCORE_H
14
15
#include <IMP/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/utility_macros.h
>
21
#include "
model_object_helpers.h
"
22
23
IMPKERNEL_BEGIN_NAMESPACE
24
25
//! Abstract class for scoring object(s) of type ParticleIndexQuad.
26
/** QuadScore will evaluate the score and derivatives
27
for passed object(s) of type ParticleIndexQuad.
28
29
Use in conjunction with various
30
restraints such as IMP::container::QuadsRestraint or
31
IMP::core::QuadRestraint. The restraints couple the score
32
functions with appropriate lists of object(s) of type ParticleIndexQuad.
33
34
Implementers should check out IMP_QUAD_SCORE().
35
36
\see PredicateQuadRestraint
37
*/
38
class
IMPKERNELEXPORT
QuadScore
:
public
ParticleInputs
,
39
public
Object
{
40
public
:
41
typedef
ParticleQuad
Argument
;
42
typedef
ParticleIndexQuad
IndexArgument
;
43
typedef
const
ParticleQuad
&
PassArgument
;
44
typedef
const
ParticleIndexQuad
&
PassIndexArgument
;
45
typedef
QuadModifier
Modifier
;
46
QuadScore
(std::string name =
"QuadScore %1%"
);
47
48
//! Compute the score and the derivative if needed.
49
/** @param m the model of vt
50
@param vt the index in m of an object of type ParticleQuad
51
@param da a DerivativeAccumulator that weights
52
computed derivatives. If nullptr, derivatives
53
will not be computed.
54
*/
55
virtual
double
evaluate_index(
Model
*m,
const
ParticleIndexQuad
& vt,
56
DerivativeAccumulator
*da)
const
= 0;
57
58
//! Compute the score and the derivative if needed over a set.
59
/** @param m the model of o
60
@param o objects of type ParticleQuad, specified by index
61
@param da a derivative accumulator that weights
62
computed derivatives. If nullptr, derivatives
63
will not be computed.
64
@param lower_bound index of first item in o to evaluate
65
@param upper_bound index of last item in o to evaluate
66
67
@note Implementations for these are provided by
68
the IMP_QUAD_SCORE() macro.
69
*/
70
virtual
double
evaluate_indexes(
Model
*m,
const
ParticleIndexQuads
&o,
71
DerivativeAccumulator
*da,
72
unsigned
int
lower_bound,
73
unsigned
int
upper_bound)
const
;
74
75
//! Compute the score and the derivative if needed, only if "good".
76
/** This functions similarly to evaluate_index(),
77
but may terminate the computation early if the score is higher than max.
78
79
@return the score if score<= max or some arbitrary value > max otherwise.
80
*/
81
virtual
double
evaluate_if_good_index(
Model
*m,
const
ParticleIndexQuad
& vt,
82
DerivativeAccumulator
*da,
83
double
max)
const
;
84
85
/** Compute the score and the derivative if needed over a set, only if "good".
86
This functions similarly to evaluate_indexes(), but may terminate
87
the computation early if the total score is higher than max.
88
89
@return the score if score<= max or some arbitrary value > max otherwise.
90
91
@note Implementations for these are provided by the IMP_QUAD_SCORE()
92
macro.
93
*/
94
virtual
double
evaluate_if_good_indexes(
Model
*m,
95
const
ParticleIndexQuads
&o,
96
DerivativeAccumulator
*da,
double
max,
97
unsigned
int
lower_bound,
98
unsigned
int
upper_bound)
const
;
99
100
//! Decompose this pair score acting on the pair into a set of restraints.
101
/** The scoring function and derivatives should
102
be equal to the current score. The default implementation
103
just returns this object bound to the pair. */
104
Restraints
create_current_decomposition(
Model
*m,
105
const
ParticleIndexQuad
& vt)
const
;
106
107
protected
:
108
//! Overide this to return your own decomposition.
109
virtual
Restraints
do_create_current_decomposition(
Model
*m,
110
const
ParticleIndexQuad
& vt)
const
;
111
112
IMP_REF_COUNTED_DESTRUCTOR
(
QuadScore
);
113
};
114
115
IMPKERNEL_END_NAMESPACE
116
117
#endif
/* IMPKERNEL_QUAD_SCORE_H */
IMP::Array
A class to store an fixed array of same-typed values.
Definition:
Array.h:33
IMP::ParticleInputs
Definition:
model_object_helpers.h:18
IMP_REF_COUNTED_DESTRUCTOR
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Ref counted objects should have private destructors.
Definition:
ref_counted_macros.h:60
ParticleTuple.h
Classes to handle individual model particles.
IMP::Vector< ParticleIndexQuad >
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
IMP::QuadScore
Abstract class for scoring object(s) of type ParticleIndexQuad.
Definition:
QuadScore.h:38
IMP::Object
Common base class for heavy weight IMP objects.
Definition:
Object.h:106
model_object_helpers.h
Single variable function.
utility_macros.h
Various general useful macros for IMP.
IMP::QuadModifier
A base class for modifiers of ParticleQuadsTemp.
Definition:
QuadModifier.h:33
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:25