/** * \file Molecule.h \brief A decorator for Molecules. * * Copyright 2007-2010 IMP Inventors. All rights reserved. * */ #ifndef IMPATOM_MOLECULE_H #define IMPATOM_MOLECULE_H #include "atom_config.h" #include "atom_macros.h" #include "Hierarchy.h" #include #include #include #include IMPATOM_BEGIN_NAMESPACE //! A decorator for a molecule. /** */ class IMPATOMEXPORT Molecule: public Hierarchy { static IntKey key(); public: IMP_DECORATOR(Molecule, Hierarchy); //! Add the required attributes to the particle and create a Molecule static Molecule setup_particle(Particle *p) { p->add_attribute(key(),1); return Molecule(p); } //! Copy data from the other Molecule to the particle p static Molecule setup_particle(Particle *p, Molecule o) { return setup_particle(p); } static bool particle_is_instance(Particle *p) { return p->has_attribute(key()); } }; IMP_OUTPUT_OPERATOR(Molecule); IMP_DECORATORS(Molecule,Molecules, Hierarchies); IMPATOM_END_NAMESPACE #endif /* IMPATOM_MOLECULE_H */