8 #ifndef IMPCORE_PROVENANCE_H
9 #define IMPCORE_PROVENANCE_H
11 #include <IMP/core/core_config.h>
21 IMPCORE_BEGIN_NAMESPACE
68 "Previous provenance is already set");
90 int residue_offset=0) {
95 m->
add_attribute(get_residue_offset_key(), pi, residue_offset);
106 static IntKey get_residue_offset_key();
157 std::string, chain_id,
int, residue_offset);
159 std::string, chain_id);
175 std::string method,
int frames,
176 int iterations,
int replicas=1) {
177 validate_method(method);
193 static IntKey get_frames_key();
194 static IntKey get_iterations_key();
195 static IntKey get_replicas_key();
198 static std::set<std::string>& get_allowed_methods();
202 static void validate_method(std::string method) {
204 != get_allowed_methods().end(),
205 "Invalid sampling method",
219 validate_method(method);
266 int, iterations,
int, replicas);
293 static IntKey get_runs_key();
294 static IntKey get_frames_key();
342 double threshold,
int frames) {
343 validate_method(method);
356 static FloatKey get_threshold_key();
357 static IntKey get_frames_key();
360 static std::set<std::string>& get_allowed_methods();
364 static void validate_method(std::string method) {
366 != get_allowed_methods().end(),
367 "Invalid filtering method",
381 validate_method(method);
416 double, threshold,
int, frames);
437 static IntKey get_members_key();
467 std::string filename) {
520 std::string location) {
581 std::string, version, std::string, location);
621 IMPCORE_END_NAMESPACE
The base class for decorators.
static Provenance setup_particle(Model *m, ParticleIndex pi)
Various general useful macros for IMP.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
int get_number_of_frames() const
void set_number_of_iterations(int iterations) const
Set the number of iterations.
Track creation of a system fragment from running some software.
int get_number_of_members() const
Hierarchy create_clone(Hierarchy d)
Clone the Hierarchy.
void set_version(std::string version) const
Set the version.
void set_threshold(double threshold) const
Set the score threshold.
std::string get_method() const
double get_threshold() const
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
An exception for an invalid usage of IMP.
Model * get_model() const
Returns the Model containing the particle.
std::string get_software_name() const
std::string get_location() const
void set_previous(Provenance p)
Set the previous provenance.
int get_number_of_replicas() const
void set_method(std::string method) const
void set_location(std::string location) const
Set the location.
Track creation of a system fragment from sampling.
Handling of file input/output.
int get_residue_offset() const
void set_method(std::string method) const
void set_filename(std::string filename) const
Set the filename.
Track creation of a system fragment by combination.
void set_software_name(std::string name) const
Set the name.
Class for storing model, its restraints, constraints, and particles.
void set_number_of_replicas(int replicas) const
Set the number of replicas.
std::string get_filename() const
Provenance get_previous() const
std::string get_version() const
void set_chain_id(std::string chain_id) const
Set the chain ID.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle atribute with the specied key and initial value
Track creation of a system fragment by filtering.
std::string get_filename() const
Various general useful macros for IMP.
void set_number_of_runs(int runs) const
Set the number of runs.
Track creation of a system fragment from a PDB file.
#define IMP_DECORATOR_SETUP_2(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name)
void set_number_of_frames(int frames) const
Set the total number of frames.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
set the value of particle attribute with the specified key
#define IMP_DECORATOR_SETUP_0(Name)
void set_residue_offset(int residue_offset) const
Set the offset between PDB and internal numbering (defaults to 0)
#define IMP_DECORATOR_SETUP_4(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name,FourthArgumentType, fourth_argument_name)
void set_number_of_members(int members) const
Set the number of cluster members.
int get_number_of_frames() const
Interface to specialized Particle types (e.g. atoms)
std::string get_absolute_path(std::string file)
Convert a possibly relative path to an absolute path.
void set_filename(std::string filename) const
Set the filename.
A shared base class to help in debugging and things.
int get_number_of_runs() const
#define IMP_DECORATOR_METHODS(Name, Parent)
Track creation of a system fragment from clustering.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
std::string get_method() const
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
Track how parts of the system were created.
#define IMP_ALWAYS_CHECK(condition, message, exception_name)
Throw an exception if a check fails.
#define IMP_DECORATOR_SETUP_3(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name)
int get_number_of_frames() const
void add_provenance(Model *m, ParticleIndex pi, Provenance p)
Add provenance to part of the model.
Tag part of the system to track how it was created.
std::string get_chain_id() const
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
get the value of the particle attribute with the specified key
int get_number_of_iterations() const
void set_number_of_frames(int frames) const
Set the number of frames.
Track creation of a system fragment from running a script.
void set_number_of_frames(int frames) const
Set the number of frames.