This module provides RMF I/O for IMP.
This modules provides support for RMF file format for storing hierarchical molecular data (such as atomic or coarse grained representations of proteins), along with markup, including geometry and score data.
IMP.rmf supports I/O of IMP::atom::Hierarchy and associated types as well as output of IMP::display::Geometry, IMP::Restraint and arbitrary IMP::Particles. For each of these there are methods like:
Once objects are linked/added/created, they are attached to the RMF file. IMP::rmf::load_frame() can be used to change the state of the linked objects to that of an arbitrary frame and IMP::rmf::save_frame() can be used to save the current state of the objects into a frame in the RMF file.
See the RMF library page for more information.
Examples:
Author(s): Daniel Russel
Version: SVN.r14091
License: LGPL. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Publications:
IMP and how to apply them to biological problems.Classes | |
| class | LoadLink |
| class | RMFRestraint |
| class | SaveLink |
| class | SaveOptimizerState |
Hierarchy I/O | |
Hierarchy I/O writes IMP::atom::Hierarchy information along with the information contained in the following decorators
| |
| IMPRMFEXPORT void | add_hierarchies (RMF::FileHandle fh, const atom::Hierarchies &hs) |
| IMPRMFEXPORT void | add_hierarchy (RMF::FileHandle fh, atom::Hierarchy hs) |
| IMPRMFEXPORT atom::Hierarchies | create_hierarchies (RMF::FileConstHandle fh, Model *m) |
| IMPRMFEXPORT void | link_hierarchies (RMF::FileConstHandle fh, const atom::Hierarchies &hs) |
Geometry I/O | |
The geometry I/O support currently handles geometry composed of Other types can be supported when requested. Be aware, many more complex geometry types are automatically decomposed into the above types and so, more or less, supported. | |
| void | add_geometries (RMF::FileHandle parent, const display::GeometriesTemp &r) |
| void | add_static_geometries (RMF::FileHandle parent, const display::GeometriesTemp &r) |
| display::Geometries | create_geometries (RMF::FileConstHandle parent) |
| void | link_geometries (RMF::FileConstHandle parent, const display::GeometriesTemp &r) |
Particle I/O | |
Arbitrary (non IMP::atom::Hierarchy) particles can be written to the file and read back from them. All non-IMP::Object attributes are supported. Note that currently particles must be added so that any particles that are store in a given particles attributes are added to the file first. The data is stored in a category named IMP. | |
| IMPRMFEXPORT void | add_particles (RMF::FileHandle fh, const ParticlesTemp &hs) |
| IMPRMFEXPORT void | add_particle (RMF::FileHandle fh, Particle *hs) |
| IMPRMFEXPORT ParticlesTemp | create_particles (RMF::FileConstHandle fh, Model *m) |
| IMPRMFEXPORT void | link_particles (RMF::FileConstHandle fh, const ParticlesTemp &hs) |
Restraint I/O | |
Restraints are written as am RMF::FEATURE node with subnodes for the decomposed restraints (Restraint::create_current_decompositon()). The Restraints::get_last_score() value is what is saved to the file, so make sure that the restraints have been evaluated before saving a frame. | |
| IMPRMFEXPORT void | add_restraints (RMF::FileHandle fh, const RestraintsTemp &hs) |
| IMPRMFEXPORT void | add_restraint (RMF::FileHandle fh, Restraint *hs) |
| IMPRMFEXPORT RMFRestraints | create_restraints (RMF::FileConstHandle fh, Model *m) |
| IMPRMFEXPORT void | link_restraints (RMF::FileConstHandle fh, const RMFRestraints &hs) |
Typedefs | |
| typedef base::Object * | AssociationType |
| typedef base::Pointer< LoadLink > | LoadLinkAssociationType |
| typedef base::Pointer< SaveLink > | SaveLinkAssociationType |
Functions | |
| template<class T > | |
| T * | get_association (RMF::NodeConstHandle nh) |
| bool | get_has_linker (RMF::FileConstHandle nh, unsigned int id) |
| LoadLinkAssociationType | get_load_linker (RMF::FileConstHandle nh, unsigned int id) |
| RMF::NodeConstHandle | get_node_from_association (RMF::FileConstHandle nh, base::Object *oi) |
| RMF::NodeHandle | get_node_from_association (RMF::FileHandle nh, base::Object *oi) |
| SaveLinkAssociationType | get_save_linker (RMF::FileConstHandle nh, unsigned int id) |
| void | load_frame (RMF::FileConstHandle file, unsigned int frame) |
| void | save_frame (RMF::FileHandle file, unsigned int frame) |
| void | set_association (RMF::NodeConstHandle nh, base::Object *o, bool overwrite=false) |
| void | set_linker (RMF::FileConstHandle nh, unsigned int id, SaveLinkAssociationType l) |
| void IMP::rmf::add_geometries | ( | RMF::FileHandle | parent, |
| const display::GeometriesTemp & | r | ||
| ) |
Add the geometry to the file
| IMP::rmf::add_hierarchy | ( | RMF::FileHandle | fh, |
| atom::Hierarchy | hs | ||
| ) |
Examples: restraint cache, adding data, simulation, sample 0
| void IMP::rmf::add_static_geometries | ( | RMF::FileHandle | parent, |
| const display::GeometriesTemp & | r | ||
| ) |
Add the following geometry, assuming they do not move between frames. This can be space saving compared to resaving the constant position each frame.
| IMP::rmf::create_hierarchies | ( | RMF::FileConstHandle | fh, |
| Model * | m | ||
| ) |
Examples: pdb
| void IMP::rmf::load_frame | ( | RMF::FileConstHandle | file, |
| unsigned int | frame | ||
| ) |
Load the specified frame into the state of the associated IMP::base::Objects with the RMF file
| void IMP::rmf::save_frame | ( | RMF::FileHandle | file, |
| unsigned int | frame | ||
| ) |
Save the current state of the objects linked to the RMF file as the frameth frame.