IMP
2.1.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
TableRefiner.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/TableRefiner.h
3
* \brief A lookup based particle refiner
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*/
7
8
#ifndef IMPCORE_TABLE_REFINER_H
9
#define IMPCORE_TABLE_REFINER_H
10
11
#include <IMP/core/core_config.h>
12
13
#include <
IMP/Refiner.h
>
14
#include <
IMP/refiner_macros.h
>
15
#include <
IMP/base/map.h
>
16
IMPCORE_BEGIN_NAMESPACE
17
18
//! A lookup based particle refiner
19
/** Each particle is refined by returning the list
20
of particles stored for it in a table.
21
*/
22
class
IMPCOREEXPORT
TableRefiner
:
public
Refiner
{
23
IMP::base::map<kernel::Particle *, kernel::Particles>
map_;
24
25
public
:
26
//! Initialize it with an empty table
27
TableRefiner
();
28
29
//! Add a mapping to the table
30
void
add_particle
(
kernel::Particle
*p,
const
kernel::ParticlesTemp
&ps);
31
32
//! Remove a mapping from the table
33
void
remove_particle(
kernel::Particle
*p);
34
35
//! Set the mapping for a particular particle
36
void
set_particle(
kernel::Particle
*p,
const
kernel::ParticlesTemp
&ps);
37
38
virtual
bool
get_can_refine
(
kernel::Particle
*)
const
IMP_OVERRIDE;
39
virtual
const
kernel::ParticlesTemp
get_refined
(
kernel::Particle
*)
const
40
IMP_OVERRIDE;
41
#ifndef SWIG
42
using
Refiner::get_refined
;
43
#endif
44
virtual
kernel::ModelObjectsTemp
do_get_inputs
(
45
kernel::Model
*m,
const
kernel::ParticleIndexes
&pis)
const
IMP_OVERRIDE;
46
IMP_OBJECT_METHODS
(
TableRefiner
);
47
};
48
49
IMPCORE_END_NAMESPACE
50
51
#endif
/* IMPCORE_TABLE_REFINER_H */
IMP::kernel::Refiner::get_refined
virtual const ParticlesTemp get_refined(Particle *a) const =0
Refine the passed particle into a set of particles.
IMP::base::Vector< base::WeakPointer< Particle > >
IMP::kernel::Refiner::get_can_refine
virtual bool get_can_refine(Particle *) const
Return true if this refiner can refine that particle.
Definition:
kernel/Refiner.h:38
Refiner.h
Import IMP/kernel/Refiner.h in the namespace.
IMP::core::TableRefiner
A lookup based particle refiner.
Definition:
TableRefiner.h:22
IMP::kernel::ParticleInputs::do_get_inputs
virtual ModelObjectsTemp do_get_inputs(kernel::Model *m, const ParticleIndexes &pis) const
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
refiner_macros.h
Import IMP/kernel/refiner_macros.h in the namespace.
IMP::base::map
Definition:
base/map.h:26
IMP::rmf::add_particle
void add_particle(RMF::FileHandle fh, kernel::Particle *hs)
IMP::kernel::Refiner
Abstract class to implement hierarchical methods.
Definition:
kernel/Refiner.h:30
map.h
Declare an efficient stl-compatible map.
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/declare_Model.h:72