IMP logo
Classes | Typedefs | Functions
IMP::rmf Namespace Reference

Detailed Description

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:

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

Note:
The handling of rigid bodies is not entirely straight forward and might have some side effects. When loading them, the orientation of the rigid body is read from the file as well as the coordinates of the members. The internal coordinats of the members are then updated that so their coordinates, the pose of the rigid body and the internal coordinates are all in sync. This is to avoid issues with rigid bodies not always being created consistently by IMP (since the principal axes of the body may be numerically unstable).
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::ObjectAssociationType
typedef base::Pointer< LoadLinkLoadLinkAssociationType
typedef base::Pointer< SaveLinkSaveLinkAssociationType

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)

Function Documentation

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 
)
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.


Generated on Tue May 22 2012 23:33:37 for IMP by doxygen 1.8.1