![]() |
Rosetta Core
2014.35
|
DOUG DOUG DOUG. More...
#include <RotamericSingleResidueDunbrackLibrary.hh>
Public Types | |
typedef SingleResidueDunbrackLibrary | parent |
![]() | |
typedef chemical::AA | AA |
Public Member Functions | |
RotamericSingleResidueDunbrackLibrary (AA const aa_in, bool dun02) | |
virtual | ~RotamericSingleResidueDunbrackLibrary () |
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 |
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... | |
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 | |
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 () |
virtual Size | memory_usage_static () const |
Worker functions. More... | |
virtual Size | memory_usage_dynamic () const |
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... | |
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 |
Used in tandem with enumerate_chi_sets, this function pushes back chi sample data into the four input vectors: the 1. chi value sample,. 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... | |
Static Protected Attributes | |
static Size const | N_PHIPSI_BINS = 36 |
static Real const | PHIPSI_BINRANGE = 10.0 |
Private Member Functions | |
void | build_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, RotamerVector &rotamers, PackedDunbrackRotamer< T, Real > const &interpolated_rotamer) const |
After an interpolated rotamer has been created, this method appends new rotamers to the vector of rotamers, taking extra samples at designated chi intervals if instructed to do so in the extra_chi_steps argument. More... | |
void | verify_phipsi_bins (Real phi, Real psi, Size const phibin, Size const psibin, Size const phibin_next, Size const psibin_next) const |
Private Attributes | |
ObjexxFCL::FArray3D < PackedDunbrackRotamer< T > > | rotamers_ |
ObjexxFCL::FArray3D< Size > | packed_rotno_2_sorted_rotno_ |
ObjexxFCL::FArray2D< Real > | ShanonEntropy_ |
ObjexxFCL::FArray2D< Real > | S_dsecophi_ |
ObjexxFCL::FArray2D< Real > | S_dsecopsi_ |
ObjexxFCL::FArray2D< Real > | S_dsecophipsi_ |
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... | |
DOUG DOUG DOUG.
typedef SingleResidueDunbrackLibrary core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::parent |
core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::RotamericSingleResidueDunbrackLibrary | ( | AA const | aa_in, |
bool | dun02 | ||
) |
No default ctor RotamericSingleResidueDunbrackLibrary();
|
virtual |
|
protected |
|
protected |
Assigns random chi angles and returns the packed_rotno for the chosen random rotamer.
References core::pack::dunbrack::interpolate_rotamers(), core::pack::dunbrack::PackedDunbrackRotamer< S, P >::packed_rotno(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), and numeric::random::RandomGenerator::uniform().
|
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.
Implements core::pack::dunbrack::SingleResidueRotamerLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
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).
Implements core::pack::dunbrack::SingleResidueRotamerLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References core::conformation::Residue::chi(), core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::get_rotamer_from_chi_static(), core::pack::dunbrack::interpolate_rotamers(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), and core::pack::dunbrack::RotamerLibraryScratchSpace::rotwell().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
private |
After an interpolated rotamer has been created, this method appends new rotamers to the vector of rotamers, taking extra samples at designated chi intervals if instructed to do so in the extra_chi_steps argument.
Load interpolated rotamer data into a RotamericData object on the stack so that it can be handed into the enumerate_chi_sets method, which itself relies on the "template method" chisamples_for_rotamer_and_chi. Enumerate the chi samples, and build rotamers from these chi samples.
"template method" is a design pattern where a base class calls a polymorphic method that can be overloaded by a derived class, usually in the middle of a function that does a lot of work. See "Design Patterns," Gamma et al.
References core::conformation::Residue::seqpos().
|
protectedvirtual |
Used in tandem with enumerate_chi_sets, this function pushes back chi sample data into the four input vectors: the 1. chi value sample,.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References core::chemical::ResidueType::atom(), core::chemical::ResidueType::chi_2_proton_chi(), core::chemical::ResidueType::chi_atoms(), core::chemical::ResidueType::chi_rotamers(), numeric::dihedral(), core::pack::task::ResidueLevelTask::extrachi_sample_level(), core::chemical::ResidueType::is_proton_chi(), core::pack::task::NO_EXTRA_CHI_SAMPLES, core::chemical::ResidueType::proton_chi_extra_samples(), core::chemical::ResidueType::proton_chi_samples(), and core::pack::dunbrack::RotamericData< T >::rotamer().
|
protected |
References core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PHI_INDEX, core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PSI_INDEX, 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::conformation::Residue::is_lower_terminus(), and core::conformation::Residue::is_upper_terminus().
|
protected |
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.
once a list of chi samples has been enumerated, this function instantiates Residue objectes and give them the correct geometry.
References core::pose::Pose::conformation(), core::conformation::ResidueFactory::create_residue(), core::pack::task::ResidueLevelTask::preserve_c_beta(), core::pack::task::PackerTask::residue_task(), core::pack::task::ResidueLevelTask::rotamer_operations(), core::conformation::Residue::seqpos(), and core::conformation::Residue::set_chi().
|
protected |
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.
References utility::LexicographicalIterator::at_end(), core::chemical::ResidueType::nchi(), core::pack::task::PackerTask::residue_task(), core::pack::dunbrack::RotamericData< T >::rotamer(), runtime_assert, and core::io::serialization::size().
|
protected |
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.
References core::conformation::Residue::aa(), core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PHI_INDEX, core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PSI_INDEX, core::chemical::ResidueType::backbone_aa(), core::conformation::Residue::chi(), core::pack::dunbrack::RotamerLibraryScratchSpace::chidev(), core::pack::dunbrack::RotamerLibraryScratchSpace::chidevpen(), core::pack::dunbrack::RotamerLibraryScratchSpace::chimean(), core::pack::dunbrack::RotamerLibraryScratchSpace::chisd(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchidevpen_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchidevpen_dchi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchimean_dphi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchimean_dpsi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchisd_dphi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchisd_dpsi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dphi_dev(), core::pack::dunbrack::RotamerLibraryScratchSpace::dE_dpsi_dev(), core::pack::dunbrack::RotamerLibraryScratchSpace::dneglnrotprob_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::drotprob_dbb(), basic::options::OptionKeys::corrections::score::dun_entropy_correction, basic::options::OptionKeys::corrections::score::dun_normsd, core::pack::dunbrack::RotamerLibraryScratchSpace::entropy(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_dev(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_rot(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_semi(), core::pack::dunbrack::RotamerLibraryScratchSpace::fa_dun_tot(), core::chemical::get_L_equivalent(), core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::get_rotamer_from_chi_static(), core::pack::dunbrack::interpolate_rotamers(), core::chemical::is_canonical_D_aa(), core::pack::dunbrack::RotamerLibraryScratchSpace::negln_rotprob(), basic::options::option, basic::periodic_range(), core::pack::dunbrack::RotamerLibraryScratchSpace::rotprob(), core::pack::dunbrack::RotamerLibraryScratchSpace::rotwell(), score, core::pack::dunbrack::subtract_chi_angles(), core::conformation::Residue::type(), and basic::options::OptionKeys::corrections::score::use_bicubic_interpolation.
|
virtual |
Implements core::pack::dunbrack::SingleResidueRotamerLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References core::conformation::Residue::aa(), core::pack::dunbrack::interpolate_rotamers(), core::chemical::is_canonical_D_aa(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), and scratch.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
Size core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::find_another_representative_for_unlikely_rotamer | ( | conformation::Residue const & | rsd, |
Size4 & | rotwell | ||
) | const |
The new rotamer library represents only 75 of 81 possible arginine rotamers, and 75 of 81 lysine rotamers. In the unlikely event that a rotamer is encountered that's not represented in the library, find another rotamer to represent it. Ideally, this stand-in rotamer would be closest to the input rotamer in physical geometry. (sidechain atom rms, e.g.) The following code instead first looks through all possible rotamers with a Hamming distance of one from input rotamer trying to find one that works, looking first for rotamers from the furthest chi toward the closest chi. If no such rotamer may be found, it gives up and returns the most-probable rotamer for a phi-psi bin.
This function modifies the "rotwell" assigned to this rotamer so that later code that relies on the consistency of the rotwell and packed_rotno information will behave correctly.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
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.
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
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::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_prob(), and core::pack::dunbrack::DunbrackRotamerSampleData::set_rotwell().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protectedvirtual |
Handle lower-term residues by returning a "neutral" phi value
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
References core::conformation::Residue::aa(), core::chemical::is_canonical_D_aa(), core::conformation::Residue::is_lower_terminus(), core::conformation::Residue::is_peptoid(), core::conformation::Residue::is_protein(), and core::conformation::Residue::mainchain_torsion().
|
protected |
The Dunbrack library's phi/psi data for a grid point (x,y) collects data in the neighborhood of (x,y). As an interpolation point p moves toward a grid point (x,y), the (x,y) share in the interpolated value goes to 1. This is distinct from having interpolation wells where an interpolation in the center of a well produces the maximum contribution from that well. Most of the basic::interpolation code is designed for the second interpretation of interpolation, and so CTSA's Dunbrack library code did funky thinks like shift by 5 degrees so that the basic::interpolation code could shift it back by 5 degrees again. The code below makes no such shift.
The alpha fraction is the distance along each axis that the interpolation point has progressed from the lower grid point toward the upper grid point; it ranges from 0 to 1.
References basic::periodic_range().
|
protected |
|
virtual |
Return the probability for a particular rotamer where rotamers are indexed in order of decreasing probability (or something very close to decreasing probability).
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References basic::interpolate_bilinear_by_value(), core::pack::dunbrack::PackedDunbrackRotamer< S, P >::packed_rotno(), and core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protectedvirtual |
Handle upper-term residues by returning a "neutral" psi value
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
References core::conformation::Residue::aa(), core::chemical::is_canonical_D_aa(), core::conformation::Residue::is_peptoid(), core::conformation::Residue::is_protein(), core::conformation::Residue::is_upper_terminus(), and core::conformation::Residue::mainchain_torsion().
|
virtual |
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
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::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_prob(), and core::pack::dunbrack::DunbrackRotamerSampleData::set_rotwell().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
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.
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
protected |
When given a statically sized fixedsizearray, use this method.
Referenced by core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::best_rotamer_energy(), and core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::eval_rotameric_energy_deriv().
|
protected |
When given a statically sized fixedsizearray, use this method.
References aa2, core::chemical::get_L_equivalent(), core::chemical::is_canonical_D_aa(), basic::periodic_range(), core::pack::dunbrack::rotamer_from_chi_02(), and utility::fixedsizearray1< T, S >::size().
|
protected |
References e_Periodic, core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE_dsecophi(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE_dsecophipsi(), and core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE_dsecopsi().
void core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::interpolate_rotamers | ( | conformation::Residue const & | rsd, |
RotamerLibraryScratchSpace & | scratch, | ||
Size const | packed_rotno, | ||
PackedDunbrackRotamer< T, Real > & | interpolated_rotamer | ||
) | const |
|
protected |
References core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PHI_INDEX, core::pack::dunbrack::RotamerLibraryScratchSpace::AA_PSI_INDEX, core::pack::dunbrack::bicubic_interpolation(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_mean(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::chi_sd(), core::pack::dunbrack::RotamerLibraryScratchSpace::chimean(), core::pack::dunbrack::RotamerLibraryScratchSpace::chisd(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchimean_dphi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchimean_dpsi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchisd_dphi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dchisd_dpsi(), core::pack::dunbrack::RotamerLibraryScratchSpace::dentropy_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::dneglnrotprob_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::drotprob_dbb(), basic::options::OptionKeys::corrections::score::dun_entropy_correction, core::pack::dunbrack::RotamerLibraryScratchSpace::entropy(), basic::interpolate_bilinear_by_value(), interpolate_bilinear_by_value(), core::pack::dunbrack::RotamerLibraryScratchSpace::negln_rotprob(), basic::options::option, core::pack::dunbrack::PackedDunbrackRotamer< S, P >::packed_rotno(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE_dsecophi(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE_dsecophipsi(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotE_dsecopsi(), core::pack::dunbrack::RotamerLibraryScratchSpace::rotprob(), and basic::options::OptionKeys::corrections::score::use_bicubic_interpolation.
|
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::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< 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.
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
virtual |
|
virtual |
The number of chi represented by the library.
Implements core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< 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::PackedDunbrackRotamer< S, P >::packed_rotno(), core::pack::dunbrack::DunbrackRotamerMeanSD< S, P >::rotamer_probability(), and core::pack::dunbrack::DunbrackRotamer< S, P >::rotwell().
|
inlineprotected |
|
inlineprotected |
|
virtual |
Reimplemented from core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References basic::options::OptionKeys::corrections::score::dun_entropy_correction, basic::options::option, and utility::io::izstream::read().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
std::string core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::read_from_file | ( | utility::io::izstream & | infile, |
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.
Returns the three letter string of the next amino acid specified in the input library.
References basic::options::OptionKeys::corrections::score::dun_entropy_correction, core::pack::dunbrack::DUNBRACK_MAX_SCTOR, utility::io::izstream::getline(), core::chemical::name_from_aa(), basic::options::option, utility::io::izstream::peek(), and utility_exit.
Referenced by core::pack::dunbrack::RotamerLibrary::create_rotameric_dunlib(), and core::pack::dunbrack::RotamerLibrary::get_NCAA_rotamer_library().
|
virtual |
Virtual functions required by the base classes.
Implements core::pack::dunbrack::SingleResidueRotamerLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
virtual |
Implements core::pack::dunbrack::SingleResidueRotamerLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References core::conformation::Residue::aa(), 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::dentropy_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::dneglnrotprob_dbb(), core::pack::dunbrack::RotamerLibraryScratchSpace::drotprob_dbb(), basic::options::OptionKeys::corrections::score::dun_entropy_correction, core::pack::dunbrack::DUNBRACK_MAX_BBTOR, core::chemical::is_canonical_D_aa(), core::conformation::Residue::mainchain_torsions(), core::conformation::Residue::name(), basic::options::option, core::pack::dunbrack::RotamerLibraryScratchSpace::rotprob(), score, core::conformation::Residue::seqpos(), and basic::options::OptionKeys::corrections::score::use_bicubic_interpolation.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
inlineprotected |
Read and write access for derived classes.
References core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::rotamers_.
|
inlineprotected |
|
protected |
|
protected |
|
private |
References utility_exit.
|
virtual |
Reimplemented from core::pack::dunbrack::SingleResidueDunbrackLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References utility::io::ozstream::write().
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
virtual |
Implements core::pack::dunbrack::SingleResidueRotamerLibrary.
Reimplemented in core::pack::dunbrack::SemiRotamericSingleResidueDunbrackLibrary< T >.
References utility_exit_with_message.
Referenced by core::pack::dunbrack::SingleResidueDunbrackLibrary::hokey_template_workaround().
|
friend |
|
staticprotected |
|
private |
Quick lookup that lists the sorted position for the packed rotamer number given a phi/psi. Indexed by (phi, psi, packed_rotno ).
Referenced by core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::packed_rotno_2_sorted_rotno().
|
staticprotected |
|
private |
The (chi_mean, chi_sd, packed_rotno, and prob) data for the chi dihedrals The FArray3D is indexed into by (phi, psi, sorted_index ), where sorted index simply means the order for a particular packed_rotno in the list of rotamers sorted by probability.
Referenced by core::pack::dunbrack::RotamericSingleResidueDunbrackLibrary< T >::rotamers().
|
private |
|
private |
|
private |
|
private |