8 #ifndef IMPATOM_CHAIN_H
9 #define IMPATOM_CHAIN_H
11 #include <IMP/atom/atom_config.h>
16 IMPATOM_BEGIN_NAMESPACE
26 if (!Hierarchy::get_is_setup(m, pi)) {
32 do_setup_particle(m, pi, o.
get_id());
41 return m->get_has_attribute(get_id_key(), pi) &&
47 return static_cast<char>(
57 static IntKey get_id_key();
63 IMPATOMEXPORT Chain
get_chain(Hierarchy h);
Import IMP/kernel/Decorator.h in the namespace.
Chain get_chain(Hierarchy h)
#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)
Import IMP/kernel/macros.h in the namespace.
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
char get_id() const
Return the chain id.
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_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
void set_id(char c)
Set the chain id.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
Store info for a chain of a protein.
#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.