Each Job object describes a particular input to Rosetta. More...
#include <Jobs.hh>
Each Job object describes a particular input to Rosetta.
Ordinarily, an input is just a single PDB file. In other cases, e.g. docking, input might be a pair of PDB files. In still other cases, input might be a list of tags to extract from a silent file. And so on. One BasicJob class is defined below that should meet most needs, but if you need to carry additional information, you can subclass it.
Contains a map of strings to strings that can be used to store arbitrary extra data if you're too lazy to make a subclass. Templated get/set functions accept anything that can be read from and written to a C++ stream with >> and << operators. All data is stored as strings internally. Some numeric data may experience slight round-off error, though I think we're storing enough digits to avoid that.
Example: BasicJob jobdata("1abc.pdb", 10); jobdata.set("cmp_to", "1xyz.pdb"); jobdata.set("score", 42.42);
std::string cmp_to; core::Real score; if( jobdata.get("cmp_to", cmp_to) ) std::cout << "cmp_to = " << cmp_to << std::endl; else std::cout << "Unable to recover cmp_to!" << std::endl; if( jobdata.get("score", score) ) std::cout << "score = " << score << std::endl; else std::cout << "Unable to recover score!" << std::endl;
Although Jobs are small objects, it is common for Rosetta to loop many times over the same input. In order to avoid creating (size of -s and -l) * (nstruct) JobData objects, each Job also has an nstruct counter.
So, each Job represents a unique input, and each tuple of (Job, struct_n) represents a unique output.
You MUST ensure that input_tag is a UNIQUE identifier for this Job!
Extracts named value. Works for anything that deserializes from string. Returns false on error.
References extra_data_.
The tag supplied at create time.
References native_id_.
The tag supplied at create time plus the nstruct number (from 1 to nstruct inclusive).
References output_file_name_.
The tag supplied at create time plus the nstruct number (from 1 to nstruct inclusive).
Deliberately discards any path information in the input tag as well as any file name extension (since input tags are usually file names). There is some possibility this could lead to non-unique output tags, which deserves further consideration at some point...
References input_id_, nstruct_, preserve_whole_input_tag_, and protocols::sparta::split().
Set named value. Works for anything that serializes to a string.
References extra_data_.
The tag supplied at create time plus the nstruct number (from 1 to nstruct inclusive).
References output_file_name_, and protocols::kinmatch::str().
References preserve_whole_input_tag_.
Referenced by input_tag(), and output_tag().
Referenced by native_tag().
name of the native
Referenced by nstruct(), and output_tag().
Referenced by output_file_name(), and set_output_file_name().
Referenced by output_tag(), and set_preserve_whole_input_tag().