home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.4eee3cf66f,2026/08/02
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
core
version 20260802.develop.4eee3cf66f
DerivativesToRefined.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/DerivativesToRefined.h
3
* \brief Accumulate the derivatives of the refined particles
4
*
5
* Copyright 2007-2026 IMP Inventors. All rights reserved.
6
*/
7
8
#ifndef IMPCORE_DERIVATIVES_TO_REFINED_H
9
#define IMPCORE_DERIVATIVES_TO_REFINED_H
10
11
#include <IMP/core/core_config.h>
12
13
#include "
XYZ.h
"
14
#include <
IMP/Refiner.h
>
15
#include <
IMP/singleton_macros.h
>
16
#include <
IMP/Pointer.h
>
17
#include <
IMP/SingletonModifier.h
>
18
#include <cereal/access.hpp>
19
#include <cereal/types/base_class.hpp>
20
21
IMPCORE_BEGIN_NAMESPACE
22
23
//! Copy the derivatives from a coarse particle to its refined particles
24
/** \see DerivatvesFromRefinedSingletonModifier
25
\see CoverRefined
26
\see CentroidOfRefinedSingletonModifier
27
An example showing a how to use such a score state to maintain a cover
28
of the atoms of a protein by a sphere per residue.
29
\include cover_particles.py
30
*/
31
class
IMPCOREEXPORT
DerivativesToRefined
:
public
SingletonModifier
{
32
IMP::PointerMember<Refiner>
refiner_;
33
FloatKeys
ks_;
34
35
friend
class
cereal::access;
36
template
<
class
Archive>
void
serialize(Archive &ar) {
37
ar(cereal::base_class<SingletonModifier>(
this
), refiner_, ks_);
38
}
39
IMP_OBJECT_SERIALIZE_DECL
(
DerivativesToRefined
);
40
41
public
:
42
//! Copy ks to the particles returned by r.
43
DerivativesToRefined
(
Refiner
*r,
FloatKeys
ks = XYZ::get_xyz_keys());
44
45
DerivativesToRefined
() {}
46
47
virtual
void
apply_index
(
Model
*m,
ParticleIndex
a)
const
48
override
;
49
virtual
ModelObjectsTemp
do_get_inputs
(
50
Model
*m,
const
ParticleIndexes
&pis)
const override
;
51
virtual
ModelObjectsTemp
do_get_outputs
(
52
Model
*m,
const
ParticleIndexes
&pis)
const override
;
53
IMP_SINGLETON_MODIFIER_METHODS
(
DerivativesToRefined
);
54
IMP_OBJECT_METHODS
(
DerivativesToRefined
);
55
};
56
57
IMPCORE_END_NAMESPACE
58
59
#endif
/* IMPCORE_DERIVATIVES_TO_REFINED_H */
IMP::SingletonModifier
A base class for modifiers of ParticlesTemp.
Definition:
SingletonModifier.h:31
SingletonModifier.h
A Modifier on ParticlesTemp.
IMP::core::DerivativesToRefined
Copy the derivatives from a coarse particle to its refined particles.
Definition:
DerivativesToRefined.h:31
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:86
IMP_SINGLETON_MODIFIER_METHODS
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
Definition:
singleton_macros.h:219
Refiner.h
Refine a particle into a list of particles.
IMP_OBJECT_SERIALIZE_DECL
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition:
object_macros.h:95
IMP::PointerMember
A smart pointer to a ref-counted Object that is a class member.
Definition:
Pointer.h:143
IMP::ParticleInputs::do_get_inputs
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
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::Refiner
Abstract class to implement hierarchical methods.
Definition:
Refiner.h:36