8#ifndef IMPATOM_FRAGMENT_H
9#define IMPATOM_FRAGMENT_H
11#include <IMP/atom/atom_config.h>
15IMPATOM_BEGIN_NAMESPACE
20class IMPATOMEXPORT Fragment :
public Hierarchy {
21 static IntsKey get_begins_key();
27 static IntKey get_marker_key();
34 m->add_attribute(get_marker_key(), pi, 1);
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;
The base class for decorators.
Decorator for helping deal with a hierarchy of molecules.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
Model * get_model() const
Returns the Model containing the particle.
Class for storing model, its restraints, constraints, and particles.
A decorator to associate a particle with a part of a protein/DNA/RNA.
bool get_contains_residue(int rindex) const
Return true if this fragment contains a given residue.
bool get_contains_any_sorted_residue(const Ints &rinds) const
Return true if this fragment contains any of the sorted residues.
void set_residue_indexes(Ints o)
Add the residues whose indexes are listed in the passed vector.
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_DECORATOR_SETUP_0(Name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_DECORATOR_METHODS(Name, Parent)
Index< ParticleIndexTag > ParticleIndex
IMP::Vector< IntPair > IntPairs
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
Key< 1 > IntKey
The type used to identify int attributes in the Particles.
Key< 5 > IntsKey
The type used to identify int attributes in the Particles.