|
| | RotamerLibrary (utility::options::OptionCollection const &options) |
| | a new RotamerLibrary based on the option collection More...
|
| |
| virtual | ~RotamerLibrary () |
| |
| Real | rotamer_energy (Residue const &rsd, pose::Pose const &pose, RotamerLibraryScratchSpace &scratch) const |
| |
| Real | best_rotamer_energy (Residue const &rsd, pose::Pose const &pose, bool curr_rotamer_only, RotamerLibraryScratchSpace &scratch) const |
| |
| Real | rotamer_energy_deriv (Residue const &rsd, pose::Pose const &pose, RotamerLibraryScratchSpace &scratch) const |
| | to do: More...
|
| |
| rotamers::SingleResidueRotamerLibraryCOP | get_library_by_aa (chemical::AA const &aa) const |
| |
| bool | validate_dunbrack_binary () |
| | Reload the Dunbrack Rotamer libraries from ASCII, and make sure that they match the ones loaded from binary. Return true if the binary file is valid, false if the binary is invalid. NOTE WELL: This is not a const function, as reloading from ASCII modifies internals. It's also VERY thread unsafe. Never call this function from a multithreaded context. More...
|
| |
| bool | decide_read_from_binary () const |
| |
| std::string | get_binary_name () const |
| |
|
| bool | decide_read_from_binary_02 () const |
| |
| bool | decide_read_from_binary_10 () const |
| |
| bool | binary_is_up_to_date (utility::io::izstream &binlib) const |
| |
| bool | binary_is_up_to_date_02 (utility::io::izstream &binlib) const |
| |
| bool | binary_is_up_to_date_10 (utility::io::izstream &binlib) const |
| |
| bool | decide_write_binary () const |
| |
| bool | decide_write_binary_02 () const |
| |
| bool | decide_write_binary_10 () const |
| |
| std::string | get_library_name_02 () const |
| |
| std::string | get_library_name_10 () const |
| |
| std::string | get_binary_name_02 (bool for_writing=false) const |
| |
| std::string | get_binary_name_10 (bool for_writing=false) const |
| |
| Size | current_binary_format_version_id_02 () const |
| |
| Size | current_binary_format_version_id_10 () const |
| |
| void | create_fa_dunbrack_libraries () |
| | Main interface for reading in dunbrack libraries. Version option checks are handled inside. More...
|
| |
| void | create_fa_dunbrack_libraries_from_ASCII () |
| |
| void | create_fa_dunbrack_libraries_from_binary () |
| |
| void | create_fa_dunbrack_libraries_02_from_ASCII () |
| |
| void | create_fa_dunbrack_libraries_02_from_binary () |
| |
| void | create_fa_dunbrack_libraries_10_from_ASCII () |
| |
| void | create_fa_dunbrack_libraries_10_from_binary () |
| |
| void | add_residue_library (AA const &aa, rotamers::SingleResidueRotamerLibraryCOP rot_lib) |
| | Add a fullatom canonical AA Dunbrack library. More...
|
| |
| void | write_binary_fa_dunbrack_libraries () const |
| |
| void | write_binary_fa_dunbrack_libraries_02 () const |
| |
| void | write_binary_fa_dunbrack_libraries_10 () const |
| |
| std::string | random_tempname (std::string const &same_dir_as, std::string const &prefix) const |
| |
| SingleResidueDunbrackLibraryOP | create_rotameric_dunlib (chemical::ResidueType const &rt, Size const n_chi, Size const n_bb, utility::io::izstream &library, bool dun02, std::string &next_aa_in_library, bool first_three_letter_code_already_read) const |
| | Instantiate the appropriate RSRDL< T > library given the n_chi input and initialize the library from the input stream. Return the string that the library returns after reading the from the stream (which may be the empty string, or the three letter code for the next AA in the input stream). If the first three letter code for this amino acid has already been retrieved from the input stream, indicate so with the "first_three_letter_code_alread_read" boolean. More...
|
| |
| SingleResidueDunbrackLibraryOP | create_rotameric_dunlib (chemical::ResidueType const &rt, Size const n_chi, Size const n_bb, bool const dun02, bool const reduced_resolution_library=false) const |
| |
| SingleResidueDunbrackLibraryOP | create_rotameric_dunlib (chemical::ResidueType const &rt, Size const n_chi, bool dun02) const |
| |
| SingleResidueDunbrackLibraryOP | create_semi_rotameric_dunlib (chemical::ResidueType const &rt, Size const nchi, Size const nbb, bool const use_bbind_rnchi_scoring, bool const use_bbind_rnchi_sampling, bool const nrchi_is_symmetric, Real const nrchi_start_angle, utility::io::izstream &rotamer_definitions, utility::io::izstream ®ular_library, utility::io::izstream &continuous_minimization_bbdep) const |
| | Instantiate the appropriate SRSRDL< T > library given the nchi input. nchi indicates the number of rotameric chi – there are nchi+1 chi described by the library, the last of which is non-rotameric. (E.g. Tyrosine has an nchi of 1, its chi2 is non-rotameric and its chi3 is not described by the library.) The input streams are either read or not read depending on the boolean variables. More...
|
| |
| SingleResidueDunbrackLibraryOP | create_semi_rotameric_dunlib (chemical::ResidueType const &rt, Size const nchi, bool const use_bbind_rnchi_scoring, bool const use_bbind_rnchi_sampling, bool const nrchi_is_symmetric, Real const nrchi_start_angle) const |
| |
| SingleResidueDunbrackLibraryOP | create_semi_rotameric_dunlib (chemical::ResidueType const &rt, Size const nchi, Size const nbb, bool const use_bbind_rnchi_scoring, bool const use_bbind_rnchi_sampling, bool const nrchi_is_symmetric, Real const nrchi_start_angle) const |
| |
| SingleResidueDunbrackLibraryOP | create_srdl (chemical::ResidueType const &rt, DunbrackAAParameterSet const &ps, bool const reduced_resolution_library=false) const |
| |
| void | write_to_binary (utility::io::ozstream &out) const |
| | Generic "write out a library to binary" which has a straightforward nlibraries (aa, aa_data)* format. Works for both 02 and 08 libraries. The kind of aa_data written is left to the discression of the SinResDunLib derived classes. More...
|
| |
| void | read_from_binary (utility::io::izstream &in) |
| | Initialize the RotamerLibrary from the stored binary. More...
|
| |
| | RotamerLibrary () |
| |
| void | initialize_from_options (utility::options::OptionCollection const &options) |
| |
| | RotamerLibrary (RotamerLibrary const &) |
| |
| RotamerLibrary const & | operator= (RotamerLibrary const &) |
| |
A class to manage the Dunbrack Rotamer Libraries.
This class no longer manages arbitrary rotamer libraries. Use core::pack::rotamers::SingleResidueRotamerLibraryFactory::get_instance()->get( restype ); to get rotamer libraries for an arbitrary ResidueType.
| bool core::pack::dunbrack::RotamerLibrary::binary_is_up_to_date_10 |
( |
utility::io::izstream & |
binlib | ) |
const |
|
private |
Binary file is up-to-date if all the following are true:
- Version # for binary file is equal to the current version #
- All the hard coded constants for the rotameric and semirotameric libraries are the same from the previous hard coded values.
DANGER DANGER DANGER - True for dun10 as well? -JAB When we reopen the binary file in create_fa_dunbrack_libraries_08_from_binary we will want to skip past all this data; the code in that section assumes that it will read 8 arrays: 2 representing the rotameric amino acids, and 6 representing the semirotameric amino acids. The arithmetic it performs depends on this basic structure not changing, therefore, if you change this structure, you must also change the seekg arithmetic in the create...08_from_binary function.
References core::pack::dunbrack::DunbrackAAParameterSet::astr, current_binary_format_version_id_10(), core::pack::dunbrack::DunbrackAAParameterSet::get_dun10_aa_parameters(), core::pack::dunbrack::DunbrackAAParameterSet::rotameric_amino_acids, core::pack::dunbrack::DunbrackAAParameterSet::rotameric_n_chi, core::pack::dunbrack::DunbrackAAParameterSet::sampind, core::pack::dunbrack::DunbrackAAParameterSet::scind, core::pack::dunbrack::DunbrackAAParameterSet::sraa, core::pack::dunbrack::DunbrackAAParameterSet::srnchi, and core::pack::dunbrack::DunbrackAAParameterSet::sym.
Referenced by binary_is_up_to_date().
| SingleResidueDunbrackLibraryOP core::pack::dunbrack::RotamerLibrary::create_semi_rotameric_dunlib |
( |
chemical::ResidueType const & |
rt, |
|
|
Size const |
nchi, |
|
|
Size const |
nbb, |
|
|
bool const |
use_bbind_rnchi_scoring, |
|
|
bool const |
use_bbind_rnchi_sampling, |
|
|
bool const |
nrchi_is_symmetric, |
|
|
Real const |
nrchi_start_angle, |
|
|
utility::io::izstream & |
rotamer_definitions, |
|
|
utility::io::izstream & |
regular_library, |
|
|
utility::io::izstream & |
continuous_minimization_bbdep |
|
) |
| const |
|
private |
Instantiate the appropriate SRSRDL< T > library given the nchi input. nchi indicates the number of rotameric chi – there are nchi+1 chi described by the library, the last of which is non-rotameric. (E.g. Tyrosine has an nchi of 1, its chi2 is non-rotameric and its chi3 is not described by the library.) The input streams are either read or not read depending on the boolean variables.
References entropy_correction_, core::pack::dunbrack::initialize_and_read_srsrdl(), prob_buried_semi_, prob_nonburied_semi_, protocols::hybridization::r1, shap_dun10_enable_, shapovalov_lib_fixes_enable_, core::id::to_string(), and use_bicubic_.
Referenced by create_fa_dunbrack_libraries_10_from_ASCII(), create_semi_rotameric_dunlib(), and create_srdl().
| Size core::pack::dunbrack::RotamerLibrary::current_binary_format_version_id_02 |
( |
| ) |
const |
|
private |
The older binary formats did not have a version number, instead, a somewhat stupid time-stamp was hard coded and compared against the time stamp of the binary file that existed... e.g. if a new binary format was committed to trunk on 1/1/08 12:00 pm, and the time stamp on a particular binary was from 12/1/07, then the old binary file would be overwritten. However, if the time stamp on some other binary file was from 2/1/08, the code assumed that the binary file was up to date. This is a poor assumption, since the code from 12/1/07 might have been run on 2/1/08 to generate a binary file. The time stamp would have falsely indicated that the 2/1/08 generated file was of the same binary format imposed on 1/1/08.
Version numbering avoids this issue. If the 12/1/07 code wrote version # 3, the 1/1/08 code could look for version # 4 in a file generated on 2/1/08 and use the mismatch as an indication of an out-of-date binary format.
The challenge is to come up with a versioning scheme that handles the fact that until now, there haven't been version #'s in the binary files. How can a binary file generated by a pre-versioning piece of code be detected? The trick is to look at the data in the older binary file at the position which will in the future be used to hold a version number. The first piece of data in the old binary files was a count of the number of libraries in the binary file:
- Therefore, any starting version number beyond 18 would distinguish the pre-versioned files from the versioned files.
When changing the binary format, document the date of the change in the comment section below and increment the version number in the function. Do not delete old comments from the comment block below.
Version 19: start vesion number. 8/9/08. Andrew Leaver-Fay Version 20: Limit zero-probability rotamers to the resolution of the library (1e-4). 6/16/2009. Andrew Leaver-Fay Version 21: Write out bicubic spline parameters for -log(p(rot|phi,psi)). 3/28/2012. Andrew Leaver-Fay Version 22: Bicubic spline bugfix 3/29/2012. Andrew Leaver-Fay Version 23: Derivatives now are output in different order for better generality with respect to number of backbone dihedrals. Also, resolution limit repaired ( prob <= 1e-6 not prob == 0 ) 1/12/15 Andy Watkins Version 24: Changed to templating on number of bbs, can't prove that this isn't needed 1/15/15 Andy Watkins Version 25: Fixed input bug that was definitely having real effects 1/22/15 Andy Watkins Version 26: Store derivatives as double precision 4/22/20 Rocco Moretti
Referenced by binary_is_up_to_date_02(), create_fa_dunbrack_libraries_02_from_binary(), and write_binary_fa_dunbrack_libraries_02().
| Size core::pack::dunbrack::RotamerLibrary::current_binary_format_version_id_10 |
( |
| ) |
const |
|
private |
Version number for binary format. See comments for 02 version.
When changing the binary format, document the date of the change in the comment section below and increment the version number in the function. Do not delete old comments from the comment block below.
Version 1: start vesion number. 6/3/11. Andrew Leaver-Fay Version 2: Rotameric residues write out bicubic spline parameters for -log(p(rot|phi,psi)). 3/28/2012. Andrew Leaver-Fay Version 3: Tricubic interpolation data for semi-rotameric residues. 3/29/2012. Andrew Leaver-Fay Version 4: Generate and write out bicubic spline data for the rotameric portion of the semi-rotameric residues . 3/29/2012. Andrew Leaver-Fay Version 5: Derivatives now are output in different order for better generality with respect to number of backbone dihedrals. Also, resolution limit repaired ( prob <= 1e-6 not prob == 0 ) 1/12/15 Andy Watkins Version 6: Changed to templating on number of bbs, can't prove that this isn't needed 1/15/15 Andy Watkins Version 7: Fixed input bug that was definitely having real effects 1/22/15 Andy Watkins Version 8: Update to beta_nov16 corrected library 3/2017 fpd Verison 9: Store derivatives as double precision 4/22/20 Rocco Moretti
Referenced by binary_is_up_to_date_10(), and write_binary_fa_dunbrack_libraries_10().
| void core::pack::dunbrack::RotamerLibrary::read_from_binary |
( |
utility::io::izstream & |
in | ) |
|
|
private |
Initialize the RotamerLibrary from the stored binary.
Invoked through constructor. Not threadsafe in itself. Do not call directly.
Generic binary file reader. Intended to work for both 02 and 08 Libraries. If a "preamble" starts the binary format, the input stream to this function must have already been walked past it. Somewhat circularly, the preamble is anything in the binary file that leads the "nlibraries (aa, aa_data)*" format perscribed in this function.
References core::chemical::aa_unk, add_residue_library(), create_srdl(), dun10_, core::chemical::FA_STANDARD, core::pack::dunbrack::DunbrackAAParameterSet::get_dun02_aa_parameters(), core::pack::dunbrack::DunbrackAAParameterSet::get_dun10_aa_parameters(), core::chemical::ResidueType::is_beta_aa(), and core::chemical::name_from_aa().
Referenced by create_fa_dunbrack_libraries_02_from_binary(), and create_fa_dunbrack_libraries_10_from_binary().
| bool core::pack::dunbrack::RotamerLibrary::validate_dunbrack_binary |
( |
| ) |
|
Reload the Dunbrack Rotamer libraries from ASCII, and make sure that they match the ones loaded from binary. Return true if the binary file is valid, false if the binary is invalid. NOTE WELL: This is not a const function, as reloading from ASCII modifies internals. It's also VERY thread unsafe. Never call this function from a multithreaded context.
Reload the Dunbrack Rotamer libraries from ASCII, and make sure that they match the ones loaded from binary. NOTE WELL: This is not a const function, as reloading from ASCII modifies internals.
References protocols::cluster::calibur::aa, aa_libraries_, create_fa_dunbrack_libraries_from_ASCII(), decide_read_from_binary(), get_binary_name(), core::chemical::name_from_aa(), core::chemical::num_canonical_aas, and core::pack::dunbrack::TR().