IMP Reference Guide
2.13.0
The Integrative Modeling Platform
|
Support for the RMF file format for storing hierarchical molecular data and markup. More...
Support for the RMF file format for storing hierarchical molecular data and markup.
RMF can store 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 for more information.
Several helper programs are also provided:
Export an RMF file to a viewer. rmf_display
outputs an arbitrary RMF file to pymol or chimera as appropriate (based on the file name of the second argument). It supports hierarchies, restraints and geometry.
Make an RMF file from a PDB.
Create a simplified representation of a PDB.
Author(s): Daniel Russel
Maintainer: benmwebb
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:
Classes | |
class | HierarchyLoadLink |
class | HierarchySaveLink |
class | LoadLink |
class | SaveLink |
class | SaveOptimizerState |
Periodically dump the state of all associated objects into the RMF file. More... | |
class | SimpleLoadLink |
class | SimpleSaveLink |
Typedefs | |
typedef Object * | AssociationType |
typedef IMP::Vector < IMP::Pointer< LoadLink > > | LoadLinks |
typedef IMP::Vector < IMP::WeakPointer< LoadLink > > | LoadLinksTemp |
typedef IMP::Vector < IMP::Pointer< SaveLink > > | SaveLinks |
typedef IMP::Vector < IMP::WeakPointer< SaveLink > > | SaveLinksTemp |
Functions | |
template<class T > | |
T * | get_association (RMF::NodeConstHandle nh) |
void | load_frame (RMF::FileConstHandle file, RMF::FrameID frame) |
Load the given RMF frame into the state of the linked objects. More... | |
RMF::FrameID | save_frame (RMF::FileHandle file, std::string name="") |
Save the current state of the linked objects as a new RMF frame. More... | |
void | set_association (RMF::NodeConstHandle nh, Object *o, bool overwrite=false) |
Associations | |
RMF supports tracking associations between an RMF file and native objects. In the | |
RMF::NodeConstHandle | get_node_from_association (RMF::FileConstHandle nh, Object *oi) |
RMF::NodeHandle | get_node_from_association (RMF::FileHandle nh, Object *oi) |
bool | get_has_associated_node (RMF::FileConstHandle nh, Object *oi) |
Hierarchy I/O | |
Hierarchy I/O writes IMP::atom::Hierarchy information along with the information contained in the following decorators
| |
void | add_hierarchies (RMF::FileHandle fh, const atom::Hierarchies &hs) |
void | add_hierarchies (RMF::NodeHandle fh, const atom::Hierarchies &hs) |
void | add_hierarchy (RMF::FileHandle fh, atom::Hierarchy hs) |
atom::Hierarchies | create_hierarchies (RMF::FileConstHandle fh, Model *m) |
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 are so, more or less, supported. | |
void | add_geometries (RMF::FileHandle file, const display::GeometriesTemp &r) |
Add geometries to the file. More... | |
void | add_geometries (RMF::NodeHandle parent, const display::GeometriesTemp &r) |
Add geometries to a given parent node. More... | |
void | add_static_geometries (RMF::FileHandle parent, const display::GeometriesTemp &r) |
Add geometries, assuming they do not move between frames. More... | |
void | add_geometry (RMF::FileHandle file, display::Geometry *r) |
Add a single geometry to the file. More... | |
display::Geometries | create_geometries (RMF::FileConstHandle parent) |
Create geometry objects for the geometry nodes found in the file. More... | |
void | link_geometries (RMF::FileConstHandle parent, const display::GeometriesTemp &r) |
Link the passed geometry objects to corresponding ones in the file. More... | |
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 stored in a given particles attributes are added to the file first. The data is stored in a category named IMP. | |
void | add_particles (RMF::FileHandle fh, const ParticlesTemp &hs) |
void | add_particles (RMF::NodeHandle fh, const ParticlesTemp &hs) |
void | add_particle (RMF::FileHandle fh, Particle *hs) |
ParticlesTemp | create_particles (RMF::FileConstHandle fh, Model *m) |
void | link_particles (RMF::FileConstHandle fh, const ParticlesTemp &hs) |
Restraint I/O | |
Restraints are written as RMF::FEATURE nodes with subnodes for the decomposed restraints (Restraint::create_current_decomposition()). 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. Any particles returned by Restraint::get_input_particles() that are also linked in the RMF file will be included in the RMF file as inputs for the Restraint. This allows external software like e.g., Chimera to associate these restraints with a certain set of particles. | |
void | add_restraints (RMF::FileHandle fh, const Restraints &hs) |
void | add_restraints (RMF::NodeHandle fh, const Restraints &hs) |
void | add_restraint (RMF::FileHandle fh, Restraint *hs) |
Restraints | create_restraints (RMF::FileConstHandle fh, Model *m) |
void | link_restraints (RMF::FileConstHandle fh, const Restraints &hs) |
void | add_restraints_as_bonds (RMF::FileHandle fh, const Restraints &rs) |
Add a list of restraints to the file as (static) bonds. More... | |
void | set_maximum_number_of_terms (RMF::FileHandle fh, unsigned int num) |
Limit the number of restraint terms. More... | |
Standard module functions | |
All | |
std::string | get_module_version () |
Return the version of this module, as a string. More... | |
std::string | get_module_name () |
std::string | get_data_path (std::string file_name) |
Return the full path to one of this module's data files. More... | |
std::string | get_example_path (std::string file_name) |
Return the full path to one of this module's example files. More... | |
typedef IMP::Vector<IMP::Pointer< LoadLink > > IMP::rmf::LoadLinks |
typedef IMP::Vector<IMP::WeakPointer< LoadLink > > IMP::rmf::LoadLinksTemp |
typedef IMP::Vector<IMP::Pointer< SaveLink > > IMP::rmf::SaveLinks |
typedef IMP::Vector<IMP::WeakPointer< SaveLink > > IMP::rmf::SaveLinksTemp |
void IMP::rmf::add_geometries | ( | RMF::FileHandle | file, |
const display::GeometriesTemp & | r | ||
) |
Add geometries to the file.
void IMP::rmf::add_geometries | ( | RMF::NodeHandle | parent, |
const display::GeometriesTemp & | r | ||
) |
Add geometries to a given parent node.
void IMP::rmf::add_geometry | ( | RMF::FileHandle | file, |
display::Geometry * | r | ||
) |
Add a single geometry to the file.
void IMP::rmf::add_hierarchies | ( | RMF::NodeHandle | fh, |
const atom::Hierarchies & | hs | ||
) |
Add objects to the file under the specified node.
void IMP::rmf::add_hierarchies | ( | RMF::FileHandle | fh, |
const atom::Hierarchies & | hs | ||
) |
Add objects to the file.
void IMP::rmf::add_hierarchy | ( | RMF::FileHandle | fh, |
atom::Hierarchy | hs | ||
) |
Add a single Hierarchy object to the RMF file.
void IMP::rmf::add_particle | ( | RMF::FileHandle | fh, |
Particle * | hs | ||
) |
Add a single Particle object to the RMF file.
void IMP::rmf::add_particles | ( | RMF::FileHandle | fh, |
const ParticlesTemp & | hs | ||
) |
Add objects to the file.
void IMP::rmf::add_particles | ( | RMF::NodeHandle | fh, |
const ParticlesTemp & | hs | ||
) |
Add objects to the file under the specified node.
void IMP::rmf::add_restraint | ( | RMF::FileHandle | fh, |
Restraint * | hs | ||
) |
Add a single Restraint object to the RMF file.
void IMP::rmf::add_restraints | ( | RMF::FileHandle | fh, |
const Restraints & | hs | ||
) |
Add objects to the file.
void IMP::rmf::add_restraints | ( | RMF::NodeHandle | fh, |
const Restraints & | hs | ||
) |
Add objects to the file under the specified node.
void IMP::rmf::add_restraints_as_bonds | ( | RMF::FileHandle | fh, |
const Restraints & | rs | ||
) |
Add a list of restraints to the file as (static) bonds.
There restraints must decompose into pairwise restraints. Their scores will not be recorded in the file.
void IMP::rmf::add_static_geometries | ( | RMF::FileHandle | parent, |
const display::GeometriesTemp & | r | ||
) |
Add geometries, assuming they do not move between frames.
This can be space saving compared to resaving the constant position each frame.
display::Geometries IMP::rmf::create_geometries | ( | RMF::FileConstHandle | parent | ) |
Create geometry objects for the geometry nodes found in the file.
atom::Hierarchies IMP::rmf::create_hierarchies | ( | RMF::FileConstHandle | fh, |
Model * | m | ||
) |
Create Hierarchy objects from the RMF file.
ParticlesTemp IMP::rmf::create_particles | ( | RMF::FileConstHandle | fh, |
Model * | m | ||
) |
Create Particle objects from the RMF file.
Restraints IMP::rmf::create_restraints | ( | RMF::FileConstHandle | fh, |
Model * | m | ||
) |
Create Restraint objects from the RMF file.
std::string IMP::rmf::get_data_path | ( | std::string | file_name | ) |
Return the full path to one of this module's data files.
To read the data file "data_library" that was placed in the data
directory of this module, do something like
This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh
script.
std::string IMP::rmf::get_example_path | ( | std::string | file_name | ) |
Return the full path to one of this module's example files.
To read the example file "example_protein.pdb" that was placed in the examples
directory of this module, do something like
This will ensure that the code works both when IMP is installed or if used via the setup_environment.sh
script.
std::string IMP::rmf::get_module_version | ( | ) |
Return the version of this module, as a string.
Definition at line 4 of file EMageFit/__init__.py.
void IMP::rmf::link_geometries | ( | RMF::FileConstHandle | parent, |
const display::GeometriesTemp & | r | ||
) |
Link the passed geometry objects to corresponding ones in the file.
void IMP::rmf::link_hierarchies | ( | RMF::FileConstHandle | fh, |
const atom::Hierarchies & | hs | ||
) |
Link Hierarchy objects with the RMF file, possibly overwriting an existing link for loading from the file. This does not alter the object, but will affect the behavior of functions like load_frame() and save_frame(). See Linking hierarchies for more information and intricacies
void IMP::rmf::link_particles | ( | RMF::FileConstHandle | fh, |
const ParticlesTemp & | hs | ||
) |
Link Particle objects with the RMF file, possibly overwriting an existing link for loading from the file. This does not alter the object, but will affect the behavior of functions like load_frame() and save_frame().
void IMP::rmf::link_restraints | ( | RMF::FileConstHandle | fh, |
const Restraints & | hs | ||
) |
Link Restraint objects with the RMF file, possibly overwriting an existing link for loading from the file. This does not alter the object, but will affect the behavior of functions like load_frame() and save_frame().
void IMP::rmf::load_frame | ( | RMF::FileConstHandle | file, |
RMF::FrameID | frame | ||
) |
Load the given RMF frame into the state of the linked objects.
The specified frame from the RMF file is loaded into the state of the IMP::Objects that were previously associated with that file.
The current frame is left as the passed frame number.
RMF::FrameID IMP::rmf::save_frame | ( | RMF::FileHandle | file, |
std::string | name = "" |
||
) |
Save the current state of the linked objects as a new RMF frame.
void IMP::rmf::set_maximum_number_of_terms | ( | RMF::FileHandle | fh, |
unsigned int | num | ||
) |
Limit the number of restraint terms.
Certain restraints are made from a really large number of terms. Tracking and displaying all those terms can be very time consuming. If the number of terms is larger than the maximum, the terms are not displayed. By default this is 100.