9 #ifndef IMPRMF_ATOM_LINKS_H
10 #define IMPRMF_ATOM_LINKS_H
12 #include <IMP/rmf/rmf_config.h>
14 #include "internal/atom_links_static.h"
15 #include "internal/atom_links_rigid_bodies.h"
16 #include "internal/atom_links_xyzs.h"
17 #include "internal/atom_links_gaussians.h"
18 #include <RMF/decorator/alternatives.h>
21 #include <RMF/NodeHandle.h>
22 #include <RMF/FileHandle.h>
27 #include <RMF/decorators.h>
28 #include <boost/unordered_map.hpp>
29 IMPRMF_BEGIN_NAMESPACE
37 RMF::decorator::IntermediateParticleFactory intermediate_particle_factory_;
38 RMF::decorator::ReferenceFrameFactory reference_frame_factory_;
39 RMF::decorator::AlternativesFactory af_;
42 internal::HierarchyLoadStatic load_static;
43 internal::HierarchyLoadBonds load_bonds;
44 internal::HierarchyLoadXYZs load_xyzs;
45 internal::HierarchyLoadGaussians load_gaussians;
46 internal::HierarchyLoadRigidBodies load_rigid_bodies;
47 Data(RMF::FileConstHandle h)
52 load_rigid_bodies(h) {}
54 typedef boost::unordered_map<kernel::ParticleIndex, boost::shared_ptr<Data> >
57 virtual bool get_is(RMF::NodeConstHandle nh)
const IMP_OVERRIDE {
58 return nh.get_type() == RMF::REPRESENTATION;
62 RMF::NodeConstHandle node,
67 RMF::NodeConstHandle node) IMP_FINAL IMP_OVERRIDE;
74 virtual void do_load_one(RMF::NodeConstHandle nh,
90 RMF::NodeConstHandle node) {
102 RMF::NodeConstHandle node) {
112 static const char *get_name() {
return "atom load"; }
124 internal::HierarchySaveStatic save_static;
125 internal::HierarchySaveBonds save_bonds;
126 internal::HierarchySaveXYZs save_xyzs;
127 internal::HierarchySaveGaussians save_gaussians;
128 internal::HierarchySaveRigidBodies save_rigid_bodies;
129 Data(RMF::FileHandle h)
134 save_rigid_bodies(h) {}
136 typedef boost::unordered_map<kernel::ParticleIndex, boost::shared_ptr<Data> >
139 RMF::decorator::AlternativesFactory af_;
148 RMF::NodeHandle nh) IMP_OVERRIDE;
150 return RMF::REPRESENTATION;
164 RMF::NodeHandle root_node) {
172 static const char *get_name() {
return "atom save"; }
Key< 1, true > IntKey
The type used to identify int attributes in the Particles.
#define IMP_UNUSED(variable)
Decorator for helping deal with a hierarchy of molecules.
Various general useful macros for IMP.
virtual void do_load_hierarchy(RMF::NodeConstHandle root_node, kernel::Model *m, kernel::ParticleIndex root)
virtual void do_setup_particle(kernel::Model *m, kernel::ParticleIndex root, kernel::ParticleIndex cur, RMF::NodeConstHandle node)
Handle read/write of kernel::Model data from/to files.
macros for display classes
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Various general useful macros for IMP.
Class to handle individual model particles.
Handle read/write of kernel::Model data from/to files.
virtual void do_setup_node(Model *m, kernel::ParticleIndex root, kernel::ParticleIndex p, RMF::NodeHandle n)
Various general useful macros for IMP.
virtual void do_save_hierarchy(Model *m, kernel::ParticleIndex root, RMF::NodeHandle root_node)
virtual void do_link_particle(kernel::Model *m, kernel::ParticleIndex root, kernel::ParticleIndex cur, RMF::NodeConstHandle node)
Class for storing model, its restraints, constraints, and particles.