9#ifndef IMPRMF_HIERARCHY_SAVE_LINK_H
10#define IMPRMF_HIERARCHY_SAVE_LINK_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>
19#include <RMF/decorator/provenance.h>
22#include <RMF/NodeHandle.h>
23#include <RMF/FileHandle.h>
29#include <RMF/decorators.h>
30#include <boost/unordered_map.hpp>
39class IMPRMFEXPORT HierarchySaveLink :
public SimpleSaveLink<Particle> {
40 typedef SimpleSaveLink<Particle> P;
42 internal::HierarchySaveStatic save_static;
43 internal::HierarchySaveBonds save_bonds;
44 internal::HierarchySaveXYZs save_xyzs;
45 internal::HierarchySaveGaussians save_gaussians;
46 internal::HierarchySaveRigidBodies save_rigid_bodies;
47 Data(RMF::FileHandle h)
52 save_rigid_bodies(h) {}
54 typedef boost::unordered_map<ParticleIndex, std::shared_ptr<Data>>
57 RMF::decorator::AlternativesFactory af_;
58 RMF::decorator::StructureProvenanceFactory strucpf_;
59 RMF::decorator::SampleProvenanceFactory samppf_;
60 RMF::decorator::CombineProvenanceFactory combpf_;
61 RMF::decorator::FilterProvenanceFactory filtpf_;
62 RMF::decorator::ClusterProvenanceFactory clustpf_;
63 RMF::decorator::ScriptProvenanceFactory scriptpf_;
64 RMF::decorator::SoftwareProvenanceFactory softpf_;
65 RMF::decorator::ExplicitResolutionFactory explicit_resolution_factory_;
66 RMF::IntKey external_rigid_body_key_;
76 virtual void do_add(
Particle *p, RMF::NodeHandle cur)
override;
77 virtual void do_save_one(
Particle *o,
78 RMF::NodeHandle nh)
override;
79 RMF::NodeType get_type(
Particle *)
const override {
80 return RMF::REPRESENTATION;
94 RMF::NodeHandle root_node) {
102 static const char *get_name() {
return "atom save"; }
Decorator for helping deal with a hierarchy of molecules.
Class for storing model, its restraints, constraints, and particles.
Class to handle individual particles of a Model object.
virtual void do_save_hierarchy(Model *m, ParticleIndex root, RMF::NodeHandle root_node)
virtual void do_setup_node(Model *m, ParticleIndex root, ParticleIndex p, RMF::NodeHandle n)
macros for display classes
Manage links between IMP objects and a part of the RMF file.
Index< ParticleIndexTag > ParticleIndex
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Helper macros for implementing IMP Objects.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Classes to track how the model was created.
Manage links between IMP objects and RMF nodes.
Macros to help in defining tuple classes.
Various general useful macros for IMP.
#define IMP_UNUSED(variable)