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>
19 IMPCORE_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");
100 IMPCORE_END_NAMESPACE
The refiner can refine any particle by returning a fixed set.
A container for Singletons.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class for storing model, its restraints, constraints, and particles.
Refine a particle into a list of particles.
#define IMP_UNUSED(variable)
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
virtual ParticleIndexes get_refined_indexes(Model *m, ParticleIndex pi) const
Return the indexes of the particles returned by get_refined()
virtual ParticleIndexes const & get_refined_indexes_by_ref(Model *m, ParticleIndex pi) const
Return the indexes of the particles returned by get_refined()
virtual const ParticlesTemp get_refined(Particle *a) const =0
Refine the passed particle into a set of particles.
Abstract class to implement hierarchical methods.
Class to handle individual particles of a Model object.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
virtual bool get_can_refine(Particle *) const override
Return true if this refiner can refine that particle.