8#ifndef IMPATOM_DOMAIN_H
9#define IMPATOM_DOMAIN_H
11#include <IMP/atom/atom_config.h>
15IMPATOM_BEGIN_NAMESPACE
21class IMPATOMEXPORT Domain :
public Hierarchy {
23 Data() : begin(
"domain_begin"), end(
"domain_end") {}
26 static const Data &get_data();
29 m->add_attribute(get_data().begin, pi, r.first);
30 m->add_attribute(get_data().end, pi, r.second);
37 do_setup_particle(m, pi, o.get_index_range());
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.
Decorator for helping deal with a hierarchy of molecules.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
Model * get_model() const
Returns the Model containing the particle.
Particle * get_particle() const
Returns the particle decorated by this decorator.
Class for storing model, its restraints, constraints, and particles.
A decorator to associate a particle with a part of a protein.
IntRange get_index_range() const
The standard decorator for manipulating molecular structures.
static bool get_is_setup(Model *m, ParticleIndex p)
Check if the particle has the needed attributes for a cast to succeed.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_DECORATOR_METHODS(Name, Parent)
Index< ParticleIndexTag > ParticleIndex
Key< 1 > IntKey
The type used to identify int attributes in the Particles.