IMP Reference Guide
2.22.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... | |
void | clear () |
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 117 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 120 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 179 of file RestraintInfo.h.
Strings IMP::RestraintInfo::get_filenames_value | ( | unsigned | i | ) | const |
Get the value for the ith filenames mapping.
Definition at line 184 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 85 of file RestraintInfo.h.
double IMP::RestraintInfo::get_float_value | ( | unsigned | i | ) | const |
Get the value for the ith float mapping.
Definition at line 88 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 131 of file RestraintInfo.h.
Floats IMP::RestraintInfo::get_floats_value | ( | unsigned | i | ) | const |
Get the value for the ith Floats mapping.
Definition at line 134 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 71 of file RestraintInfo.h.
int IMP::RestraintInfo::get_int_value | ( | unsigned | i | ) | const |
Get the value for the ith int mapping.
Definition at line 74 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 145 of file RestraintInfo.h.
Ints IMP::RestraintInfo::get_ints_value | ( | unsigned | i | ) | const |
Get the value for the ith Ints mapping.
Definition at line 148 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_filename | ( | ) | const |
Get the number of filename that have been added.
Definition at line 114 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_filenames | ( | ) | const |
Get the number of filenames that have been added.
Definition at line 176 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_float | ( | ) | const |
Get the number of float that have been added.
Definition at line 82 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_floats | ( | ) | const |
Get the number of Floats that have been added.
Definition at line 128 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_int | ( | ) | const |
Get the number of int that have been added.
Definition at line 68 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_ints | ( | ) | const |
Get the number of Ints that have been added.
Definition at line 142 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 192 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_string | ( | ) | const |
Get the number of string that have been added.
Definition at line 96 of file RestraintInfo.h.
unsigned IMP::RestraintInfo::get_number_of_strings | ( | ) | const |
Get the number of strings that have been added.
Definition at line 156 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 195 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 200 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 99 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 102 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 159 of file RestraintInfo.h.
Strings IMP::RestraintInfo::get_strings_value | ( | unsigned | i | ) | const |
Get the value for the ith strings mapping.
Definition at line 164 of file RestraintInfo.h.
|
overridevirtual |
Get information about the module and version of the object.
Reimplemented from IMP::Object.
Definition at line 204 of file RestraintInfo.h.