IMP Reference Guide
2.19.0
The Integrative Modeling Platform
|
Report key:value information on restraints. More...
#include <IMP/RestraintInfo.h>
Report key:value information on restraints.
These objects are typically returned by Restraint::get_static_info() or Restraint::get_dynamic_info() and are used to report information about a Restraint instance as a set of key:value pairs. The primary purpose is to allow restraints to be written to files, such as RMF.
Key names are generally lowercase, full words, space-separated, for example "force constant" rather than "force_constant", "ForceConstant", or "k".
Values can be simple types (int, float, string) or lists of them; filename(s) (treated similarly to strings but paths are made relative to that of the output file); or particles.
Note that when written to RMF files, RMF stores both string and filename keys as strings. To help it distinguish the two, the convention is for filename key names to end in "filename" or "filenames".
Particle index values are generally used for one of two purposes. First, to reference particles that contain restraint information (either static or dynamic) that often exist outside of the molecular hierarchy, such as Bayesian nuisances or Gaussians for an EM density map. Second, to explicitly group or sort restraint particles (as the default list of restraint inputs is unsorted and does not contain duplicates) such as each endpoint of a pairwise restraint, or the two groups of particles in a bipartite restraint. The particles must live in the same model as the restraint.
Definition at line 47 of file RestraintInfo.h.
Public Member Functions | |
RestraintInfo (std::string name="RestraintInfo %1%") | |
void | add_filename (std::string key, std::string value) |
Add a filename value referenced by the given key. More... | |
void | add_filenames (std::string key, Strings value) |
Add a list of filename values referenced by the given key. More... | |
void | add_float (std::string key, double value) |
Add a float value referenced by the given key. More... | |
void | add_floats (std::string key, Floats value) |
Add a list of Float values referenced by the given key. More... | |
void | add_int (std::string key, int value) |
Add an int value referenced by the given key. More... | |
void | add_ints (std::string key, Ints value) |
Add a list of Int values referenced by the given key. More... | |
void | add_particle_indexes (std::string key, ParticleIndexes value) |
Add ParticleIndexes referenced by the given key. More... | |
void | add_string (std::string key, std::string value) |
Add a string value referenced by the given key. More... | |
void | add_strings (std::string key, Strings value) |
Add a list of string values referenced by the given key. More... | |
std::string | get_filename_key (unsigned i) const |
Get the key for the ith filename mapping. More... | |
std::string | get_filename_value (unsigned i) const |
Get the value for the ith filename mapping. More... | |
std::string | get_filenames_key (unsigned i) const |
Get the key for the ith filenames mapping. More... | |
Strings | get_filenames_value (unsigned i) const |
Get the value for the ith filenames mapping. More... | |
std::string | get_float_key (unsigned i) const |
Get the key for the ith float mapping. More... | |
double | get_float_value (unsigned i) const |
Get the value for the ith float mapping. More... | |
std::string | get_floats_key (unsigned i) const |
Get the key for the ith Floats mapping. More... | |
Floats | get_floats_value (unsigned i) const |
Get the value for the ith Floats mapping. More... | |
std::string | get_int_key (unsigned i) const |
Get the key for the ith int mapping. More... | |
int | get_int_value (unsigned i) const |
Get the value for the ith int mapping. More... | |
std::string | get_ints_key (unsigned i) const |
Get the key for the ith Ints mapping. More... | |
Ints | get_ints_value (unsigned i) const |
Get the value for the ith Ints mapping. More... | |
unsigned | get_number_of_filename () const |
Get the number of filename that have been added. More... | |
unsigned | get_number_of_filenames () const |
Get the number of filenames that have been added. More... | |
unsigned | get_number_of_float () const |
Get the number of float that have been added. More... | |
unsigned | get_number_of_floats () const |
Get the number of Floats that have been added. More... | |
unsigned | get_number_of_int () const |
Get the number of int that have been added. More... | |
unsigned | get_number_of_ints () const |
Get the number of Ints that have been added. More... | |
unsigned | get_number_of_particle_indexes () const |
Get the number of ParticleIndexes that have been added. More... | |
unsigned | get_number_of_string () const |
Get the number of string that have been added. More... | |
unsigned | get_number_of_strings () const |
Get the number of strings that have been added. More... | |
std::string | get_particle_indexes_key (unsigned i) const |
Get the key for the ith ParticleIndexes mapping. More... | |
ParticleIndexes | get_particle_indexes_value (unsigned i) const |
Get the value for the ith ParticleIndexes mapping. More... | |
std::string | get_string_key (unsigned i) const |
Get the key for the ith string mapping. More... | |
std::string | get_string_value (unsigned i) const |
Get the value for the ith string mapping. More... | |
std::string | get_strings_key (unsigned i) const |
Get the key for the ith strings mapping. More... | |
Strings | get_strings_value (unsigned i) const |
Get the value for the ith strings mapping. More... | |
virtual std::string | get_type_name () const override |
virtual ::IMP::VersionInfo | get_version_info () const override |
Get information about the module and version of the object. More... | |
Public Member Functions inherited from IMP::Object | |
virtual void | clear_caches () |
CheckLevel | get_check_level () const |
LogLevel | get_log_level () const |
void | set_check_level (CheckLevel l) |
void | set_log_level (LogLevel l) |
Set the logging level used in this object. More... | |
void | set_was_used (bool tf) const |
void | show (std::ostream &out=std::cout) const |
const std::string & | get_name () const |
void | set_name (std::string name) |
Additional Inherited Members | |
Protected Member Functions inherited from IMP::Object | |
Object (std::string name) | |
Construct an object with the given name. More... | |
virtual void | do_destroy () |
void IMP::RestraintInfo::add_filename | ( | std::string | key, |
std::string | value | ||
) |
Add a filename value referenced by the given key.
Filenames are treated similarly to strings but the caller is expected to make them absolute paths before adding them here. When written to file they may be converted to paths relative to the file.
void IMP::RestraintInfo::add_filenames | ( | std::string | key, |
Strings | value | ||
) |
Add a list of filename values referenced by the given key.
Filenames are treated similarly to strings but the caller is expected to make them absolute paths before adding them here. When written to file they may be converted to paths relative to the file.
void IMP::RestraintInfo::add_float | ( | std::string | key, |
double | value | ||
) |
Add a float value referenced by the given key.
void IMP::RestraintInfo::add_floats | ( | std::string | key, |
Floats | value | ||
) |
Add a list of Float values referenced by the given key.
void IMP::RestraintInfo::add_int | ( | std::string | key, |
int | value | ||
) |
Add an int value referenced by the given key.
void IMP::RestraintInfo::add_ints | ( | std::string | key, |
Ints | value | ||
) |
Add a list of Int values referenced by the given key.
void IMP::RestraintInfo::add_particle_indexes | ( | std::string | key, |
ParticleIndexes | value | ||
) |
Add ParticleIndexes referenced by the given key.
void IMP::RestraintInfo::add_string | ( | std::string | key, |
std::string | value | ||
) |
Add a string value referenced by the given key.
void IMP::RestraintInfo::add_strings | ( | std::string | key, |
Strings | value | ||
) |
Add a list of string values referenced by the given key.
std::string IMP::RestraintInfo::get_filename_key | ( | unsigned | i | ) | const |
Get the key for the ith filename mapping.
Definition at line 104 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_filename_value | ( | unsigned | i | ) | const |
Get the value for the ith filename mapping.
Definition at line 107 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_filenames_key | ( | unsigned | i | ) | const |
Get the key for the ith filenames mapping.
Definition at line 166 of file RestraintInfo.h.
Strings IMP::RestraintInfo::get_filenames_value | ( | unsigned | i | ) | const |
Get the value for the ith filenames mapping.
Definition at line 171 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_float_key | ( | unsigned | i | ) | const |
Get the key for the ith float mapping.
Definition at line 72 of file RestraintInfo.h.
double IMP::RestraintInfo::get_float_value | ( | unsigned | i | ) | const |
Get the value for the ith float mapping.
Definition at line 75 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_floats_key | ( | unsigned | i | ) | const |
Get the key for the ith Floats mapping.
Definition at line 118 of file RestraintInfo.h.
Floats IMP::RestraintInfo::get_floats_value | ( | unsigned | i | ) | const |
Get the value for the ith Floats mapping.
Definition at line 121 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_int_key | ( | unsigned | i | ) | const |
Get the key for the ith int mapping.
Definition at line 58 of file RestraintInfo.h.
int IMP::RestraintInfo::get_int_value | ( | unsigned | i | ) | const |
Get the value for the ith int mapping.
Definition at line 61 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_ints_key | ( | unsigned | i | ) | const |
Get the key for the ith Ints mapping.
Definition at line 132 of file RestraintInfo.h.
Ints IMP::RestraintInfo::get_ints_value | ( | unsigned | i | ) | const |
Get the value for the ith Ints mapping.
Definition at line 135 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_filename | ( | ) | const |
Get the number of filename that have been added.
Definition at line 101 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_filenames | ( | ) | const |
Get the number of filenames that have been added.
Definition at line 163 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_float | ( | ) | const |
Get the number of float that have been added.
Definition at line 69 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_floats | ( | ) | const |
Get the number of Floats that have been added.
Definition at line 115 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_int | ( | ) | const |
Get the number of int that have been added.
Definition at line 55 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_ints | ( | ) | const |
Get the number of Ints that have been added.
Definition at line 129 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_particle_indexes | ( | ) | const |
Get the number of ParticleIndexes that have been added.
Definition at line 179 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_string | ( | ) | const |
Get the number of string that have been added.
Definition at line 83 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_strings | ( | ) | const |
Get the number of strings that have been added.
Definition at line 143 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_particle_indexes_key | ( | unsigned | i | ) | const |
Get the key for the ith ParticleIndexes mapping.
Definition at line 182 of file RestraintInfo.h.
ParticleIndexes IMP::RestraintInfo::get_particle_indexes_value | ( | unsigned | i | ) | const |
Get the value for the ith ParticleIndexes mapping.
Definition at line 187 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_string_key | ( | unsigned | i | ) | const |
Get the key for the ith string mapping.
Definition at line 86 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_string_value | ( | unsigned | i | ) | const |
Get the value for the ith string mapping.
Definition at line 89 of file RestraintInfo.h.
std::string IMP::RestraintInfo::get_strings_key | ( | unsigned | i | ) | const |
Get the key for the ith strings mapping.
Definition at line 146 of file RestraintInfo.h.
Strings IMP::RestraintInfo::get_strings_value | ( | unsigned | i | ) | const |
Get the value for the ith strings mapping.
Definition at line 151 of file RestraintInfo.h.
|
overridevirtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
Definition at line 191 of file RestraintInfo.h.