8 #ifndef IMPATOM_DOMAIN_H
9 #define IMPATOM_DOMAIN_H
11 #include <IMP/atom/atom_config.h>
15 IMPATOM_BEGIN_NAMESPACE
23 Data() : begin(
"domain_begin"), end(
"domain_end") {}
26 static const Data &get_data();
31 if (!Hierarchy::get_is_setup(m, pi)) {
37 do_setup_particle(m, pi, IntRange(b, e));
47 return m->get_has_attribute(get_data().begin, pi) &&
48 m->get_has_attribute(get_data().end, pi) &&
52 void set_index_range(IntRange ir) {
54 "Bad range passed: " << ir.first <<
"..." << ir.second);
61 get_model()->get_attribute(get_data().begin, get_particle_index()),
62 get_model()->get_attribute(get_data().end, get_particle_index()));
70 IMPATOM_DEPRECATED_METHOD_DECL(2.1)
71 Int get_begin_index() const;
73 IMPATOM_DEPRECATED_METHOD_DECL(2.1)
74 Int get_end_index() const;
76 IMPATOM_DEPRECATED_METHOD_DECL(2.1)
78 Int residues_begin,
Int residues_end);
80 IMPATOM_DEPRECATED_METHOD_DECL(2.1)
81 static
Domain setup_particle(IMP::kernel::ParticleAdaptor decorator,
82 Int residues_begin,
Int residues_end);
Import IMP/kernel/Decorator.h in the namespace.
A decorator to associate a particle with a part of a protein.
Particle * get_particle() const
#define IMP_DECORATOR_METHODS(Name, Parent)
Model * get_model() const
Returns the Model containing the particle.
static bool get_is_setup(kernel::Model *m, kernel::ParticleIndex p)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Decorator for helping deal with a hierarchy of molecules.
The standard decorator for manipulating molecular structures.
static Hierarchy setup_particle(kernel::Model *m, kernel::ParticleIndex pi, kernel::ParticleIndexesAdaptor children=kernel::ParticleIndexesAdaptor())
IntRange get_index_range() const
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
int Int
Basic integer value.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
Class for storing model, its restraints, constraints, and particles.