Rosetta Core  2014.35
Public Types | Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T > Class Template Reference

#include <RotamericSingleResiduePeptoidLibrary.hh>

Public Types

typedef SingleResiduePeptoidLibrary parent
 
- Public Types inherited from core::pack::dunbrack::SingleResiduePeptoidLibrary
typedef chemical::AA AA
 

Public Member Functions

 RotamericSingleResiduePeptoidLibrary ()
 
virtual ~RotamericSingleResiduePeptoidLibrary ()
 
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 omg, 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 SingleResiduePeptoidLibrary::PHI_NEUTRAL and for C-terminus residues, hand in the psi value SingleResiduePeptoidLibrary::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 omg, Real phi, Real psi, Size rot_ind) const
 DOUG DOUG DOUG The interface of this function has beeen changed but the definition needs more work specifically the interpolation. More...
 
virtual DunbrackRotamerSampleData get_rotamer (Real omg, 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
 The number of rotamer bins represented by the library. More...
 
virtual void write_to_file (utility::io::ozstream &out) const
 
virtual void write_to_binary (utility::io::ozstream &out) const
 DOUG DOUG DOUG This function needs more updating to use omega. More...
 
virtual void read_from_binary (utility::io::izstream &in)
 DOUG DOUG DOUG This function needs more updating to use omega. More...
 
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 read_from_file (utility::io::izstream &in)
 Read the rot lib from the input stream. More...
 
void get_omgphipsi_bins (Real omg, Real phi, Real psi, Size &omgbin, Size &phibin, Size &psibin, Size &omgbin_next, Size &phibin_next, Size &psibin_next, Real &omg_alpha, Real &phi_alpha, Real &psi_alpha) const
 DOUG DOUG DOUG Make public just for now. More...
 
void get_omgphipsi_bins (Real omg, Real phi, Real psi, Size &omgbin, Size &phibin, Size &psibin) const
 
- Public Member Functions inherited from core::pack::dunbrack::SingleResiduePeptoidLibrary
 SingleResiduePeptoidLibrary (Size const n_rotameric_chi)
 c-tor More...
 
virtual ~SingleResiduePeptoidLibrary ()
 
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 Dun08 library. 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)
 
- Public Member Functions inherited from core::pack::dunbrack::SingleResidueRotamerLibrary
virtual ~SingleResidueRotamerLibrary ()
 

Protected Member Functions

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::FArray4D
< PackedDunbrackRotamer< T >
> const & 
rotamers (Real omg_angle) const
 Read and write access for derived classes. More...
 
ObjexxFCL::FArray4D
< PackedDunbrackRotamer< T > > & 
rotamers (Real omg_angle)
 
ObjexxFCL::FArray4D< Size > const & packed_rotno_2_sorted_rotno (Real omg_angle) const
 
ObjexxFCL::FArray4D< Size > & packed_rotno_2_sorted_rotno (Real omg_angle)
 
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...
 
Size find_another_representative_for_unlikely_rotamer (conformation::Residue const &rsd, Size4 &rotwell) const
 
void interpolate_rotamers (conformation::Residue const &rsd, pose::Pose const &pose, RotamerLibraryScratchSpace &scratch, Size const packed_rotno, PackedDunbrackRotamer< T, Real > &interpolated_rotamer) const
 
void interpolate_rotamers (typename ObjexxFCL::FArray4D< PackedDunbrackRotamer< T > > const &rotamers, ObjexxFCL::FArray4D< Size > const &packed_rotno_2_sorted_rotno, RotamerLibraryScratchSpace &scratch, Size const packed_rotno, Size const omgbin, Size const phibin, Size const psibin, Size const omgbin_next, Size const phibin_next, Size const psibin_next, Real const omg_alpha, Real const phi_alpha, Real const psi_alpha, PackedDunbrackRotamer< T, Real > &interpolated_rotamer) const
 
