8 #ifndef IMPATOM_FRAGMENT_H
9 #define IMPATOM_FRAGMENT_H
11 #include <IMP/atom/atom_config.h>
15 IMPATOM_BEGIN_NAMESPACE
21 static IntsKey get_begins_key();
27 static IntKey get_marker_key();
31 if (!Hierarchy::get_is_setup(m, pi)) {
35 set_residue_indexes(m, pi, ris);
40 do_setup_particle(m, pi, o.get_residue_indexes());
43 IntPairs get_residue_index_ranges()
const;
48 m->get_has_attribute(get_marker_key(), pi);
56 Ints get_residue_indexes()
const;
60 bool get_contains_residue(
int rindex)
const;
Import IMP/kernel/Decorator.h in the namespace.
ParticleIndex get_particle_index() const
A decorator to associate a particle with a part of a protein/DNA/RNA.
#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)
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())
void set_residue_indexes(Ints o)
Add the residues whose indexes are listed in the passed vector.
#define IMP_DECORATOR_SETUP_0(Name)
Key< 5, true > IntsKey
The type used to identify int attributes in the Particles.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type 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.
IMP::base::Vector< Int > Ints
Standard way to pass a bunch of Int values.