RMF
|
The namespace for all functionality in the library. More...
Namespaces | |
decorator | |
See Decorators and Attributes for more information. | |
HDF5 | |
The namespace for all HDF5 functionality in the library. | |
Classes | |
class | BufferConstHandle |
Manage a shared buffer for loading a RMF. More... | |
class | BufferHandle |
Manage a shared buffer for storing a RMF. More... | |
class | CoordinateTransformer |
Transform coordinates into the global reference frame. More... | |
class | Decorator |
The base class for decorators. More... | |
class | Enum |
A strong enum with an associated string name for each value. More... | |
class | Exception |
class | Factory |
The base class for Factories. More... | |
class | FileConstHandle |
A handle for a read-only RMF file. More... | |
class | FileHandle |
A handle for an RMF file. More... | |
class | ID |
A general purpose ID in RMF used, with different tags, to identify things. More... | |
class | IndexException |
class | InternalException |
class | IOException |
class | Label |
A decorator-like class to mark certain nodes (e.g. molecule boundaries) More... | |
class | NodeConstHandle |
A handle for a particular node in a read-only hierarchy. More... | |
class | NodeHandle |
A handle for a particular node in the hierarchy. More... | |
class | Nullable |
Return a possibly null value. More... | |
class | RestoreCurrentFrame |
Restore the frame that was current on creation upon destruction. More... | |
class | SetCurrentFrame |
Set the current frame to a value and then return it to the old value when this goes out of scope. More... | |
struct | Traits |
Traits classes describing how RMF uses types for storing data. More... | |
class | TraverseHelper |
Track common data that one needs to keep as one traverses the hierarchy. More... | |
class | UsageException |
class | Vector |
Represent a point in some dimension. More... | |
Typedefs | |
typedef std::vector< Category > | Categories |
typedef ID< CategoryTag > | Category |
typedef std::vector < CoordinateTransformer > | CoordinateTransformers |
A list of them. | |
typedef std::vector < FileConstHandle > | FileConstHandles |
Pass a list of them. | |
typedef std::vector< FileHandle > | FileHandles |
Pass a list of them. | |
typedef float | Float |
typedef std::vector< Float > | Floats |
typedef std::vector< Floats > | FloatsList |
typedef FloatsTraits | FloatsTag |
typedef Traits< Floats > | FloatsTraits |
typedef FloatTraits | FloatTag |
typedef Traits< Float > | FloatTraits |
typedef ID< FrameTag > | FrameID |
typedef std::vector< FrameID > | FrameIDs |
typedef Enum< FrameTypeTag > | FrameType |
typedef int | Int |
typedef std::array< int, 2 > | IntRange |
typedef std::vector< Int > | Ints |
typedef std::vector< Ints > | IntsList |
typedef IntsTraits | IntsTag |
typedef Traits< Ints > | IntsTraits |
typedef IntTraits | IntTag |
typedef Traits< Int > | IntTraits |
typedef std::vector < NodeConstHandle > | NodeConstHandles |
Pass a list of them. | |
typedef std::vector< NodeHandle > | NodeHandles |
Pass a list of them. | |
typedef ID< NodeTag > | NodeID |
typedef std::vector< NodeID > | NodeIDs |
typedef Enum< NodeTypeTag > | NodeType |
typedef Enum < RepresentationTypeTag > | RepresentationType |
typedef std::string | String |
typedef std::vector< String > | Strings |
typedef std::vector< Strings > | StringsList |
typedef StringsTraits | StringsTag |
typedef Traits< Strings > | StringsTraits |
typedef StringTraits | StringTag |
typedef Traits< String > | StringTraits |
typedef std::vector < TraverseHelper > | TraverseHelpers |
typedef Vector< 3U > | Vector3 |
typedef std::vector< Vector3 > | Vector3s |
typedef Vector3sTraits | Vector3sTag |
typedef Traits< std::vector < Vector< 3 > > > | Vector3sTraits |
typedef Vector3Traits | Vector3Tag |
typedef Traits< Vector< 3 > > | Vector3Traits |
typedef Vector< 4U > | Vector4 |
typedef std::vector< Vector4 > | Vector4s |
typedef Vector4sTraits | Vector4sTag |
typedef Traits< std::vector < Vector< 4 > > > | Vector4sTraits |
typedef Vector4Traits | Vector4Tag |
typedef Traits< Vector< 4 > > | Vector4Traits |
typedef unsigned int | VectorDimension |
Work around clang issue. | |
Functions | |
FileHandle | create_rmf_buffer (BufferHandle buffer) |
Create an RMF in a buffer. More... | |
FileHandle | create_rmf_file (std::string path) |
Create an RMF from a file system path. More... | |
void | get_all_global_coordinates (FileConstHandle &fh, NodeConstHandle &nh, PyObject *coord) |
Get global XYZ coordinates for everything under the given node. More... | |
std::array< RMF::Vector3, 2 > | get_bounding_box (NodeConstHandle root) |
float | get_diameter (NodeConstHandle root) |
bool | get_equal_current_values (FileConstHandle input, FileConstHandle out) |
bool | get_equal_static_values (FileConstHandle input, FileConstHandle out) |
bool | get_equal_structure (FileConstHandle input, FileConstHandle output, bool print_diff=false) |
log4cxx::LoggerPtr | get_logger () |
std::string | get_message (const Exception &e) |
std::string | get_signature_string (FileConstHandle file) |
Return a string that captures information about the file. More... | |
std::size_t | hash_value (const BufferConstHandle &t) |
Produce hash values for boost hash tables. | |
template<class TagT > | |
std::size_t | hash_value (const Enum< TagT > &t) |
Produce hash values for boost hash tables. | |
template<class TagT > | |
std::size_t | hash_value (const ID< TagT > &t) |
Produce hash values for boost hash tables. | |
std::size_t | hash_value (const NodeConstHandle &t) |
Produce hash values for boost hash tables. | |
std::size_t | hash_value (const FileConstHandle &t) |
Produce hash values for boost hash tables. | |
FileConstHandle | open_rmf_buffer_read_only (BufferConstHandle buffer) |
FileConstHandle | open_rmf_file_read_only (std::string path) |
BufferConstHandle | read_buffer (std::string file_name) |
void | set_log_level (std::string level) |
void | show_info (RMF::FileConstHandle rh, std::ostream &out=std::cout) |
void | test_throw_exception () |
void | validate (FileConstHandle fh) |
Validate the hierarchy, throwing an exception if any problems were found. More... | |
void | write_buffer (BufferConstHandle buffer, std::string file_name) |
Variables | |
static const FrameID | ALL_FRAMES = FrameID(-1, FrameID::SpecialTag()) |
Node Types | |
The types nodes can take in an RMF file. | |
const NodeType | INVALID_NODE_TYPE |
const NodeType | ROOT |
The root node. | |
const NodeType | REPRESENTATION |
Represent part of a molecule. | |
const NodeType | GEOMETRY |
Store a geometric object. | |
const NodeType | FEATURE |
Store information about some feature of the system. More... | |
const NodeType | ALIAS |
const NodeType | CUSTOM |
Arbitrary data that is not standardized. More... | |
const NodeType | BOND |
A link between two atoms. More... | |
const NodeType | ORGANIZATIONAL |
A node that is purely there for organizational purposes. More... | |
const NodeType | PROVENANCE |
Represent the process by which a structure was created. | |
Frame Types | |
The types frames can take in an RMF file. | |
const FrameType | INVALID_FRAME_TYPE |
const FrameType | STATIC |
The root frame. | |
const FrameType | FRAME |
A frame in a sequence of frames. | |
const FrameType | MODEL |
An independent model. | |
const FrameType | CENTER |
A cluster center. | |
const FrameType | FRAME_ALIAS |
An alias for another frame. | |
const FrameType | ALTERNATE |
An alternate state for a frame or model. | |
Representation Types | |
The types that representations used in the decorator::Alternatives decorator can take. | |
const RepresentationType | PARTICLE |
const RepresentationType | GAUSSIAN_PARTICLE |
Batch data access | |
These methods provide batch access to attribute data to try to reduce the overhead of repeated function calls. The missing_value argument is a placeholder that can fill in for values which are not found in the respective node.
| |
Floats | get_values (const NodeConstHandles &nodes, FloatKey k, Float missing_value=std::numeric_limits< float >::max()) |
Key types | |
RMF files support storing a variety of different types of data. These include
| |
typedef ID< IntTag > | IntKey |
typedef std::vector< IntKey > | IntKeys |
typedef ID< FloatTag > | FloatKey |
typedef std::vector< FloatKey > | FloatKeys |
typedef ID< StringTag > | StringKey |
typedef std::vector< StringKey > | StringKeys |
typedef ID< IntsTag > | IntsKey |
typedef std::vector< IntsKey > | IntsKeys |
typedef ID< FloatsTag > | FloatsKey |
typedef std::vector< FloatsKey > | FloatsKeys |
typedef ID< StringsTag > | StringsKey |
typedef std::vector< StringsKey > | StringsKeys |
typedef ID< Vector3Tag > | Vector3Key |
typedef std::vector< Vector3Key > | Vector3Keys |
typedef ID< Vector4Tag > | Vector4Key |
typedef std::vector< Vector4Key > | Vector4Keys |
typedef ID< Vector3sTag > | Vector3sKey |
typedef std::vector< Vector3sKey > | Vector3sKeys |
Names | |
std::string | get_as_node_name (std::string input) |
Return a node name string that has been modified to obey the rules. More... | |
bool | get_is_valid_key_name (std::string name) |
Return true iff the string is a valid key name. | |
bool | get_is_valid_node_name (std::string name) |
Return true iff the string is a valid node name. | |
Showing the hierarchy | |
These functions print out the hierarchy with various extra information for each node. Each prints out an ASCII tree designed for human inspection. | |
void | show_hierarchy (NodeConstHandle root, std::ostream &out) |
void | show_hierarchy (NodeConstHandle root) |
void | show_hierarchy_with_values (NodeConstHandle root, std::ostream &out) |
void | show_hierarchy_with_values (NodeConstHandle root) |
void | show_hierarchy_with_decorators (NodeConstHandle root, bool verbose=false, std::ostream &out=std::cout) |
void | show_frames (FileConstHandle fh, std::ostream &out=std::cout) |
Copy functions | |
See the example cloning.py for a usage example. | |
void | clone_file_info (FileConstHandle input, FileHandle output) |
void | clone_hierarchy (FileConstHandle input, FileHandle output) |
void | clone_loaded_frame (FileConstHandle input, FileHandle output) |
void | clone_static_frame (FileConstHandle input, FileHandle output) |
In python, the module is also called RMF.
typedef std::vector<Category> RMF::Categories |
typedef ID<CategoryTag> RMF::Category |
typedef float RMF::Float |
typedef ID< FloatTag> RMF::FloatKey |
typedef std::vector< FloatKey> RMF::FloatKeys |
typedef std::vector<Float> RMF::Floats |
typedef ID< FloatsTag> RMF::FloatsKey |
typedef std::vector< FloatsKey> RMF::FloatsKeys |
typedef std::vector<Floats> RMF::FloatsList |
typedef ID<FrameTag> RMF::FrameID |
typedef std::vector<FrameID> RMF::FrameIDs |
typedef Enum<FrameTypeTag> RMF::FrameType |
The type for frames.
See Frame Types for a complete list of the possible values.
typedef ID< IntTag> RMF::IntKey |
typedef std::vector< IntKey> RMF::IntKeys |
typedef ID< IntsTag> RMF::IntsKey |
typedef std::vector< IntsKey> RMF::IntsKeys |
typedef std::vector<Ints> RMF::IntsList |
typedef ID<NodeTag> RMF::NodeID |
typedef std::vector<NodeID> RMF::NodeIDs |
typedef Enum<NodeTypeTag> RMF::NodeType |
The type for nodes.
See Node Types for a complete list of the possible values.
typedef Enum<RepresentationTypeTag> RMF::RepresentationType |
The type for representations used in decorator::Alternatives.
See Representation Types for a complete list of the possible values.
typedef std::string RMF::String |
typedef ID< StringTag> RMF::StringKey |
typedef std::vector< StringKey> RMF::StringKeys |
typedef std::vector<String> RMF::Strings |
typedef ID< StringsTag> RMF::StringsKey |
typedef std::vector< StringsKey> RMF::StringsKeys |
typedef std::vector<Strings> RMF::StringsList |
typedef ID< Vector3Tag> RMF::Vector3Key |
typedef std::vector< Vector3Key> RMF::Vector3Keys |
typedef std::vector<Vector3> RMF::Vector3s |
typedef ID< Vector3sTag> RMF::Vector3sKey |
typedef std::vector< Vector3sKey> RMF::Vector3sKeys |
typedef ID< Vector4Tag> RMF::Vector4Key |
typedef std::vector< Vector4Key> RMF::Vector4Keys |
typedef std::vector<Vector4> RMF::Vector4s |
void RMF::clone_file_info | ( | FileConstHandle | input, |
FileHandle | output | ||
) |
Copy the hierarchy structure and set structure from one RMF file to another.
void RMF::clone_hierarchy | ( | FileConstHandle | input, |
FileHandle | output | ||
) |
Copy the hierarchy structure and set structure from one RMF file to another.
void RMF::clone_loaded_frame | ( | FileConstHandle | input, |
FileHandle | output | ||
) |
Copy the data of a single frame from between two files.
void RMF::clone_static_frame | ( | FileConstHandle | input, |
FileHandle | output | ||
) |
Copy the data of a single frame from between two files. Parts missing in the output file will be skipped.
FileHandle RMF::create_rmf_buffer | ( | BufferHandle | buffer | ) |
buffer | The buffer to place the contents in. |
FileHandle RMF::create_rmf_file | ( | std::string | path | ) |
path | the system path to the rmf file |
RMF::IOException | couldn't create file, or unsupported file format |
void RMF::get_all_global_coordinates | ( | FileConstHandle & | fh, |
NodeConstHandle & | nh, | ||
PyObject * | coord | ||
) |
This will traverse the subset of the RMF file rooted at the given node in a depth first manner and put the XYZ coordinates for all appropriate nodes into the provided NumPy array, which must be an N*3 float array where N is the number of XYZ particles. The coordinates are global, i.e. they are transformed by any parent ReferenceFrame nodes.
This function is primarily intended to extract trajectory frames for visualization packages such as ChimeraX. It is only available to Python and if RMF is built with NumPy support.
std::string RMF::get_as_node_name | ( | std::string | input | ) |
Node and key names have to obey certain rules, such as no quotes in the name.
std::array<RMF::Vector3, 2> RMF::get_bounding_box | ( | NodeConstHandle | root | ) |
Return a lower bound/upper bound pair that bounds the data stored in the tree.
float RMF::get_diameter | ( | NodeConstHandle | root | ) |
Return the diameter of the system. Unlike bounding box, this one can be called from python.
bool RMF::get_equal_current_values | ( | FileConstHandle | input, |
FileConstHandle | out | ||
) |
Return true of the two have the same values in the current frame.
bool RMF::get_equal_static_values | ( | FileConstHandle | input, |
FileConstHandle | out | ||
) |
Return true if the two have the same values in the static frame.
bool RMF::get_equal_structure | ( | FileConstHandle | input, |
FileConstHandle | output, | ||
bool | print_diff = false |
||
) |
Return true of the two have the same structure.
std::string RMF::get_message | ( | const Exception & | e | ) |
Use this instead of the more standard what() to get the message as what() presents issues for memory management with dynamically generated messages.
std::string RMF::get_signature_string | ( | FileConstHandle | file | ) |
This string can be saved and compared against the string generated with future versions of the library to make sure that the old files parse reasonably well. The strings are diffable.
FileConstHandle RMF::open_rmf_buffer_read_only | ( | BufferConstHandle | buffer | ) |
Open an RMF from a buffer in read-only mode.
RMF::IOException | couldn't open file, or unsupported file format |
FileConstHandle RMF::open_rmf_file_read_only | ( | std::string | path | ) |
Open an RMF from a file system path in read-only mode.
path | the system path to the rmf file |
RMF::IOException | couldn't open file, or unsupported file format |
void RMF::set_log_level | ( | std::string | level | ) |
Set the log level from a string. Supported values are:
Log4CXX is required for logging to be supported.
void RMF::show_frames | ( | FileConstHandle | fh, |
std::ostream & | out = std::cout |
||
) |
Show the frame hierarchy rather than the node hierarchy.
void RMF::show_hierarchy | ( | NodeConstHandle | root, |
std::ostream & | out | ||
) |
Print out just the node names and types.
void RMF::show_hierarchy_with_decorators | ( | NodeConstHandle | root, |
bool | verbose = false , |
||
std::ostream & | out = std::cout |
||
) |
Print out the list of decorators that can be used to decorate each node based on the current attributes in the loaded frame..
void RMF::show_hierarchy_with_values | ( | NodeConstHandle | root, |
std::ostream & | out | ||
) |
Print out all attributes for each node for the current frame.
void RMF::show_info | ( | RMF::FileConstHandle | rh, |
std::ostream & | out = std::cout |
||
) |
Show various statistics about the file such as attributes and how often they are used.
void RMF::test_throw_exception | ( | ) |
This function simply throws an exception. It is here for testing.
void RMF::validate | ( | FileConstHandle | fh | ) |
exception | if it is not valid and log any errors encountered. |
Checks invariants, such as all representation leaves having coordinates and radii.
const NodeType RMF::ALIAS |
Store a reference to another node. This node should be an alias decorator node and have no other data, at least for now. Aliases should be thought of as simply referencing existing objects in the scene, not creating new objects.
A constant used to denote that the particular operation refers to all frames in the file.
Definition at line 20 of file constants.h.
const NodeType RMF::BOND |
These are mostly for display purposes e.g. to show a wireframe view of the molecule.
const NodeType RMF::CUSTOM |
Programs can use these keys to store any extra data they want to put into the file.
const NodeType RMF::FEATURE |
For example, the particles involved in scoring functions and their score can be encoded as feature nodes.
const RepresentationType RMF::GAUSSIAN_PARTICLE |
Represent the structure with at set of decorator::GaussianParticle nodes.
const NodeType RMF::ORGANIZATIONAL |
This includes nodes that are just RMF::ReferenceFrame nodes.
const RepresentationType RMF::PARTICLE |
Representation via decorator::Particle nodes, the default.