home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.14.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
core
version 2.14.0
WeightedDerivativesToRefined.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/WeightedDerivativesToRefined.h
3
* \brief Copies derivatives from coarse grained particle
4
* to its refined set of particles using weights
5
* indicated by a weight key.
6
*
7
* Copyright 2007-2020 IMP Inventors. All rights reserved.
8
*/
9
10
#ifndef IMPCORE_WEIGHTED_DERIVATIVES_TO_REFINED_H
11
#define IMPCORE_WEIGHTED_DERIVATIVES_TO_REFINED_H
12
13
#include <IMP/core/core_config.h>
14
15
#include "
XYZ.h
"
16
#include <
IMP/Refiner.h
>
17
#include <
IMP/singleton_macros.h
>
18
#include <
IMP/Pointer.h
>
19
#include <
IMP/SingletonDerivativeModifier.h
>
20
21
IMPCORE_BEGIN_NAMESPACE
22
23
//! Copy the derivatives from a coarse particle to its refined particles
24
/** \see DerivativesFromRefined
25
\see DerivativesToRefined
26
\see Centroid
27
\see atom::CenterOfMass
28
*/
29
class
IMPCOREEXPORT
WeightedDerivativesToRefined
:
30
public
SingletonDerivativeModifier
{
31
IMP::PointerMember<Refiner>
refiner_;
32
FloatKey
w_;
// weights key
33
FloatKeys
keys_;
34
35
public
:
36
//! Constructs a weighted derivatives-to-refined modifier that copies
37
//! derivatives from the coarse particle to its refinement
38
/**
39
Constructs a weighted derivatives-to-refined modifier that copies
40
derivatives from the coarse particle to its refinement. The modifier
41
copy the derivatives of keys to the particles returned by r, using weights w,
42
divided by weight of pi.
43
44
@param r a refiner to get fine particles for particle
45
@param w the key for the weight given to derivatives of the fine
46
particle (to be divided by the weight of the coarse
47
particle). If w equals FloatKey(), then a default weight
48
of [1.0 / N] is used, for N equals the number of particles
49
returned by r.
50
@param keys the keys whose derivatives are to be copied.
51
*/
52
WeightedDerivativesToRefined
(
Refiner
*r,
53
FloatKey
w =
FloatKey
(),
54
FloatKeys
keys = XYZ::get_xyz_keys());
55
56
//! Copies weighted derivatives to fine particles
57
/**
58
Copy ks to the particles returned by the refiner r, using weights w,
59
divided by weight of pi, all as indicated in the constructor
60
61
@param m the model
62
@param pi the coarse grained particle
63
*/
64
virtual
void
apply_index
(
Model
*m,
ParticleIndex
pi)
const
65
IMP_OVERRIDE
;
66
67
virtual
ModelObjectsTemp
do_get_inputs
(
68
Model
*m,
const
ParticleIndexes
&pis)
const
IMP_OVERRIDE
;
69
70
virtual
ModelObjectsTemp
do_get_outputs
(
71
Model
*m,
const
ParticleIndexes
&pis)
const
IMP_OVERRIDE
;
72
73
IMP_SINGLETON_MODIFIER_METHODS
(
WeightedDerivativesToRefined
);
74
75
IMP_OBJECT_METHODS
(
WeightedDerivativesToRefined
);
76
};
77
78
IMPCORE_END_NAMESPACE
79
80
#endif
/* IMPCORE_WEIGHTED_DERIVATIVES_TO_REFINED_H */
IMP::SingletonModifier
A base class for modifiers of ParticlesTemp.
Definition:
SingletonModifier.h:32
IMP::FloatKey
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
Definition:
base_types.h:32
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Index< ParticleIndexTag >
singleton_macros.h
Macros for various classes.
IMP::ParticleOutputs::do_get_outputs
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the outputs.
IMP::Vector< FloatKey >
XYZ.h
Simple XYZ decorator.
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
IMP_SINGLETON_MODIFIER_METHODS
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
Definition:
singleton_macros.h:93
Refiner.h
Refine a particle into a list of particles.
SingletonDerivativeModifier.h
A Modifier on ParticlesTemp.
IMP::PointerMember
A smart pointer to a ref-counted Object that is a class member.
Definition:
Pointer.h:146
IMP::ParticleInputs::do_get_inputs
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
IMP::Key< 0 >
Pointer.h
A nullptr-initialized pointer to an IMP Object.
IMP::SingletonModifier::apply_index
virtual void apply_index(Model *m, ParticleIndex v) const =0
IMP::core::WeightedDerivativesToRefined
Copy the derivatives from a coarse particle to its refined particles.
Definition:
WeightedDerivativesToRefined.h:29
IMP::Refiner
Abstract class to implement hierarchical methods.
Definition:
Refiner.h:34
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:78