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)) {
42 return m->get_has_attribute(get_data().begin, pi) &&
43 m->get_has_attribute(get_data().end, pi) &&
47 void set_index_range(IntRange ir) {
49 "Bad range passed: " << ir.first <<
"..." << ir.second);
The base class for decorators.
A decorator to associate a particle with a part of a protein.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
Model * get_model() const
Returns the Model containing the particle.
Class for storing model, its restraints, constraints, and particles.
Decorator for helping deal with a hierarchy of molecules.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
The standard decorator for manipulating molecular structures.
IntRange get_index_range() const
Particle * get_particle() const
Returns the particle decorated by this decorator.
static bool get_is_setup(Model *m, ParticleIndex p)
Check if the particle has the needed attributes for a cast to succeed.
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.