![]() |
Rosetta Core
2014.35
|
This class is meant to represent the non-rotameric chi observed in several amino acids (asn, asp, gln, glu, his, phe, trp, tyr ) which are rotameric for the chi closest to the backbone and non rotameric for exactly one chi angle. This non-rotameric chi (abv. nrchi) is the last chi for each of these 8 amino acids except tyrosine, where this chi is the last heavy-atom chi. The last chi on tyrosine governs a hydroxyl. Unlike in the fully rotameric residues, the last heavyatom chi in semi-rotameric residues do not "communicate" to the rotameric chi. That is, in the rotameric chi, the mean chi1 value is sensitive to the chi3 value. If the third diherdal switches from trans to g+, then chi1 would shift in response. Changes to the non-rotameric chi do not effect the rotameric chi. The data structure here is good for this model but no other. More...
#include <SemiRotamericSingleResidueDunbrackLibrary.hh>
Public Types | |
typedef RotamericSingleResidueDunbrackLibrary < T > | parent |
typedef SingleResidueDunbrackLibrary | grandparent |
![]() | |
typedef SingleResidueDunbrackLibrary | parent |
![]() | |
typedef chemical::AA | AA |
Public Member Functions | |
SemiRotamericSingleResidueDunbrackLibrary (chemical::AA const aa_in, bool const backbone_independent_scoring, bool const backbone_independent_rotamer_sampling) | |
The constructor determines the path the library takes: whether it uses a backbone dependent or independent score function for the non-rotameric chi (the rotameric chi score function is always backbone dependent) and whether it uses a backbone dependent or independent rotamer sampling scheme. All four combinations are possible, though backbone independent scoring and backbone dependent rotamer sampling seems a poor combination. More... | |
virtual | ~SemiRotamericSingleResidueDunbrackLibrary () |
virtual Real | rotamer_energy (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch) const |
Virtual functions required by the base classes. More... | |
virtual Real | rotamer_energy_deriv (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch) const |
virtual Real | best_rotamer_energy (conformation::Residue const &rsd, bool curr_rotamer_only, RotamerLibraryScratchSpace &scratch) const |
Returns the energy of the lowest-energy rotamer accessible to the given residue (based on e.g. its current phi and psi values). If curr_rotamer_only is true, then consider only the idealized version of the residue's current rotamer (local optimum); otherwise, consider all rotamers (global optimum). More... | |
virtual void | assign_random_rotamer_with_bias (conformation::Residue const &rsd, pose::Pose const &pose, RotamerLibraryScratchSpace &scratch, numeric::random::RandomGenerator &RG, ChiVector &new_chi_angles, bool perturb_from_rotamer_center) const |
Pick a rotamer for the input residue according to the rotamer probability distribution and assign chi angles to the input rsd. If perturb_from_rotamer_center is true, then push the rotamer off from the center; for chi angles with a normal distribution, the perturbation is taken from a Gaussian random number with a standard deviation matching the chi angle's standard deviation. For chi angles that are not normally distributed, the behavior is open to the derived classe's interpretation. More... | |
virtual void | fill_rotamer_vector (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, pack::task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue, utility::vector1< utility::vector1< Real > > const &extra_chi_steps, bool buried, RotamerVector &rotamers) const |
virtual utility::vector1 < DunbrackRotamerSampleData > | get_all_rotamer_samples (Real phi, Real psi) const |
Return all of the rotamer sample data given a particular phi/psi. For N-terminus residues, hand in the phi value SingleResidueDunbrackLibrary::PHI_NEUTRAL and for C-terminus residues, hand in the psi value SingleResidueDunbrackLibrary::PSI_NEUTRAL. The returned samples should be in semi-decrasing order by probability; semi, because the rotamers are constructed in sorted order by their probability in the lower phi-psi bin that the input phi/psi perscribes. More... | |
virtual Real | get_probability_for_rotamer (Real phi, Real psi, Size rot_ind) const |
Return the probability for a particular rotamer where rotamers are indexed in order of decreasing probability (or something very close to decreasing probability). More... | |
virtual DunbrackRotamerSampleData | get_rotamer (Real phi, Real psi, Size rot_ind) const |
virtual Size | nchi () const |
The number of chi represented by the library. More... | |
virtual Size | n_rotamer_bins () const |
virtual void | write_to_file (utility::io::ozstream &out) const |
virtual void | write_to_binary (utility::io::ozstream &out) const |
void | read_from_files (utility::io::izstream &in_rotdef, utility::io::izstream &in_rotameric, utility::io::izstream &in_continmin_bbdep, utility::io::izstream &in_continmin_bbind) |
Initialize either a backbone-independent or a backbone-dependent SRSRDL from the set of four files which describe both (not all files are read). More... | |
void | read_from_files (utility::io::izstream &in_rotdef, utility::io::izstream &in_rotameric, utility::io::izstream &in_continmin_bbdep) |
Initialize a backbone-dependent SRSRDL from the set of three files which describe it. More... | |
virtual void | read_from_binary (utility::io::izstream &in) |
virtual void | get_rotamer_from_chi (ChiVector const &chi, RotVector &rot) const |
Convert a vector of chi angles (degrees) into a integer vector of rotamer wells. Derived class should be consistent, but may be arbitrary in how wells divide angle space. More... | |
void | set_nrchi_periodicity (Real angle_in_degrees) |
Initialization functions that must be called before reading the input libraries. More... | |
void | set_nonrotameric_chi_start_angle (Real angle_in_degrees) |
What angle do the interpolation data start from? More... | |
void | set_nonrotameric_chi_bbdep_scoring_step_size (Real step_size_in_degrees) |
What is the angular step size of the bbdep score? More... | |
void | set_nonrotameric_chi_bbind_scoring_step_size (Real step_size_in_degrees) |
What is the angular step size of the bbind score? More... | |
![]() | |
RotamericSingleResidueDunbrackLibrary (AA const aa_in, bool dun02) | |
virtual | ~RotamericSingleResidueDunbrackLibrary () |
std::string | read_from_file (utility::io::izstream &in, bool first_line_three_letter_code_already_read) |
Read from input stream; stream may contain data for other amino acids. Quit once another amino acid is specified in the input file, returning the name of the next amino acid specifed (since it's already been extracted from the input stream). Return the empty string if no other amino acid is specified. More... | |
Size | find_another_representative_for_unlikely_rotamer (conformation::Residue const &rsd, Size4 &rotwell) const |
void | interpolate_rotamers (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, Size const packed_rotno, PackedDunbrackRotamer< T, Real > &interpolated_rotamer) const |
![]() | |
SingleResidueDunbrackLibrary (AA const aa, Size const n_rotameric_chi, bool dun02) | |
c-tor More... | |
virtual | ~SingleResidueDunbrackLibrary () |
void | read_options () |
virtual Size | memory_usage_in_bytes () const |
Virtual functions the derived classes must implement. More... | |
void | set_n_chi_bins (utility::vector1< Size > const &) |
Tell the base class the number of chi bins for each rotameric chi dimension. More... | |
Size | rotwell_2_rotno (utility::vector1< Size > const &rotwell) const |
Conversion functions. More... | |
Size | rotwell_2_rotno (Size4 const &rotwell) const |
Convert from the rotamer bin indices for each chi to the (non-compact) "rotamer number". More... | |
Size | rotno_2_packed_rotno (Size const rotno) const |
Convert from the rotamer number to the compacted "packed rotamer number". Returns 0 if rotno has no corresponding packed rotno. More... | |
Size | rotwell_2_packed_rotno (utility::vector1< Size > const &rotwell) const |
Convert from the rotamer bin indices for each chi to the compacted "packed rotamer number." Returns 0 if rotwell has no corresponding packed rotno. More... | |
Size | rotwell_2_packed_rotno (Size4 const &rotwell) const |
Convert from the rotamer bin indices for each chi to the compacted "packed rotamer number." Returns 0 if rotwell has no corresponding packed rotno. More... | |
void | packed_rotno_2_rotwell (Size const packed_rotno, utility::vector1< Size > &rotwell) const |
Convert from the packed rotamer number to the rotamer well. More... | |
void | packed_rotno_2_rotwell (Size const packed_rotno, Size4 &rotwell) const |
utility::vector1< Size > const & | packed_rotno_2_rotwell (Size const packed_rotno) const |
void | rotno_2_rotwell (Size const rotno, utility::vector1< Size > &rotwell) const |
Convert from the rotamer number to the rotamer well. More... | |
Size | bin_rotameric_chi (Real chi, Size which_chi) const |
, Turns out, when non-rotameric chi are taken out of the picture, all remaining chi are binned the same way, except proline. Valid only for Dun10 libraries. For D-amino acids, chi must be inverted before passing to this function. More... | |
void | bin_angle (Real const angle_start, Real const angle_step, Real const ASSERT_ONLY(angle_range), Size const nbins, Real const ang, Size &bin_lower, Size &bin_upper, Real &angle_alpha) const |
This is not the right place for this code, but the numeric interpolation library uselessly indexes by 0 and the basic functions aren't inlined... More... | |
AA | aa () const |
The amino acid this library is representing. More... | |
Real | probability_to_accumulate_while_building_rotamers (bool buried) const |
When creating rotamer, what position in the CDF should one build until? Unlikely rotamers ( < 0.5 %) are numerous, but are very infrequently useful. More... | |
void | prob_to_accumulate (Real, Real) |
setters for accumulation probability cutoff (to support externally-controlled option dependence) More... | |
void | prob_to_accumulate_buried (Real) |
void | prob_to_accumulate_nonburied (Real) |
![]() | |
virtual | ~SingleResidueRotamerLibrary () |
Protected Member Functions | |
virtual Size | memory_usage_static () const |
Worker functions. More... | |
virtual Size | memory_usage_dynamic () const |
Real | rotamer_energy_deriv_bbdep (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, bool eval_deriv) const |
Real | rotamer_energy_deriv_bbind (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, bool eval_deriv) const |
void | assign_random_rotamer_with_bias_bbind (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, numeric::random::RandomGenerator &RG, ChiVector &new_chi_angles, bool perturb_from_rotamer_center) const |
void | assign_random_rotamer_with_bias_bbdep (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, numeric::random::RandomGenerator &RG, ChiVector &new_chi_angles, bool perturb_from_rotamer_center) const |
Real | bbind_nrchi_score (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, Real &dnrchi_score_dnrchi) const |
Real | bbdep_nrchi_score (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, Real &dnrchi_score_dnrchi, Real &dnrchi_score_dphi, Real &dnrchi_score_dpsi) const |
Trilinear interpolation. Derivatives discontinuous at edge planes. Correction: it seems that this was updated at some point to use tricubic interpolation. Note: This function has been updated to handle D-amino acids properly. More... | |
void | fill_rotamer_vector_bbind (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, pack::task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue, utility::vector1< utility::vector1< Real > > const &extra_chi_steps, bool buried, RotamerVector &rotamers) const |
void | fill_rotamer_vector_bbdep (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, pack::task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue, utility::vector1< utility::vector1< Real > > const &extra_chi_steps, bool buried, RotamerVector &rotamers) const |
utility::vector1 < DunbrackRotamerSampleData > | get_all_rotamer_samples_bbind (Real phi, Real psi) const |
utility::vector1 < DunbrackRotamerSampleData > | get_all_rotamer_samples_bbdep (Real phi, Real psi) const |
Real | get_probability_for_rotamer_bbind (Real phi, Real psi, Size rot_ind) const |
Real | get_probability_for_rotamer_bbdep (Real phi, Real psi, Size rot_ind) const |
DunbrackRotamerSampleData | get_rotamer_bbind (Real phi, Real psi, Size rot_ind) const |
DunbrackRotamerSampleData | get_rotamer_bbdep (Real phi, Real psi, Size rot_ind) const |
virtual void | chisamples_for_rotamer_and_chi (chemical::ResidueType const &rsd_type, pack::task::ResidueLevelTask const &rtask, bool buried, Size const chi_index, RotamericData< T > const &rotamer_data, utility::vector1< Real > const &extra_steps, utility::vector1< Real > &total_chi, utility::vector1< int > &total_rot, utility::vector1< Real > &total_ex_steps, utility::vector1< Real > &chisample_prob) const |
overrides parent class for the non-rotameric chi, but falls back on the parent class functionality for all other chi. More... | |
![]() | |
void | initialize_bicubic_splines () |
void | get_rotamer_from_chi_static (ChiVector const &chi, Size4 &rot) const |
When given a statically sized fixedsizearray, use this method. More... | |
void | get_rotamer_from_chi_static (Real4 const &chi, Size4 &rot) const |
When given a statically sized fixedsizearray, use this method. More... | |
ObjexxFCL::FArray3D < PackedDunbrackRotamer< T > > const & | rotamers () const |
Read and write access for derived classes. More... | |
ObjexxFCL::FArray3D < PackedDunbrackRotamer< T > > & | rotamers () |
ObjexxFCL::FArray3D< Size > const & | packed_rotno_2_sorted_rotno () const |
ObjexxFCL::FArray3D< Size > & | packed_rotno_2_sorted_rotno () |
Real | eval_rotameric_energy_deriv (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, bool eval_deriv) const |
Evaluates the score and chi-deviation penalty for the rotameric chi (in this class, that means all the chi) and stores the answers in the scratch object. If eval_deriv is true, then at the end of this function, scratch contains up-to-date dchidevpen_dbb, dchidevpen_dchi, chimean, chisd, chidev, chidevpen, dchimean_d(phi/psi), dchisd_d(phi/psi) rotwell and rotprob data. More... | |
void | interpolate_rotamers (RotamerLibraryScratchSpace &scratch, Size const packed_rotno, Size const phibin, Size const psibin, Size const phibin_next, Size const psibin_next, Real const phi_alpha, Real const psi_alpha, PackedDunbrackRotamer< T, Real > &interpolated_rotamer) const |
void | assign_random_rotamer (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch, numeric::random::RandomGenerator &RG, ChiVector &new_chi_angles, bool perturb_from_rotamer_center, Size &packed_rotno) const |
Assigns random chi angles and returns the packed_rotno for the chosen random rotamer. More... | |
void | assign_chi_for_interpolated_rotamer (PackedDunbrackRotamer< T, Real > const &interpolated_rotamer, conformation::Residue const &rsd, numeric::random::RandomGenerator &RG, ChiVector &new_chi_angles, bool perturb_from_rotamer_center) const |
void | correct_termini_derivatives (conformation::Residue const &rsd, RotamerLibraryScratchSpace &scratch) const |
void | get_phipsi_bins (Real phi, Real psi, Size &phibin, Size &psibin, Size &phibin_next, Size &psibin_next, Real &phi_alpha, Real &psi_alpha) const |
void | get_phipsi_bins (Real phi, Real psi, Size &phibin, Size &psibin) const |
Real | get_phi_from_rsd (conformation::Residue const &rsd) const |
Real | get_psi_from_rsd (conformation::Residue const &rsd) const |
template<class P > | |
DunbrackRotamer< T, P > | packed_rotamer_2_regular_rotamer (PackedDunbrackRotamer< T, P > const &packedrot) const |
void | enumerate_chi_sets (chemical::ResidueType const &rsd_type, pack::task::PackerTask const &task, Size const seqpos, bool buried, RotamericData< T > const &rotamer_data, utility::vector1< utility::vector1< Real > > const &extra_chi_steps, utility::vector1< ChiSetOP > &chi_set_vector) const |
This member function constructs a list of all combinations of chi angles for a rotamer sample. It relies on a virtual function chisamples_for_rotamer_chi that may be overridden by derived classes. With a list of samples for each chi, this function then enumerates all combinations. More... | |
void | create_rotamers_from_chisets (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, pack::task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue, utility::vector1< ChiSetOP > const &chi_set_vector, RotamerVector &rotamers) const |
Once all the chi have been enumerated, building the rotamers is a trivial task. This function is protected so that derived classes may simply enumerate their chi and then invoke this function. This arguably should be moved into the SingleResidueRotamerLibrary base class. More... | |
void | setup_entropy_correction () |
void | setup_entropy_correction () const |
![]() | |
bool | dun02 () const |
Read access for the derived class. More... | |
utility::vector1< Size > const & | n_chi_bins () const |
Read access to the n_chi_bins_ vector. More... | |
void | mark_rotwell_exists (utility::vector1< Size > const &rotwell) |
The base class needs to be informed about which rotamer wells exist in order to create the rotwell to packed rot conversion data. set_chi_nbins must be called first. More... | |
void | declare_all_existing_rotwells_encountered () |
After the derived class has marked all the rotwells that do exist, the base class will create the rotwell to packerot conversion data. More... | |
Size | n_packed_rots () const |
The number of existing rotamers. More... | |
Size | n_possible_rots () const |
The number of possible rotamers – product of the chi_nbins_ array. More... | |
Private Member Functions | |
void | read_rotamer_definitions (utility::io::izstream &in_rotdef) |
void | read_bbdep_continuous_minimization_data (utility::io::izstream &in_contmin) |
void | read_bbind_continuous_minimization_data (utility::io::izstream &in_contmin) |
void | read_rotameric_data (utility::io::izstream &in_rotameric) |
void | build_bbdep_rotamers (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, pack::task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue, utility::vector1< utility::vector1< Real > > const &extra_chi_steps, bool buried, PackedDunbrackRotamer< T, Real > const &interpolated_rotamer, BBDepNRChiSample< Real > const interpolated_sample, RotamerVector &rotamers) const |
void | build_bbind_rotamers (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, pack::task::PackerTask const &task, graph::GraphCOP packer_neighbor_graph, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue, utility::vector1< utility::vector1< Real > > const &extra_chi_steps, bool buried, PackedDunbrackRotamer< T, Real > const &interpolated_rotamer, Size const nrchi_rotno, BBIndNRChiSample<> const &interpolated_sample, RotamerVector &rotamers) const |
void | bbind_chisamples_for_rotamer_chi (chemical::ResidueType const &rsd_type, pack::task::ResidueLevelTask const &rtask, bool buried, Size const chi_index, RotamericData< T > const &rotamer_data, utility::vector1< Real > const &extra_steps, utility::vector1< Real > &total_chi, utility::vector1< int > &total_rot, utility::vector1< Real > &total_ex_steps, utility::vector1< Real > &chisample_prob) const |
void | bbdep_chisamples_for_rotamer_chi (chemical::ResidueType const &rsd_type, pack::task::ResidueLevelTask const &rtask, bool buried, Size const chi_index, RotamericData< T > const &rotamer_data, utility::vector1< Real > const &extra_steps, utility::vector1< Real > &total_chi, utility::vector1< int > &total_rot, utility::vector1< Real > &total_ex_steps, utility::vector1< Real > &chisample_prob) const |
Real | clip_to_nrchi_range (Real chi) const |
void | get_bbdep_nrchi_bin (Real nrchi, Size &bin_lower, Size &bin_upper, Real &nrchi_alpha) const |
void | get_bbind_nrchi_bin (Real nrchi, Size &bin_lower, Size &bin_upper, Real &nrchi_alpha) const |
BBDepNRChiSample< Real > | interpolate_bbdep_nrchi_sample (Size const packed_rotno, Size const nrchi_bin, Size const phibin, Size const psibin, Size const phibin_next, Size const psibin_next, Real const phi_alpha, Real const psi_alpha) const |
BBDepNRChiSample< Real > | interpolate_bbdep_nrchi_sample (BBDepNRChiSample<> const &nrchi_sample_00, BBDepNRChiSample<> const &nrchi_sample_01, BBDepNRChiSample<> const &nrchi_sample_10, BBDepNRChiSample<> const &nrchi_sample_11, Real const phi_alpha, Real const psi_alpha) const |
Private Attributes | |
bool const | bbind_nrchi_scoring_ |
no default ctor SemiRotamericSingleResidueDunbrackLibrary(); More... | |
bool const | bbind_nrchi_sampling_ |
Real | nrchi_periodicity_ |
Real | nrchi_lower_angle_ |
utility::vector1 < ObjexxFCL::FArray3D < BBDepScoreInterpData > > | bbdep_nrc_interpdata_ |
Size | bbdep_nrchi_nbins_ |
Real | bbdep_nrchi_binsize_ |
ObjexxFCL::FArray2D< Real > | bbind_non_rotameric_chi_scores_ |
Size | bbind_nrchi_nbins_ |
Real | bbind_nrchi_binsize_ |
Size | n_nrchi_sample_bins_ |
ObjexxFCL::FArray2D < BBIndNRChiSample<> > | bbind_rotamers_to_sample_ |
ObjexxFCL::FArray2D< Size > | bbind_rotamers_sorted_by_probability_ |
ObjexxFCL::FArray3D < BBDepNRChiSample<> > | bbdep_rotamers_to_sample_ |
ObjexxFCL::FArray4D< Size > | bbdep_rotsample_sorted_order_ |
Friends | |
class | SingleResidueDunbrackLibrary |
Additional Inherited Members | |
![]() | |
static void | n_rotamer_bins_for_aa (chemical::AA const aa, RotVector &rot) |
Hard coded specifics about the amino acids. More... | |
static void | n_rotameric_bins_for_aa (chemical::AA const aa, RotVector &rot, bool dun02) |
Reports information about the rotameric chi only; no details about the non rotameric chi. More... | |
static void | n_rotamer_bins_for_aa_02 (chemical::AA const aa, RotVector &rot) |
Hard coded rotamer well info for the 2002 library. More... | |
![]() | |
static Real const | NEUTRAL_PHI = -90 |
constants More... | |
static Real const | NEUTRAL_PSI = 130 |
A good "psi" value to use for C-term residues. More... | |
![]() | |
static Size const | N_PHIPSI_BINS = 36 |
static Real const | PHIPSI_BINRANGE = 10.0 |
This class is meant to represent the non-rotameric chi observed in several amino acids (asn, asp, gln, glu, his, phe, trp, tyr ) which are rotameric for the chi closest to the backbone and non rotameric for exactly one chi angle. This non-rotameric chi (abv. nrchi) is the last chi for each of these 8 amino acids except tyrosine, where this chi is the last heavy-atom chi. The last chi on tyrosine governs a hydroxyl. Unlike in the fully rotameric residues, the last heavyatom chi in semi-rotameric residues do not "communicate" to the rotameric chi. That is, in the rotameric chi, the mean chi1 value is sensitive to the chi3 value. If the third diherdal switches from trans to g+, then chi1 would shift in response. Changes to the non-rotameric chi do not effect the rotameric chi. The data structure here is good for this model but no other.
typedef SingleResidueDunbrackLibrary core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::grandparent |
typedef RotamericSingleResidueDunbrackLibrary< T > core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::parent |
core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::SemiRotamericSingleResidueDunbrackLibrary | ( | chemical::AA const | aa_in, |
bool const | backbone_independent_scoring, | ||
bool const | backbone_independent_rotamer_sampling | ||
) |
The constructor determines the path the library takes: whether it uses a backbone dependent or independent score function for the non-rotameric chi (the rotameric chi score function is always backbone dependent) and whether it uses a backbone dependent or independent rotamer sampling scheme. All four combinations are possible, though backbone independent scoring and backbone dependent rotamer sampling seems a poor combination.
|
virtual |
|
virtual |
Pick a rotamer for the input residue according to the rotamer probability distribution and assign chi angles to the input rsd. If perturb_from_rotamer_center is true, then push the rotamer off from the center; for chi angles with a normal distribution, the perturbation is taken from a Gaussian random number with a standard deviation matching the chi angle's standard deviation. For chi angles that are not normally distributed, the behavior is open to the derived classe's interpretation.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protected |
References numeric::random::RandomGenerator::gaussian(), core::pack::dunbrack::interpolate_rotamers(), core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_bin_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_mean_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_sd_, core::pack::dunbrack::BBDepNRChiSample< P >::packed_rotno_, core::pack::dunbrack::BBDepNRChiSample< P >::prob_, and numeric::random::RandomGenerator::uniform().
|
protected |
References core::sequence::left, right, and numeric::random::RandomGenerator::uniform().
|
private |
|
protected |
Trilinear interpolation. Derivatives discontinuous at edge planes. Correction: it seems that this was updated at some point to use tricubic interpolation. Note: This function has been updated to handle D-amino acids properly.
References core::conformation::Residue::aa(), core::conformation::Residue::chi(), core::pack::dunbrack::BBDepScoreInterpData::dsecox_, core::pack::dunbrack::BBDepScoreInterpData::dsecoxy_, core::pack::dunbrack::BBDepScoreInterpData::dsecoxyz_, core::pack::dunbrack::BBDepScoreInterpData::dsecoxz_, core::pack::dunbrack::BBDepScoreInterpData::dsecoy_, core::pack::dunbrack::BBDepScoreInterpData::dsecoyz_, core::pack::dunbrack::BBDepScoreInterpData::dsecoz_, core::chemical::is_canonical_D_aa(), core::pack::dunbrack::RotamerLibraryScratchSpace::rotwell(), core::pack::dunbrack::tricubic_interpolation(), and core::pack::dunbrack::BBDepScoreInterpData::value_.
|
private |
|
protected |
simple interpolation; derivatives discontinuous at grid points
References core::conformation::Residue::chi(), and core::pack::dunbrack::RotamerLibraryScratchSpace::rotwell().
|
virtual |
Returns the energy of the lowest-energy rotamer accessible to the given residue (based on e.g. its current phi and psi values). If curr_rotamer_only is true, then consider only the idealized version of the residue's current rotamer (local optimum); otherwise, consider all rotamers (global optimum).
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
References core::conformation::Residue::chi(), core::pack::dunbrack::RotamerLibrary::get_instance(), core::pack::dunbrack::RotamerLibrary::get_rsd_library(), core::conformation::Residue::nchi(), and core::conformation::Residue::type().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
private |
References core::conformation::Residue::seqpos().
|
private |
References core::conformation::Residue::seqpos().
|
protectedvirtual |
overrides parent class for the non-rotameric chi, but falls back on the parent class functionality for all other chi.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
|
private |
Clips to range [ nrchi_lower_angle_, nrchi_lower_angle_ + nrchi_periodicity ) Note: this isn't really "clipping" (i.e. values outside of this range are not set to the minimum or maximum of the range). Instead, it is properly returning the value within the range corresponding to a value outside of the range.
References basic::periodic_range().
|
virtual |
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protected |
References core::conformation::Residue::aa(), core::pack::dunbrack::interpolate_rotamers(), core::chemical::is_canonical_D_aa(), core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_bin_, core::pack::dunbrack::BBDepNRChiSample< P >::packed_rotno_, core::pack::dunbrack::BBDepNRChiSample< P >::prob_, and scratch.
|
protected |
|
virtual |
Return all of the rotamer sample data given a particular phi/psi. For N-terminus residues, hand in the phi value SingleResidueDunbrackLibrary::PHI_NEUTRAL and for C-terminus residues, hand in the psi value SingleResidueDunbrackLibrary::PSI_NEUTRAL. The returned samples should be in semi-decrasing order by probability; semi, because the rotamers are constructed in sorted order by their probability in the lower phi-psi bin that the input phi/psi perscribes.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protected |
References core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_mean(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_sd(), core::pack::dunbrack::interpolate_rotamers(), core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_bin_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_mean_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_sd_, core::pack::dunbrack::BBDepNRChiSample< P >::packed_rotno_, core::pack::dunbrack::BBDepNRChiSample< P >::prob_, core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), scratch, core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_mean(), core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_sd(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nchi(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_lower_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_probability(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_upper_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_prob(), and core::pack::dunbrack::DunbrackRotamerSampleData::set_rotwell().
|
protected |
References utility::arg_max(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_mean(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_sd(), core::pack::dunbrack::interpolate_rotamers(), core::pack::dunbrack::PackedDunbrackRotamer< S, P >::packed_rotno(), scratch, core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_mean(), core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_sd(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nchi(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_lower_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_probability(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_upper_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_prob(), and core::pack::dunbrack::DunbrackRotamerSampleData::set_rotwell().
|
private |
|
private |
|
virtual |
Return the probability for a particular rotamer where rotamers are indexed in order of decreasing probability (or something very close to decreasing probability).
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protected |
Lookup for bbind is significantly slower than for bbdep
References utility::arg_max(), basic::interpolate_bilinear_by_value(), core::pack::dunbrack::PackedDunbrackRotamer< S, P >::packed_rotno(), and core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability().
|
virtual |
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protected |
References core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_mean(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_sd(), core::pack::dunbrack::interpolate_rotamers(), core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_bin_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_mean_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_sd_, core::pack::dunbrack::BBDepNRChiSample< P >::packed_rotno_, core::pack::dunbrack::BBDepNRChiSample< P >::prob_, core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), scratch, core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_mean(), core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_sd(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nchi(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_lower_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_probability(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_upper_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_prob(), and core::pack::dunbrack::DunbrackRotamerSampleData::set_rotwell().
|
protected |
References utility::arg_max(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_mean(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_sd(), basic::interpolate_bilinear_by_value(), core::pack::dunbrack::interpolate_rotamers(), core::pack::dunbrack::PackedDunbrackRotamer< S, P >::packed_rotno(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), scratch, core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_mean(), core::pack::dunbrack::DunbrackRotamerSampleData::set_chi_sd(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nchi(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_lower_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_probability(), core::pack::dunbrack::DunbrackRotamerSampleData::set_nrchi_upper_boundary(), core::pack::dunbrack::DunbrackRotamerSampleData::set_prob(), and core::pack::dunbrack::DunbrackRotamerSampleData::set_rotwell().
|
virtual |
Convert a vector of chi angles (degrees) into a integer vector of rotamer wells. Derived class should be consistent, but may be arbitrary in how wells divide angle space.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
References core::sequence::left, right, and utility_exit.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
private |
|
private |
References basic::interpolate_bilinear_by_value(), core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_bin_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_mean_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_sd_, core::pack::dunbrack::BBDepNRChiSample< P >::packed_rotno_, and core::pack::dunbrack::BBDepNRChiSample< P >::prob_.
|
protectedvirtual |
Measures the amount of dynamically allocated data in this class. Must recurse to parent to count parent's dynamically allocated data.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protectedvirtual |
Worker functions.
called only if the library is actually an RSRDL<T> object. Derived classes should not call this function or recurse. Accounts for the statically allocated data that's part of this class.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
virtual |
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
virtual |
The number of chi represented by the library.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
private |
References e_Periodic, numeric::interpolation::spline::TricubicSpline::get_dsecox(), numeric::interpolation::spline::TricubicSpline::get_dsecoxy(), numeric::interpolation::spline::TricubicSpline::get_dsecoxyz(), numeric::interpolation::spline::TricubicSpline::get_dsecoxz(), numeric::interpolation::spline::TricubicSpline::get_dsecoy(), numeric::interpolation::spline::TricubicSpline::get_dsecoyz(), numeric::interpolation::spline::TricubicSpline::get_dsecoz(), utility::io::izstream::getline(), utility::io::izstream::peek(), start, and numeric::interpolation::spline::TricubicSpline::train().
|
private |
References utility::io::izstream::getline(), and utility::io::izstream::peek().
|
virtual |
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
References utility::io::izstream::read(), and utility_exit.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
void core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::read_from_files | ( | utility::io::izstream & | in_rotdef, |
utility::io::izstream & | in_rotameric, | ||
utility::io::izstream & | in_continmin_bbdep, | ||
utility::io::izstream & | in_continmin_bbind | ||
) |
Initialize either a backbone-independent or a backbone-dependent SRSRDL from the set of four files which describe both (not all files are read).
Referenced by core::pack::dunbrack::RotamerLibrary::initialize_and_read_srsrdl().
void core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::read_from_files | ( | utility::io::izstream & | in_rotdef, |
utility::io::izstream & | in_rotameric, | ||
utility::io::izstream & | in_continmin_bbdep | ||
) |
Initialize a backbone-dependent SRSRDL from the set of three files which describe it.
read-from-files that does not require the in_continmin_bbind file
|
private |
the rotamer definition file must be the first file read. Reading this file gives the number of pseudorotamers used for both the bbdep and bbind rotamer building. The bbind rotamer data is saved iff the bbind_rotamer_building_ flag is true.
References utility::io::izstream::getline(), core::sequence::left, median(), utility::io::izstream::peek(), core::pack::dunbrack::psc_compare(), right, core::io::serialization::size(), and utility_exit.
|
private |
The rotamer definition file has already been read before this function is called, so all of the rotameric rotamer wells have been encountered and the packed_rotno enumeration may be used instead of the regular rotno.
References core::pack::dunbrack::DUNBRACK_MAX_SCTOR, utility::io::izstream::getline(), mean, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_bin_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_mean_, core::pack::dunbrack::BBDepNRChiSample< P >::nrchi_sd_, core::pack::dunbrack::BBDepNRChiSample< P >::packed_rotno_, utility::io::izstream::peek(), basic::periodic_range(), core::pack::dunbrack::BBDepNRChiSample< P >::prob_, and utility_exit.
|
virtual |
Virtual functions required by the base classes.
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
virtual |
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protected |
References core::conformation::Residue::aa(), core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PHI_INDEX, core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PSI_INDEX, core::pack::dunbrack::RotamerLibraryScratchSpace::chidevpen(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchidevpen_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchidevpen_dchi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dbb_dev(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dbb_rot(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dbb_semi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dchi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dchi_dev(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dchi_semi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dentropy_dbb(), basic::options::OptionKeys::corrections::score::dun_entropy_correction, core::pack::dunbrack::DUNBRACK_MAX_BBTOR, core::pack::dunbrack::RotamerLibraryScratchSpace::entropy(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_rot(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_semi(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_tot(), core::chemical::is_canonical_D_aa(), core::conformation::Residue::name(), basic::options::option, and core::conformation::Residue::seqpos().
|
protected |
References core::pack::dunbrack::RotamerLibraryScratchSpace::dchidevpen_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchidevpen_dchi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dbb_dev(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dbb_rot(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dchi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dchi_dev(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dchi_semi(), core::pack::dunbrack::RotamerLibraryScratchSpace::drotprob_dbb(), core::pack::dunbrack::DUNBRACK_MAX_BBTOR, core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_semi(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_tot(), and core::pack::dunbrack::RotamerLibraryScratchSpace::rotprob().
void core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::set_nonrotameric_chi_bbdep_scoring_step_size | ( | Real | step_size_in_degrees | ) |
What is the angular step size of the bbdep score?
Referenced by core::pack::dunbrack::RotamerLibrary::initialize_srsrdl().
void core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::set_nonrotameric_chi_bbind_scoring_step_size | ( | Real | step_size_in_degrees | ) |
What is the angular step size of the bbind score?
Referenced by core::pack::dunbrack::RotamerLibrary::initialize_srsrdl().
void core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::set_nonrotameric_chi_start_angle | ( | Real | angle_in_degrees | ) |
What angle do the interpolation data start from?
Referenced by core::pack::dunbrack::RotamerLibrary::initialize_srsrdl().
void core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >::set_nrchi_periodicity | ( | Real | angle_in_degrees | ) |
Initialization functions that must be called before reading the input libraries.
For the non rotameric chi, how many asymmetric degrees are there? (e.g. 360 for asn, 180 for asp)
Referenced by core::pack::dunbrack::RotamerLibrary::initialize_srsrdl().
|
virtual |
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
References utility::io::ozstream::write().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
virtual |
Reimplemented from core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >.
References utility_exit_with_message.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
friend |
|
private |
The non rotameric chi is n_rotameric_chi + 1; The FArray3D is indexed as (phi, psi, nrchi). Probabilities are input; the parameters for tricubic interpolation are stored. The supporting information is used to snap chi values stored in a residue to a meaningful periodic range and to make tricubic interpolation possible. This data is used only if bbind_nrchi_scoring is false.
|
private |
|
private |
|
private |
This variable is used iff bbind_nrchi_sampling_ is false; Space is not allocated if it is true.
|
private |
|
private |
If bbind_nrchi_scoring_ is true, then this array holds the continuous minimization data for each of the packed rotamers.
|
private |
|
private |
|
private |
|
private |
no default ctor SemiRotamericSingleResidueDunbrackLibrary();
|
private |
|
private |
This variable is used iff bbind_nrchi_sampling_ is true; Space is not allocated if it is false. The algorithm for creating the top 95% most probable rotamers relies on a sorted order for these rotamers, which is why we need bbind_rotamers_sorted_by_probability_.
|
private |
For rotamer sampling, "pseudo rotamers" are defined for the non rotameric chi. These rotamers are arbitrary bins in chi space, and each bin gives a left and right edge as well as a median (mode?) angle which is used for rotamer sampling iff bbind_nrchi_sampling_ is true. The bins do not have a uniform width.
|
private |
|
private |