12#include <IMP/atom/atom_config.h>
20IMPATOM_BEGIN_NAMESPACE
28class IMPATOMEXPORT Copy :
public Molecule {
31 m->add_attribute(get_copy_index_key(), pi, number);
32 if (!Molecule::get_is_setup(m, pi)) {
38 static IntKey get_copy_index_key();
45 return m->get_has_attribute(get_copy_index_key(), pi);
49 return get_particle()->get_value(get_copy_index_key());
The base class for decorators.
A decorator for Molecules.
Class for storing model, its restraints, constraints, and particles.
The standard decorator for manipulating molecular structures.
static Molecule setup_particle(Model *m, ParticleIndex pi)
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_DECORATOR_METHODS(Name, Parent)
Various general useful macros for IMP.
int get_copy_index(Hierarchy h)
Walk up the hierarchy to find the current copy index.
Index< ParticleIndexTag > ParticleIndex
int Int
Basic integer value.
Key< 1 > IntKey
The type used to identify int attributes in the Particles.