IMP Manual
for IMP version 2.15.0
|
IMP tries to make things simpler to use by adhering to various naming and interface conventions.
CamelCase
are class names, for example IMP::RestraintSet_
) in them are functions or methods, for example IMP::Model::update() or IMP::Model::add_particle().ClassName
are passed using type ClassNames
. This type is a list
in Python and a IMP::Vector<ClassName> (which is roughly equivalent to std::vector<ClassName*>) in C++.set_
change some stored valueget_
create or return a value
object or return an existing IMP::Object class objectcreate_
create a new IMP::Object class objectadd_
, remove_
or clear_
manipulate the contents of a collection of datashow_
print things in a human-readable formatload_
and save_
or read_
and write_
move data between files and memorylink_
create a connection between something and an IMP::Objectupdate_
change the internal state of an IMP::Objectdo_
is a virtual method as part of a non-virtual interface patternhandle_
take action when an event occursvalidate_
check the state of data and print messages and throw exceptions if something is corruptedsetup_
and teardown_
create or destroy some type of invariant (e.g. the constraints for a rigid body)apply_
either apply a passed object to each piece of data in some collection or apply the object itself to a particular piece of passed data (this is a bit ambiguous)IMP_
are preprocessor symbols (C++ only)Graphs in IMP are represented in C++ using the Boost Graph Library. All graphs used in IMP are VertexAndEdgeListGraphs, have vertex_name properties, and are BidirectionalGraphs if they are directed.
The Boost.Graph interface cannot be easily exported to Python so we instead provide a simple wrapper IMP::PythonDirectedGraph. There are methods to translate the graphs into various common Python and other formats (e.g. graphviz).
As is conventional in C++, IMP classes are divided into broad, exclusive types
const&
), never by pointer. Equality is defined based on the data stored in the value. Most value types in IMP are always valid, but a few, mostly geometric types (IMP::algebra::Vector3D) are designed for fast, low-level use and are left in an uninitialized state by their default constructor.All types in IMP, with a few documented exceptions, can be