8#ifndef IMPCORE_FIXED_REFINER_H
9#define IMPCORE_FIXED_REFINER_H
11#include <IMP/core/core_config.h>
16#include <cereal/access.hpp>
17#include <cereal/types/base_class.hpp>
19IMPCORE_BEGIN_NAMESPACE
28 friend class cereal::access;
29 template<
class Archive>
void serialize(Archive &ar) {
30 ar(cereal::base_class<Refiner>(
this));
31 if (std::is_base_of<cereal::detail::OutputArchiveBase, Archive>::value) {
32 uint32_t model_id = get_model_id();
37 set_model_from_id(model_id);
41 void set_model_from_id(uint32_t model_id);
42 uint32_t get_model_id()
const;
76 "mismatching models for refined and coarse particles");
85 "mismatching models for refined and coarse particles");
Refine a particle into a list of particles.
A container for Singletons.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Class for storing model, its restraints, constraints, and particles.
Class to handle individual particles of a Model object.
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.
virtual const ParticlesTemp get_refined(Particle *p) const override
Returns the fixed set of particles.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
FixedRefiner(const ParticlesTemp &ps)
Store the set of particles.
FixedRefiner(Model *m, const ParticleIndexes &pis)
Store the set of particle indexes from passed model.
virtual ParticleIndexes get_refined_indexes(Model *m, ParticleIndex) const override
Returns the fixed set of particles, as indexes.
virtual ParticleIndexes const & get_refined_indexes_by_ref(Model *m, ParticleIndex pi) const override
Return the indexes of the particles returned by get_refined().
virtual bool get_can_refine(Particle *) const override
Return true if this refiner can refine that particle.
Index< ParticleIndexTag > ParticleIndex
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
#define IMP_UNUSED(variable)