void assign_random_rotamer (conformation::Residue const &rsd, pose::Pose const &pose, 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
 DOUG DOUG DOUG this function will need to be modified. More...
 
Real get_omg_from_rsd (conformation::Residue const &rsd, pose::Pose const &pose) const
 DOUG DOUG DOUG. More...
 
Real get_phi_from_rsd (conformation::Residue const &rsd, pose::Pose const &pose) const
 
Real get_psi_from_rsd (conformation::Residue const &rsd, pose::Pose const &pose) 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...
 
bool is_trans_omg (Real omg_angle) const
 returns if the omega angle is in the range defined by the cis omega part of the rotlib More...
 
bool is_cis_omg (Real omg_angle) const
 returns true if the omega angle is in the range defined by the trans omega part of the rotlib More...
 
- Protected Member Functions inherited from core::pack::dunbrack::SingleResiduePeptoidLibrary
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_OMG_BINS = 7
 DOUG DOUG DOUG This use to be N_PHIPSI_BINS and PHIPSI_BINRANGE. More...
 
static Size const N_PHI_BINS = 36
 
static Size const N_PSI_BINS = 36
 
static Real const OMG_BINRANGE = 10.0
 DOUG DOUG DOUG This use to be PHIPSI_BINRANGE. More...
 
static Real const PHI_BINRANGE = 10.0
 
static Real const PSI_BINRANGE = 10.0
 
static Real const CIS_OMG_LOWER_RANGE = -30.0
 
static Real const CIS_OMG_UPPER_RANGE = 30.0
 
static Real const TRANS_OMG_LOWER_RANGE = 150.0
 
static Real const TRANS_OMG_UPPER_RANGE = -150.0
 
static Real const CIS_UPPER_TRANS_LOWER_SPLIT = 90.0
 
static Real const TRANS_UPPER_CIS_LOWER_SPLIT = -90.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_omgphipsi_bins (Real omg, Real phi, Real psi, Size const omgbin, Size const phibin, Size const psibin, Size const omgbin_next, Size const phibin_next, Size const psibin_next) const
 

Private Attributes

ObjexxFCL::FArray4D
< PackedDunbrackRotamer< T > > 
trans_rotamers_
 
ObjexxFCL::FArray4D
< PackedDunbrackRotamer< T > > 
cis_rotamers_
 
ObjexxFCL::FArray4D< Sizetrans_packed_rotno_2_sorted_rotno_
 
ObjexxFCL::FArray4D< Sizecis_packed_rotno_2_sorted_rotno_
 

Friends

class SingleResiduePeptoidLibrary
 

Additional Inherited Members

- Static Public Member Functions inherited from core::pack::dunbrack::SingleResiduePeptoidLibrary
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 Public Attributes inherited from core::pack::dunbrack::SingleResiduePeptoidLibrary
static Real const NEUTRAL_OMG = 180
 constants More...
 
static Real const NEUTRAL_PHI = -90
 A good "phi" value to use for N-term residues. More...
 
static Real const NEUTRAL_PSI = 180
 A good "psi" value to use for C-term residues. More...
 
static Size const RSD_PHI_INDEX = 1
 
static Size const RSD_PSI_INDEX = 2
 
static Size const RSD_OMG_INDEX = 3
 

Member Typedef Documentation

Constructor & Destructor Documentation

Member Function Documentation

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::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
protected
template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::assign_random_rotamer ( conformation::Residue const &  rsd,
pose::Pose const &  pose,
RotamerLibraryScratchSpace scratch,
numeric::random::RandomGenerator RG,
ChiVector new_chi_angles,
bool  perturb_from_rotamer_center,
Size packed_rotno 
) const
protected

Assigns random chi angles and returns the packed_rotno for the chosen random rotamer.

DOUG DOUG DOUG this function will need to be modified.

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().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::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
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.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::best_rotamer_energy ( conformation::Residue const &  rsd,
bool  curr_rotamer_only,
RotamerLibraryScratchSpace scratch 
) const
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).

