IMP
kernel provides base classes and key shared functionality.
IMP
kernel provides the base functionality and abstract base classes for representation, scoring and sampling. In addition it provides basic functionality such as I/O, logging and Error Reporting support as well as tools to help implement functionality.IMP
and how to apply them to biological problems.
Namespaces | |
namespace | algebra |
This module contains general purpose algebraic and geometric methods. | |
namespace | atom |
This module contains functionality for dealing with atoms and proteins. | |
namespace | benchmark |
This module provides benchmarks of a variety of aspects of IMP . | |
namespace | container |
This module provides containers in IMP . | |
namespace | core |
This module contains basic functionality that is expected to be used by a wide variety of IMP users. | |
namespace | display |
This module provides support for displaying and exporting IMP data in various ways. | |
namespace | domino |
This module provides a framework for applying a divide-and-conquer sampling. | |
namespace | em |
This module allows density maps to be used to generate restraints. | |
namespace | example |
This module provides example showing how to implement various types of objects and functionality in IMP . | |
namespace | gsl |
This module wraps optimizers from the GNU Scientific Library. | |
namespace | helper |
This module provides high level functionality to assist in setting up and manipulating models. | |
namespace | misc |
This module contains miscellaneous and experimental functionality. | |
namespace | modeller |
This module contains functionality for integrating Modeller with IMP. | |
namespace | restrainer |
This module provides a higher level interface for using experimental proteomics data with IMP . | |
namespace | saxs |
This module adds small angle x-ray scatter support to IMP . | |
namespace | statistics |
This module provides methods for clustering. | |
namespace | test |
Methods and classes for testing the IMP kernel and modules. | |
Data Structures | |
class | ConfigurationSet |
A class to store a set of configurations of a model. More... | |
class | Constraint |
Implement a constraint on the Model. More... | |
class | Container |
Abstract class for containers of particles. More... | |
class | Containers |
class | ContainersTemp |
class | Decorator |
class | DerivativeAccumulator |
Class for adding derivatives from restraints to the model. More... | |
class | DumpModelOnFailure |
Dump the state of the model to a file on an error and then go on the the other handlers. More... | |
class | Exception |
The general base class for IMP exceptions. More... | |
class | FailureHandler |
class | FailureHandlerBase |
A base class for setting up failure handlers. More... | |
class | FloatKey |
The type used to identify float attributes in the Particles. More... | |
class | IncreaseIndent |
Increase the current indent in the log by one level. More... | |
class | IndexException |
An exception for a request for an invalid member of a container. More... | |
struct | InternalException |
A general exception for an intenal error in IMP. More... | |
class | IntKey |
The type used to identify int attributes in the Particles. More... | |
class | IOException |
An input/output exception. More... | |
class | KeyBase |
A base class for Keys. More... | |
class | Model |
Class for storing model, its restraints, constraints, and particles. More... | |
class | ModelException |
An exception which is thrown when the Model has attributes with invalid values. More... | |
class | Object |
Common base class for heavy weight IMP objects. More... | |
class | ObjectKey |
The type used to identify a particle attribute in the Particles. More... | |
class | Optimizer |
Base class for all optimizers. More... | |
class | OptimizerState |
Shared optimizer state. More... | |
class | OptimizerStates |
class | OptimizerStatesTemp |
class | PairContainer |
A shared container for particle_pairs. More... | |
class | PairContainers |
class | PairContainersTemp |
A collection of containers. More... | |
class | PairFilter |
A shared filter for particle_pairs. More... | |
class | PairFunctor |
Create a functor which can be used with build in C++ and python commands. More... | |
class | PairModifier |
A base class for modifiers of ParticlePairs. More... | |
class | PairScore |
Abstract score function. More... | |
class | PairScores |
class | PairScoresTemp |
class | Particle |
Class to handle individual model particles. More... | |
class | ParticleKey |
The type used to identify a particle attribute in the Particles. More... | |
class | Particles |
class | ParticlesTemp |
class | ParticleTuple |
A class to store a tuple of particles. More... | |
class | Pointer |
A reference counted pointer to an object. More... | |
class | QuadContainer |
A shared container for particle_quads. More... | |
class | QuadContainers |
class | QuadContainersTemp |
A collection of containers. More... | |
class | QuadFilter |
A shared filter for particle_quads. More... | |
class | QuadFunctor |
Create a functor which can be used with build in C++ and python commands. More... | |
class | QuadModifier |
A base class for modifiers of ParticleQuads. More... | |
class | QuadScore |
Abstract score function. More... | |
class | QuadScores |
class | QuadScoresTemp |
class | RAII |
RAII-style objects. More... | |
class | RefCounted |
Common base class for ref counted objects. More... | |
class | Refiner |
Abstract class to implement hierarchical methods. More... | |
class | Restraint |
Abstract class for representing restraints. More... | |
class | Restraints |
class | RestraintSet |
Container used to hold a set of restraints. More... | |
class | RestraintsTemp |
class | Sampler |
Base class for all samplers. More... | |
class | SaveOptimizeds |
Save and restore the set of optimized attributes for a set of particles. More... | |
class | ScopedFailureHandler |
Control a scope-dependent failure handler. More... | |
class | ScoreState |
Shared score state. More... | |
class | ScoreStatePointer |
Removes the ScoreState when the RAII object is destroyed. More... | |
class | ScoreStates |
class | ScoreStatesTemp |
class | SetLogState |
A class to change and restore log state. More... | |
class | SetLogTarget |
class | SingletonContainer |
A shared container for particles. More... | |
class | SingletonContainers |
class | SingletonContainersTemp |
A collection of containers. More... | |
class | SingletonFilter |
A shared filter for particles. More... | |
class | SingletonFunctor |
Create a functor which can be used with build in C++ and python commands. More... | |
class | SingletonModifier |
A base class for modifiers of Particles. More... | |
class | SingletonScore |
Abstract score function. More... | |
class | SingletonScores |
class | SingletonScoresTemp |
class | StringKey |
The type used to identify string attributes in the Particles. More... | |
class | TextInput |
class | TextOutput |
class | TripletContainer |
A shared container for particle_triplets. More... | |
class | TripletContainers |
class | TripletContainersTemp |
A collection of containers. More... | |
class | TripletFilter |
A shared filter for particle_triplets. More... | |
class | TripletFunctor |
Create a functor which can be used with build in C++ and python commands. More... | |
class | TripletModifier |
A base class for modifiers of ParticleTriplets. More... | |
class | TripletScore |
Abstract score function. More... | |
class | TripletScores |
class | TripletScoresTemp |
class | UnaryFunction |
Abstract single variable functor class for score functions. More... | |
class | UsageException |
An exception for an invalid usage of IMP . More... | |
class | ValueException |
An exception for an invalid value being passed to IMP . More... | |
class | VectorOfRefCounted |
A vector-like container for reference counted objects. More... | |
class | VersionInfo |
Version and module information for Objects. More... | |
class | WeakPointer |
A weak pointer to an IMP::Object or IMP::RefCountedObject. More... | |
Error checking and reporting | |
By default Error handling is provided by IMP/exception.h,
Use the | |
enum | CheckLevel { NONE = 0, USAGE = 1, USAGE_AND_INTERNAL = 2 } |
Determine the level of runtime checks performed. More... | |
CheckLevel | get_check_level () |
Get the current audit mode. | |
CheckLevel | get_maximum_check_level () |
Determine the maximum check level that can be used for this build. | |
void | set_check_level (CheckLevel tf) |
Control runtime checks in the code. | |
void | set_print_exceptions (bool tf) |
Set whether exception messages are printed or not. | |
Logging | |
IMP provides tools for controlling the amount of log output produced and directing it to the terminal or a file. Only log messages tagged with a lower level than the current LogLevel are emitted. In addition to a global log level (get_log_level(), set_log_level()), each IMP::Object has an internal log level (IMP::Object::get_log_level(), IMP::Object::set_log_level()) which is used when executing code on that object.Logging is provided by IMP/log.h. People implementing IMP::Object classes should also see IMP_OBJECT_LOG() and IMP::SetLogState.
All logging is disabled when | |
enum | LogLevel { DEFAULT = -1, SILENT = 0, WARNING = 1, TERSE = 2, VERBOSE = 3, MEMORY = 4 } |
The log levels supported by IMP . More... | |
void | add_to_log (std::string to_write) |
Write a string to the log. | |
LogLevel | get_log_level () |
Get the currently active log level. | |
void | set_log_level (LogLevel l) |
Set the current global log level. | |
Typedefs | |
typedef std::pair< double, double > | DerivativePair |
A pair representing a function value with its first derivative. | |
typedef double | Float |
Basic floating-point value (could be float, double...). | |
typedef std::pair< Float, Float > | FloatRange |
A pair representing the allowed range for a Float attribute. | |
typedef std::vector< Float > | Floats |
Standard way to pass a bunch of Float values. | |
typedef int | Int |
Basic integer value. | |
typedef std::pair< Int, Int > | IntRange |
typedef std::vector< IntRange > | IntRanges |
typedef std::vector< Int > | Ints |
Standard way to pass a bunch of Int values. | |
typedef VectorOfRefCounted < Object * > | Objects |
A class which is used for representing collections of Object objects. | |
typedef std::vector< Object * > | ObjectsTemp |
A type to use when returning sets of objects so as to avoid refcounting. | |
typedef ParticleTuple< 2 > | ParticlePair |
typedef VectorOfRefCounted < ParticleTuple < 2 >, RefCountParticleTuple< 2 > > | ParticlePairs |
typedef std::vector < ParticleTuple< 2 > > | ParticlePairsTemp |
typedef ParticleTuple< 4 > | ParticleQuad |
typedef VectorOfRefCounted < ParticleTuple < 4 >, RefCountParticleTuple< 4 > > | ParticleQuads |
typedef std::vector < ParticleTuple< 4 > > | ParticleQuadsTemp |
typedef std::vector < ParticlesTemp > | ParticlesList |
typedef ParticleTuple< 3 > | ParticleTriplet |
typedef VectorOfRefCounted < ParticleTuple < 3 >, RefCountParticleTuple< 3 > > | ParticleTriplets |
typedef std::vector < ParticleTuple< 3 > > | ParticleTripletsTemp |
typedef ::boost::rand48 | RandomNumberGenerator |
typedef VectorOfRefCounted < Refiner * > | Refiners |
a collection of Refiner objects | |
typedef std::string | String |
Basic string value. | |
typedef std::vector< String > | Strings |
Standard way to pass a bunch of String values. | |
Attribute Keys | |
Each type of attribute has an associated type of key. The keys can be constructed from a string. Such construction can be expensive and so the resulting keys should be cached. | |
typedef std::vector< FloatKey > | FloatKeys |
typedef std::vector< IntKey > | IntKeys |
typedef std::vector< ObjectKey > | ObjectKeys |
typedef std::vector< ParticleKey > | ParticleKeys |
typedef std::vector< StringKey > | StringKeys |
Functions | |
void | add_failure_handler (FailureHandler *f) |
Add a custom function to be called on an error. | |
BOOST_STATIC_ASSERT (0 &&"The boost version IMP is built with must match the current one.") | |
std::string | get_data_path (std::string file_name) |
Return the path to installed data for this module. | |
std::string | get_example_path (std::string file_name) |
Return the path to installed example data for this module. | |
TextOutput | get_log_target () |
std::string | get_module_name () |
const VersionInfo & | get_module_version_info () |
template<class O , class I > | |
O * | object_cast (I *o) |
void | remove_failure_handler (FailureHandler *f) |
Remove a failure handler from the list. | |
void | set_log_target (TextOutput l) |
Set the target for the log. | |
void | set_print_deprecation_messages (bool tf) |
Toggle printing of warnings on using deprecated classes. | |
Model IO | |
Models can be written to files in an easy-to-read file format based on “name: value” pairs on separate lines with indentation used to indicated nesting (as in Python). The functions take a list of the particles to write/read. The particles need to be provided in the same order for reading and writing. This is not checked. If a passed particle has a particle attribute which is a particle not in the list, an IOException is thrown. This can change to silently ignoring such attributes if desired.
| |
void | read_model (TextInput in, const ParticlesTemp &particles, Model *m) |
void | write_model (Model *m, const ParticlesTemp &particles, TextOutput out) |
Variables | |
static const double | PI = 3.1415926535897931 |
the constant pi | |
RandomNumberGenerator | random_number_generator |
A shared random number generator. |
typedef std::vector<Object*> IMP::ObjectsTemp |
A type to use when returning sets of objects so as to avoid refcounting.
Always store using Objects instead, but return ObjectsTemp. Objects can be constructed from a ObjectsTemp and vice versa.
enum IMP::CheckLevel |
Determine the level of runtime checks performed.
IMP
itself is correct. Turn these on if you suspect an IMP
bug or are developing Restraints or other IMP
classes. enum IMP::LogLevel |
The log levels supported by IMP
.
DEFAULT is only local logging (like in IMP::Object); it means to use the global log level.
VERBOSE prints very large amounts of information. It should be enough to allow the computational flow to be understood.
TERSE prints a few lines per restraint or per state each time the score is evaluated.
WARNING prints only warnings.
MEMORY prints information about allocations and deallocations to debug memory issues.
std::string IMP::get_data_path | ( | std::string | file_name | ) |
Return the path to installed data for this module.
Each module has its own data directory, so be sure to use the version of this function in the correct module. To read the data file "data_library" that was placed in the data
directory of module "mymodule", do something like
std::ifstream in(IMP::mymodule::get_data_path("data_library"));
IMP
is installed or used via the tools/imppy.sh
script.
std::string IMP::get_example_path | ( | std::string | file_name | ) |
Return the path to installed example data for this module.
Each module has its own example directory, so be sure to use the version of this function in the correct module. For example to read the file example_protein.pdb
located in the examples
directory of the IMP::atom module, do
IMP::atom::read_pdb(IMP::atom::get_example_path("example_protein.pdb", model));
IMP
is installed or used via the tools/imppy.sh
script.
LogLevel IMP::get_log_level | ( | ) |
Get the currently active log level.
This may not always match the value passed to set_log_level() as objects can temporarily override the global level while they are evaluating.
CheckLevel IMP::get_maximum_check_level | ( | ) |
Determine the maximum check level that can be used for this build.
For example, 'fast' builds can't use any checks.
O* IMP::object_cast | ( | I * | o | ) |
Up (or down) cast an IMP
Object-derived class. If the cast does not succeed a ValueException will be thrown. Use a dynamic_cast
if you prefer to have a NULL returned.
void IMP::set_check_level | ( | CheckLevel | tf | ) |
Control runtime checks in the code.
The default level of checks is USAGE for release builds and USAGE_AND_INTERNAL for debug builds.
void IMP::set_log_level | ( | LogLevel | l | ) |
Set the current global log level.
Note that this should not, currently, be used directly during Model::evaluate() calls.
void IMP::set_log_target | ( | TextOutput | l | ) |
Set the target for the log.
See TextOutput for options. Python users should use SetLogTarget instead.
void IMP::set_print_deprecation_messages | ( | bool | tf | ) |
Toggle printing of warnings on using deprecated classes.
If set to true (the default) a warning is printed every time a class marked as deprecated is used.
void IMP::set_print_exceptions | ( | bool | tf | ) |
Set whether exception messages are printed or not.
By default the error message associated with thrown exceptions are printed when using from C++, but not from Python (since the error messages of an unhandled exception are printed by the Python runtime).
RandomNumberGenerator IMP::random_number_generator |
A shared random number generator.
The random number generator is seeded based of of the current time. To provide a better seed or use a constant seed call random_number_generator.seed(x) with a 32 bit int or a 64 bit unsigned int.
This generator can be used by the Boost.Random distributions.