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;
56 Ints get_residue_indexes()
const;
60 bool get_contains_residue(
int rindex)
const;
64 bool get_contains_any_sorted_residue(
const Ints &rinds)
const;
The base class for decorators.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
A decorator to associate a particle with a part of a protein/DNA/RNA.
#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)
add particle atribute with the specied key and initial value
The standard decorator for manipulating molecular structures.
void set_residue_indexes(Ints o)
Add the residues whose indexes are listed in the passed vector.
#define IMP_DECORATOR_SETUP_0(Name)
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_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key