IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
LeavesRefiner.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/LeavesRefiner.h
3 * \brief Return the hierarchy leaves under a particle.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_LEAVES_REFINER_H
9#define IMPCORE_LEAVES_REFINER_H
10
11#include <IMP/core/core_config.h>
12#include "Hierarchy.h"
13
14#include <IMP/Refiner.h>
15
16IMPCORE_BEGIN_NAMESPACE
17
18class HierarchyTraits;
19
20//! Return the hierarchy leaves under a particle.
21/** \ingroup hierarchy
22 \see Hierarchy
23 \see Hierarchy
24*/
25class IMPCOREEXPORT LeavesRefiner : public Refiner {
26 HierarchyTraits traits_;
27
28 public:
29 //! Create a refiner for a particular type of hierarchy
31
32 virtual bool get_can_refine(Particle *) const override;
33 virtual const ParticlesTemp get_refined(Particle *) const
34 override;
36 Model *m, const ParticleIndexes &pis) const override;
37#ifndef SWIG
39#endif
41};
42
43IMPCORE_END_NAMESPACE
44
45#endif /* IMPCORE_LEAVES_REFINER_H */
Refine a particle into a list of particles.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
Class to handle individual particles of a Model object.
Definition Particle.h:45
virtual const ParticlesTemp get_refined(Particle *a) const =0
Refine the passed particle into a set of particles.
Refiner(std::string name="Refiner %1%", bool is_by_ref=false)
Constructs the refiner.
Define the type for a type of hierarchy.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
virtual const ParticlesTemp get_refined(Particle *) const override
Refine the passed particle into a set of particles.
virtual bool get_can_refine(Particle *) const override
Return true if this refiner can refine that particle.
LeavesRefiner(HierarchyTraits tr)
Create a refiner for a particular type of hierarchy.
Decorator for helping deal with a hierarchy.
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Definition base_types.h:199
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.