IMP  2.3.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-2014 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 kernel::RestraintsTemp &rs,
27  const kernel::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 kernel::RestraintsTemp &rs, const kernel::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.
Import IMP/kernel/base_types.h in the namespace.
Import IMP/kernel/constants.h in the namespace.
IMP::base::Vector< IMP::base::WeakPointer< Restraint > > RestraintsTemp
IMP::base::Vector< IMP::base::Pointer< Geometry > > Geometries
Implement geometry for the basic shapes from IMP.algebra.
void assign_blame(const kernel::RestraintsTemp &rs, const kernel::ParticlesTemp &ps, FloatKey attribute)
display::Geometries create_blame_geometries(const kernel::RestraintsTemp &rs, const kernel::ParticlesTemp &ps, double max=NO_MAX, std::string name=std::string())
Key< 0, true > FloatKey
The type used to identify float attributes in the Particles.