IMP logo
IMP Reference Guide  2.13.0
The Integrative Modeling Platform
blame.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/blame.h \brief Various important functionality
3  * for implementing decorators.
4  *
5  * Copyright 2007-2020 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPCORE_BLAME_H
10 #define IMPCORE_BLAME_H
11 
12 #include <IMP/core/core_config.h>
14 #include <IMP/constants.h>
15 #include <IMP/base_types.h>
16 
17 IMPCORE_BEGIN_NAMESPACE
18 
19 /** Assign blame to the passed particles by dividing up the scores of the
20  passed restraints over the particles they act on. The restraints will
21  be decomposed first in order to make sure that the assignment is as
22  fine grained as possible.
23 
24  The main cost is evaluating the restraints.
25 */
26 IMPCOREEXPORT void assign_blame(const RestraintsTemp &rs,
27  const ParticlesTemp &ps,
28  FloatKey attribute);
29 
30 /** Create a set of geometry objects colored by the blame as described in
31  the docs of the assign_blame() function.
32 
33  All particles must be XYZR particles.
34 
35  If max is NO_MAX, then the max is found automatically.
36 */
38  const RestraintsTemp &rs, const ParticlesTemp &ps,
39  double max = NO_MAX, std::string name = std::string());
40 
41 IMPCORE_END_NAMESPACE
42 
43 #endif /* IMPCORE_BLAME_H */
const double NO_MAX
Use this value when you want to turn off maximum for restraint evaluation.
Basic types used by IMP.
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
Definition: base_types.h:32
Various useful constants.
IMP::Vector< IMP::WeakPointer< Restraint > > RestraintsTemp
Definition: base_types.h:80
Implement geometry for the basic shapes from IMP.algebra.
display::Geometries create_blame_geometries(const RestraintsTemp &rs, const ParticlesTemp &ps, double max=NO_MAX, std::string name=std::string())
IMP::Vector< IMP::Pointer< Geometry > > Geometries
void assign_blame(const RestraintsTemp &rs, const ParticlesTemp &ps, FloatKey attribute)