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, std::string(1, c));
36 do_setup_particle(m, pi, o.
get_id());
46 return m->get_has_attribute(get_id_key(), pi) &&
67 IMPATOMEXPORT Chain
get_chain(Hierarchy h);
The base class for decorators.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
Chain get_chain(Hierarchy h)
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
Model * get_model() const
Returns the Model containing the particle.
std::string get_id() const
Return the chain id.
Various general useful macros for IMP.
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)
The standard decorator for manipulating molecular structures.
void set_id(std::string c)
Set the chain id.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
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.
Store info for a chain of a protein.
std::string get_chain_id(Hierarchy h)
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)