Returns the energy of the lowest-energy rotamer accessible to the given residue (based on e.g. its current omega, 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.

References utility_exit_with_message.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::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
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().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::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
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,.

  1. the rotamer well #, 3. a discription of the kind of sample (how far off the ideal rotamer) and 4. the probability of observing this chi at that sample. The rotamer_data that's input is the same data that was handed to the enumerate_chi_sets call (may be downcast as needed).

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().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::correct_termini_derivatives ( conformation::Residue const &  rsd,
RotamerLibraryScratchSpace scratch 
) const
protected
template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::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
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().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::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
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().

template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::eval_rotameric_energy_deriv ( conformation::Residue const &  rsd,
RotamerLibraryScratchSpace scratch,
bool  eval_deriv 
) const
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.

DOUG DOUG DOUG this function will need to be modified.

References utility_exit_with_message.

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::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
template<Size T>
Size core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::find_another_representative_for_unlikely_rotamer ( conformation::Residue const &  rsd,
Size4 rotwell 
) const
protected

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.

template<Size T>
utility::vector1< DunbrackRotamerSampleData > core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_all_rotamer_samples ( Real  omg,
Real  phi,
Real  psi 
) const
virtual

Return all of the rotamer sample data given a particular phi/psi. For N-terminus residues, hand in the phi value SingleResiduePeptoidLibrary::PHI_NEUTRAL and for C-terminus residues, hand in the psi value SingleResiduePeptoidLibrary::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.

DOUG DOUG DOUG The definitions of these need to change (and have been changed)

Implements core::pack::dunbrack::SingleResiduePeptoidLibrary.

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::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_omg_from_rsd ( conformation::Residue const &  rsd,
pose::Pose const &  pose 
) const
protectedvirtual
template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_omgphipsi_bins ( Real  omg,
Real  phi,
Real  psi,
Size omgbin,
Size phibin,
Size psibin,
Size omgbin_next,
Size phibin_next,
Size psibin_next,
Real omg_alpha,
Real phi_alpha,
Real psi_alpha 
) const

DOUG DOUG DOUG Make public just for now.

DOUG DOUG DOUG Update this comment

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 numeric::nonnegative_principal_angle_degrees(), basic::periodic_range(), and numeric::principal_angle_degrees().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_omgphipsi_bins ( Real  omg,
Real  phi,
Real  psi,
Size omgbin,
Size phibin,
Size psibin 
) const
template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_phi_from_rsd ( conformation::Residue const &  rsd,
pose::Pose const &  pose 
) const
protectedvirtual
template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_probability_for_rotamer ( Real  omg,
Real  phi,
Real  psi,
Size  rot_ind 
) const
virtual
template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_psi_from_rsd ( conformation::Residue const &  rsd,
pose::Pose const &  pose 
) const
protectedvirtual
template<Size T>
DunbrackRotamerSampleData core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_rotamer ( Real  omg,
Real  phi,
Real  psi,
Size  rot_ind 
) const
virtual
template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_rotamer_from_chi ( ChiVector const &  chi,
RotVector rot 
) const
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::SingleResiduePeptoidLibrary.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_rotamer_from_chi_static ( ChiVector const &  chi,
Size4 rot 
) const
protected

When given a statically sized fixedsizearray, use this method.

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::get_rotamer_from_chi_static ( Real4 const &  chi,
Size4 rot 
) const
protected

When given a statically sized fixedsizearray, use this method.

References basic::periodic_range(), core::pack::dunbrack::rotamer_from_chi_02(), and utility::fixedsizearray1< T, S >::size().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::interpolate_rotamers ( conformation::Residue const &  rsd,
pose::Pose const &  pose,
RotamerLibraryScratchSpace scratch,
Size const  packed_rotno,
PackedDunbrackRotamer< T, Real > &  interpolated_rotamer 
) const
protected
template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::interpolate_rotamers ( typename ObjexxFCL::FArray4D< PackedDunbrackRotamer< T > > const &  rotamers,
ObjexxFCL::FArray4D< Size > const &  packed_rotno_2_sorted_rotno,
RotamerLibraryScratchSpace scratch,
Size const  packed_rotno,
Size const  omgbin,
Size const  phibin,
Size const  psibin,
Size const  omgbin_next,
Size const  phibin_next,
Size const  psibin_next,
Real const  omg_alpha,
Real const  phi_alpha,
Real const  psi_alpha,
PackedDunbrackRotamer< T, Real > &  interpolated_rotamer 
) const
protected
template<Size T>
bool core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::is_cis_omg ( Real  omg_angle) const
inlineprotected

returns true if the omega angle is in the range defined by the trans omega part of the rotlib

References angle, and numeric::nonnegative_principal_angle_degrees().

template<Size T>
bool core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::is_trans_omg ( Real  omg_angle) const
inlineprotected

returns if the omega angle is in the range defined by the cis omega part of the rotlib

References angle, and numeric::nonnegative_principal_angle_degrees().

template<Size T>
Size core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::memory_usage_dynamic ( ) const
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::SingleResiduePeptoidLibrary.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
Size core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::memory_usage_static ( ) const
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::SingleResiduePeptoidLibrary.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
Size core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::n_rotamer_bins ( ) const
virtual

The number of rotamer bins represented by the library.

Implements core::pack::dunbrack::SingleResiduePeptoidLibrary.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
Size core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::nchi ( ) const
virtual
template<Size T>
template<class P >
DunbrackRotamer< T, P > core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::packed_rotamer_2_regular_rotamer ( PackedDunbrackRotamer< T, P > const &  packedrot) const
protected
template<Size T>
ObjexxFCL::FArray4D< Size > const & core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::packed_rotno_2_sorted_rotno ( Real  omg_angle) const
protected
template<Size T>
ObjexxFCL::FArray4D< Size > & core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::packed_rotno_2_sorted_rotno ( Real  omg_angle)
protected
template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::read_from_binary ( utility::io::izstream in)
virtual

DOUG DOUG DOUG This function needs more updating to use omega.

Reimplemented from core::pack::dunbrack::SingleResiduePeptoidLibrary.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::read_from_file ( utility::io::izstream infile)

Read the rot lib from the input stream.

DOUG DOUG DOUG WORKING ON THIS FUNCTION

Returns the three letter string of the next amino acid specified in the input library.

References core::pack::dunbrack::DUNBRACK_MAX_SCTOR, getline(), l, core::chemical::name_from_aa(), and utility_exit.

Referenced by core::pack::dunbrack::RotamerLibrary::get_peptoid_rotamer_library().

template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::rotamer_energy ( conformation::Residue const &  rsd,
RotamerLibraryScratchSpace scratch 
) const
virtual
template<Size T>
Real core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::rotamer_energy_deriv ( conformation::Residue const &  rsd,
RotamerLibraryScratchSpace scratch 
) const
virtual
template<Size T>
ObjexxFCL::FArray4D< PackedDunbrackRotamer< T > > const & core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::rotamers ( Real  omg_angle) const
protected
template<Size T>
ObjexxFCL::FArray4D< PackedDunbrackRotamer< T > > & core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::rotamers ( Real  omg_angle)
protected
template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::verify_omgphipsi_bins ( Real  omg,
Real  phi,
Real  psi,
Size const  omgbin,
Size const  phibin,
Size const  psibin,
Size const  omgbin_next,
Size const  phibin_next,
Size const  psibin_next 
) const
private

References utility_exit.

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::write_to_binary ( utility::io::ozstream out) const
virtual

DOUG DOUG DOUG This function needs more updating to use omega.

Reimplemented from core::pack::dunbrack::SingleResiduePeptoidLibrary.

Referenced by core::pack::dunbrack::SingleResiduePeptoidLibrary::hokey_template_workaround().

template<Size T>
void core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::write_to_file ( utility::io::ozstream out) const
virtual

Friends And Related Function Documentation

template<Size T>
friend class SingleResiduePeptoidLibrary
friend

Member Data Documentation

template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::CIS_OMG_LOWER_RANGE = -30.0
staticprotected
template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::CIS_OMG_UPPER_RANGE = 30.0
staticprotected
template<Size T>
ObjexxFCL::FArray4D< Size > core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::cis_packed_rotno_2_sorted_rotno_
private
template<Size T>
ObjexxFCL::FArray4D< PackedDunbrackRotamer< T > > core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::cis_rotamers_
private
template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::CIS_UPPER_TRANS_LOWER_SPLIT = 90.0
staticprotected
template<Size T>
Size const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::N_OMG_BINS = 7
staticprotected

DOUG DOUG DOUG This use to be N_PHIPSI_BINS and PHIPSI_BINRANGE.

template<Size T>
Size const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::N_PHI_BINS = 36
staticprotected
template<Size T>
Size const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::N_PSI_BINS = 36
staticprotected
template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::OMG_BINRANGE = 10.0
staticprotected

DOUG DOUG DOUG This use to be PHIPSI_BINRANGE.

template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::PHI_BINRANGE = 10.0
staticprotected
template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::PSI_BINRANGE = 10.0
staticprotected
template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::TRANS_OMG_LOWER_RANGE = 150.0
staticprotected
template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::TRANS_OMG_UPPER_RANGE = -150.0
staticprotected
template<Size T>
ObjexxFCL::FArray4D< Size > core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::trans_packed_rotno_2_sorted_rotno_
private

Quick lookup that lists the sorted position for the packed rotamer number given a omg/phi/psi. Indexed by (omg, phi, psi, packed_rotno ).

template<Size T>
ObjexxFCL::FArray4D< PackedDunbrackRotamer< T > > core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::trans_rotamers_
private

The (chi_mean, chi_sd, packed_rotno, and prob) data for the chi dihedrals The FArray4D is indexed into by (omg, phi, psi, sorted_index ), where sorted index simply means the order for a particular packed_rotno in the list of rotamers sorted by probability.

template<Size T>
Real const core::pack::dunbrack::RotamericSingleResiduePeptoidLibrary< T >::TRANS_UPPER_CIS_LOWER_SPLIT = -90.0
staticprotected

The documentation for this class was generated from the following files: