Rosetta
Public Types | Public Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary Class Reference

#include <SingleResidueCenrotLibrary.hh>

Inheritance diagram for core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary:
Inheritance graph
[legend]

Public Types

typedef chemical::AA AA
 

Public Member Functions

 SingleResidueCenrotLibrary (AA const aa)
 
 ~SingleResidueCenrotLibrary () override
 
AA aa () const
 
std::string read_from_file (utility::io::izstream &infile, bool first_line_three_letter_code_already_read)
 
const utility::vector1< CentroidRotamerSampleDataget_rotamer_samples (conformation::Residue const &rsd) const
 
Real rotamer_energy (conformation::Residue const &rsd, pose::Pose const &pose, core::pack::rotamers::TorsionEnergy &tenergy) const override
 Virtual functions required by the base classes. More...
 
void rotamer_energy_deriv (conformation::Residue const &rsd, pose::Pose const &pose, id::TorsionID const &tor_id, core::pack::rotamers::TorsionEnergy &tderiv) const override
 
std::set< id::PartialAtomIDatoms_w_dof_derivatives (conformation::Residue const &rsd, pose::Pose const &pose) const override
 Return the set of atoms ids (or, if they come from another residue, PartialAtomIDs) for the set of atoms that are used in defining the DOF derivatives for a particular residue. More...
 
Real eval_rotameric_energy_deriv (conformation::Residue const &rsd, Real4 &dis_ang_dih, bool eval_deriv) const
 
Real eval_rotameric_energy_bb_dof_deriv (conformation::Residue const &rsd, id::TorsionID const &tor_id) const
 
Real best_rotamer_energy (conformation::Residue const &rsd, pose::Pose const &pose, bool curr_rotamer_only) const override
 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...
 
void assign_random_rotamer_with_bias (conformation::Residue const &rsd, pose::Pose const &pose, numeric::random::RandomGenerator &RG, ChiVector &new_chi_angles, bool perturb_from_rotamer_center) const override
 Pick a rotamer for the input residue according to the rotamer probability distribution and assign chi angles to the input rsd. – currently no perturbation allowed. More...
 
void fill_rotamer_vector (pose::Pose const &pose, scoring::ScoreFunction const &scorefxn, pack::task::PackerTask const &task, utility::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, rotamers::RotamerVector &rotamers) const override
 
void write_to_file (utility::io::ozstream &out) const override
 
CentroidRotamerSampleData const & get_closest_rotamer (conformation::Residue const &rsd, Size &nrot, Real &dis) const
 
- Public Member Functions inherited from core::pack::rotamers::SingleResidueRotamerLibrary
 SingleResidueRotamerLibrary ()
 
 ~SingleResidueRotamerLibrary () override
 
virtual utility::vector1< utility::vector1< core::Real > > compute_proton_chi_samplings (chemical::ResidueType const &concrete_residue, pack::task::ResidueLevelTask const &rlt, bool buried) const
 Return a vector (indexed by proton_chi number) of vectors of dihedral values to use in proton chi sampling. More...
 
virtual utility::vector1< dunbrack::ChiSetOPexpand_proton_chis (utility::vector1< utility::vector1< core::Real > > const &sampling, chemical::ResidueType const &concrete_residue, core::Size max_rotamers=5000) const
 Given a vector of vectors of dihedrals to sample on proton chis, Will create the ChiSet vector combinitorially on those chi values (Note: The ChiSets are only valid/defined over the proton chis.) More...
 
virtual void bump_filter (RotamerVector &rotamers, core::Size resid, scoring::ScoreFunction const &sf, pose::Pose const &pose, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph) const
 Filter a RotamerVector by "bump energy" of a rotamer: All rotamers with bump energies over a certain threshold will be discarded Exception: if all rotamers are over the threshold, one rotamer (with the lowest bump energy) will be reserved. The vector "rotamers" will be modified "in-place". More...
 
virtual core::PackerEnergy bump_check (core::conformation::ResidueCOP rotamer, core::Size resid, scoring::ScoreFunction const &sf, pose::Pose const &pose, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph) const
 Computes the "bump energy" of a rotamer: the bump energy is the sum of rotamer's interactions with 1) the backbone-and-side chains of neighboring residues that are held fixed during this repacking optimization and 2) the backbones of neighboring residues that are changable during this repacking optimization. More...
 
virtual core::Size current_rotamer (RotamerVector &rotamers, core::Size resid, task::PackerTask const &task, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue) const
 Adds the current rotamer to rotamer vector, if the Rotlib supports it. More...
 
virtual void emergency_rotamer (RotamerVector &rotamers, core::Size resid, pose::Pose const &pose, task::PackerTask const &task, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue) const
 Generate an "emergency rotamer" if we don't have any. More...
 
RotamerVector virtual_sidechain (RotamerVector const &rotamers, core::Size resid, pose::Pose const &pose, task::PackerTask const &task, chemical::ResidueTypeCOP concrete_residue, conformation::Residue const &existing_residue) const
 Add a virtualized sidechain to the rotamer vector if settings call for it. More...
 
virtual bool operator== (SingleResidueRotamerLibrary const &) const
 Equality test for equivalence. Two SingleResidueRotamerLibraries test equal if and only if they represent the exact same behavior. More...
 

Static Protected Attributes

static Size const N_PHIPSI_BINS = 36
 
static Real const PHIPSI_BINRANGE = 10.0
 
static Size const RSD_PHI_INDEX = 1
 
static Size const RSD_PSI_INDEX = 2
 
static Real const NEUTRAL_PHI = -90
 
static Real const NEUTRAL_PSI = 130
 
static Real const MAX_ROT_ENERGY = 16
 
static Real const MIN_ROT_PROB = 1e-6
 

Private Member Functions

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
 
void verify_phipsi_bins (Real phi, Real psi, Size const phibin, Size const psibin, Size const phibin_next, Size const psibin_next) const
 
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...
 
void setup_entropy_correction ()
 E_ref is the same as shannon entropy. More...
 

Private Attributes

ObjexxFCL::FArray2D< utility::vector1< CentroidRotamerSampleData > > all_rots_bb_
 
utility::vector1< CentroidRotamerSampleDatadummy_sample_
 
AA aa_
 
Size max_rot_num
 
Real ref_energy_
 
ObjexxFCL::FArray2D< Realentropy_
 

Member Typedef Documentation

◆ AA

Constructor & Destructor Documentation

◆ SingleResidueCenrotLibrary()

core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::SingleResidueCenrotLibrary ( AA const  aa)

References all_rots_bb_, entropy_, and N_PHIPSI_BINS.

◆ ~SingleResidueCenrotLibrary()

core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::~SingleResidueCenrotLibrary ( )
overridedefault

Member Function Documentation

◆ aa()

AA core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::aa ( ) const
inline

References aa_.

Referenced by read_from_file(), and verify_phipsi_bins().

◆ assign_random_rotamer_with_bias()

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::assign_random_rotamer_with_bias ( conformation::Residue const &  rsd,
pose::Pose const &  pose,
numeric::random::RandomGenerator &  RG,
ChiVector new_chi_angles,
bool  perturb_from_rotamer_center 
) const
overridevirtual

Pick a rotamer for the input residue according to the rotamer probability distribution and assign chi angles to the input rsd. – currently no perturbation allowed.

Implements core::pack::rotamers::SingleResidueRotamerLibrary.

References core::pack::dunbrack::cenrot::TR().

◆ atoms_w_dof_derivatives()

std::set< id::PartialAtomID > core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::atoms_w_dof_derivatives ( conformation::Residue const &  rsd,
pose::Pose const &  pose 
) const
overridevirtual

Return the set of atoms ids (or, if they come from another residue, PartialAtomIDs) for the set of atoms that are used in defining the DOF derivatives for a particular residue.

Implements core::pack::rotamers::SingleResidueRotamerLibrary.

References core::conformation::insert_partial_atom_ids_for_mainchain_torsion(), RSD_PHI_INDEX, and RSD_PSI_INDEX.

◆ best_rotamer_energy()

Real core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::best_rotamer_energy ( conformation::Residue const &  rsd,
pose::Pose const &  pose,
bool  curr_rotamer_only 
) const
overridevirtual

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::rotamers::SingleResidueRotamerLibrary.

◆ bin_angle()

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::bin_angle ( Real const  angle_start,
Real const  angle_step,
Real const   ASSERT_ONLYangle_range,
Size const  nbins,
Real const  ang,
Size bin_lower,
Size bin_upper,
Real angle_alpha 
) const
inlineprivate

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

Referenced by get_phipsi_bins().

◆ eval_rotameric_energy_bb_dof_deriv()

Real core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::eval_rotameric_energy_bb_dof_deriv ( conformation::Residue const &  rsd,
id::TorsionID const &  tor_id 
) const

◆ eval_rotameric_energy_deriv()

Real core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::eval_rotameric_energy_deriv ( conformation::Residue const &  rsd,
Real4 dis_ang_dih,
bool  eval_deriv 
) const

◆ fill_rotamer_vector()

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::fill_rotamer_vector ( pose::Pose const &  pose,
scoring::ScoreFunction const &  scorefxn,
pack::task::PackerTask const &  task,
utility::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,
rotamers::RotamerVector rotamers 
) const
overridevirtual

◆ get_closest_rotamer()

CentroidRotamerSampleData const & core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::get_closest_rotamer ( conformation::Residue const &  rsd,
Size nrot,
Real dis 
) const

◆ get_phi_from_rsd()

Real core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::get_phi_from_rsd ( conformation::Residue const &  rsd) const
private

◆ get_phipsi_bins() [1/2]

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::get_phipsi_bins ( Real  phi,
Real  psi,
Size phibin,
Size psibin 
) const
private

References get_phipsi_bins().

◆ get_phipsi_bins() [2/2]

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::get_phipsi_bins ( Real  phi,
Real  psi,
Size phibin,
Size psibin,
Size phibin_next,
Size psibin_next,
Real phi_alpha,
Real psi_alpha 
) const
private

◆ get_psi_from_rsd()

Real core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::get_psi_from_rsd ( conformation::Residue const &  rsd) const
private

◆ get_rotamer_samples()

const utility::vector1< CentroidRotamerSampleData > core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::get_rotamer_samples ( conformation::Residue const &  rsd) const

◆ read_from_file()

std::string core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::read_from_file ( utility::io::izstream &  infile,
bool  first_line_three_letter_code_already_read 
)

◆ rotamer_energy()

Real core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::rotamer_energy ( conformation::Residue const &  rsd,
pose::Pose const &  pose,
core::pack::rotamers::TorsionEnergy tenergy 
) const
overridevirtual

Virtual functions required by the base classes.

Implements core::pack::rotamers::SingleResidueRotamerLibrary.

References eval_rotameric_energy_deriv(), and core::pack::rotamers::TorsionEnergy::tot.

◆ rotamer_energy_deriv()

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::rotamer_energy_deriv ( conformation::Residue const &  rsd,
pose::Pose const &  pose,
id::TorsionID const &  tor_id,
core::pack::rotamers::TorsionEnergy tderiv 
) const
overridevirtual

◆ setup_entropy_correction()

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::setup_entropy_correction ( )
private

E_ref is the same as shannon entropy.

References all_rots_bb_, entropy_, max_rot_num, N_PHIPSI_BINS, and core::scoring::packstat::old::nphi.

Referenced by read_from_file().

◆ verify_phipsi_bins()

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::verify_phipsi_bins ( Real  phi,
Real  psi,
Size const  phibin,
Size const  psibin,
Size const  phibin_next,
Size const  psibin_next 
) const
private

References aa().

Referenced by get_phipsi_bins().

◆ write_to_file()

void core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::write_to_file ( utility::io::ozstream &  out) const
overridevirtual

Member Data Documentation

◆ aa_

AA core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::aa_
private

Referenced by aa().

◆ all_rots_bb_

ObjexxFCL::FArray2D< utility::vector1< CentroidRotamerSampleData > > core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::all_rots_bb_
private

◆ dummy_sample_

utility::vector1< CentroidRotamerSampleData > core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::dummy_sample_
private

◆ entropy_

ObjexxFCL::FArray2D< Real > core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::entropy_
private

◆ MAX_ROT_ENERGY

Real const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::MAX_ROT_ENERGY = 16
staticprotected

◆ max_rot_num

Size core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::max_rot_num
private

◆ MIN_ROT_PROB

Real const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::MIN_ROT_PROB = 1e-6
staticprotected

◆ N_PHIPSI_BINS

Size const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::N_PHIPSI_BINS = 36
staticprotected

◆ NEUTRAL_PHI

Real const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::NEUTRAL_PHI = -90
staticprotected

Referenced by get_phi_from_rsd().

◆ NEUTRAL_PSI

Real const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::NEUTRAL_PSI = 130
staticprotected

Referenced by get_psi_from_rsd().

◆ PHIPSI_BINRANGE

Real const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::PHIPSI_BINRANGE = 10.0
staticprotected

◆ ref_energy_

Real core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::ref_energy_
private

◆ RSD_PHI_INDEX

Size const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::RSD_PHI_INDEX = 1
staticprotected

◆ RSD_PSI_INDEX

Size const core::pack::dunbrack::cenrot::SingleResidueCenrotLibrary::RSD_PSI_INDEX = 2
staticprotected

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