Rosetta 3.4
|
#include <LK_BallEnergy.hh>
Public Types | |
typedef ContextIndependentTwoBodyEnergy | parent |
typedef chemical::ResidueType | ResidueType |
convenience typedefs | |
typedef utility::vector1< Size > | Sizes |
typedef utility::vector1< Vector > | Vectors |
Public Member Functions | |
LK_BallEnergy (EnergyMethodOptions const &options) | |
HACKING //////////////////////////. | |
virtual EnergyMethodOP | clone () const |
clone | |
LK_BallEnergy (LK_BallEnergy const &src) | |
virtual void | setup_for_packing (pose::Pose &pose, utility::vector1< bool > const &, utility::vector1< bool > const &) const |
virtual void | setup_for_scoring (pose::Pose &pose, ScoreFunction const &) const |
virtual void | prepare_rotamers_for_packing (pose::Pose const &pose, conformation::RotamerSetBase &rotamer_set) const |
virtual void | update_residue_for_packing (pose::Pose &, Size resid) const |
ensure this function gets called. The default behavior is to do nothing. | |
virtual void | setup_for_derivatives (pose::Pose &pose, ScoreFunction const &scfxn) const |
Called immediately before atom- and DOF-derivatives are calculated allowing the derived class a chance to prepare for future calls. | |
Real | calculate_lk_desolvation_of_single_atom_by_residue (Size const atom1, conformation::Residue const &rsd1, conformation::Residue const &rsd2) |
helper function for outside use | |
Real | calculate_lk_desolvation_of_single_atom_by_residue_no_count_pair (Size const atom1, conformation::Residue const &rsd1, conformation::Residue const &rsd2) |
void | calculate_lk_ball_atom_energies (Size const atom1, conformation::Residue const &rsd1, Vectors const &atom1_waters, Size const atom2, conformation::Residue const &rsd2, Real &lk_desolvation_of_atom1_by_atom2, Real &lk_ball_desolvation_of_atom1_by_atom2) const |
get the lk-ball desolvation of atom1 by atom2, and the unoriented lk desolvation of atom1 by atom2 | |
Real | get_lk_fractional_contribution_for_single_water (Vector const &atom2_xyz, Size const atom2_type, Vector const &atom1_water) const |
void | eval_desolvation_derivs_no_count_pair (Real const d2, Size const atom1, conformation::Residue const &rsd1, Size const atom2, conformation::Residue const &rsd2, Real &atom1_lk_desolvation_by_atom2_deriv, Real &atom2_lk_desolvation_by_atom1_deriv) |
virtual void | eval_residue_pair_derivatives (conformation::Residue const &rsd1, conformation::Residue const &rsd2, ResSingleMinimizationData const &, ResSingleMinimizationData const &, ResPairMinimizationData const &min_data, pose::Pose const &pose, EnergyMap const &weights, utility::vector1< DerivVectorPair > &r1_atom_derivs, utility::vector1< DerivVectorPair > &r2_atom_derivs) const |
virtual void | residue_pair_energy (conformation::Residue const &rsd1, conformation::Residue const &rsd2, pose::Pose const &pose, ScoreFunction const &, EnergyMap &emap) const |
This guy is used during scoring. | |
void | residue_pair_energy (conformation::Residue const &rsd1, LKB_ResidueInfo const &rsd1_info, conformation::Residue const &rsd2, LKB_ResidueInfo const &rsd2_info, EnergyMap &emap) const |
void | accumulate_single_atom_contributions (Size const atom1, Size const atom1_type_index, Vectors const &atom1_waters, conformation::Residue const &rsd1, Size const atom2_type_index, Vector const &atom2_xyz, Real const lk_desolvation_of_atom1_by_atom2, EnergyMap &emap) const |
virtual bool | defines_intrares_energy (EnergyMap const &) const |
Two body energies are able to define intra-residue energies, and to do so only in the presence of certain non-zero weights. The ScoreFunction will hand over its weight set as it asks whether the energy method defines an intraresidue energy or not. | |
virtual void | eval_intrares_energy (conformation::Residue const &, pose::Pose const &, ScoreFunction const &, EnergyMap &) const |
Evaluate the intra-residue energy for a given residue. | |
virtual Distance | atomic_interaction_cutoff () const |
how far apart must two heavy atoms be to have a zero interaction energy? | |
void | indicate_required_context_graphs (utility::vector1< bool > &context_graphs_required) const |
Indicate in the context-graphs-required list which context-graphs this energy method requires that the Pose maintain when doing neighbor evaluation. Context graphs are allowed. | |
Real | eval_lk_fraction (Real const d2_delta) const |
Real | eval_d_lk_fraction_dr_over_r (Real const d2_delta) const |
Real | get_lk_fractional_contribution (Vector const &atom2_xyz, Size const atom2_type_index, Vectors const &atom1_waters, Size &closest_water, Real &closest_water_dis2) const |
Real | get_lk_fractional_contribution (Vector const &atom2_xyz, Size const atom2_type_index, Vectors const &atom1_waters) const |
Real | eval_lk_ball_fraction_deriv (Vector const &atom2_xyz, Size const atom2_type_index, Vectors const &atom1_waters, bool const evaluate_deriv, Vector &f1, Vector &f2) const |
for external use | |
virtual void | evaluate_rotamer_pair_energies (conformation::RotamerSetBase const &set1, conformation::RotamerSetBase const &set2, pose::Pose const &pose, ScoreFunction const &sfxn, EnergyMap const &weights, ObjexxFCL::FArray2D< core::PackerEnergy > &energy_table) const |
Batch computation of rotamer pair energies. Need not be overriden in derived class -- by default, iterates over all pairs of rotamers, and calls derived class's residue_pair_energy method. Since short range rotamer pairs may not need calculation, the default method looks at blocks of residue type pairs and only calls the residue_pair_energy method if the rotamer pairs are within range. | |
virtual void | evaluate_rotamer_background_energies (conformation::RotamerSetBase const &set, conformation::Residue const &residue, pose::Pose const &pose, ScoreFunction const &sfxn, EnergyMap const &weights, utility::vector1< core::PackerEnergy > &energy_vector) const |
Batch computation of rotamer/background energies. Need not be overriden in derived class -- by default, iterates over all rotamers in the set, and calls derived class's residue_pair_energy method for each one against the background rotamer Since short range rotamer pairs may not need calculation, the default method looks at blocks of residue type pairs and only calls the residue_pair_energy method if the rotamer pairs are within range. | |
void | sum_contributions_for_atom_pair_one_way (Size const atom1, conformation::Residue const &rsd1, Vectors const &atom1_waters, Size const atom2, conformation::Residue const &rsd2, scoring::EnergyMap const &weights, Real const weight_factor, Real const d2, Vector &F1, Vector &F2) const |
void | sum_contributions_for_atom_pair (Size const atom1, conformation::Residue const &rsd1, LKB_ResidueInfo const &rsd1_info, Size const atom2, conformation::Residue const &rsd2, LKB_ResidueInfo const &rsd2_info, pose::Pose const &pose, scoring::EnergyMap const &weights, Real const cp_weight, Vector &F1, Vector &F2) const |
void | setup_d2_bounds () |
Reimplemented from core::scoring::methods::ContextIndependentTwoBodyEnergy.
convenience typedefs
core::scoring::methods::LK_BallEnergy::LK_BallEnergy | ( | EnergyMethodOptions const & | options | ) |
core::scoring::methods::LK_BallEnergy::LK_BallEnergy | ( | LK_BallEnergy const & | src | ) |
References setup_d2_bounds().
void core::scoring::methods::LK_BallEnergy::accumulate_single_atom_contributions | ( | Size const | atom1, |
Size const | atom1_type_index, | ||
Vectors const & | atom1_waters, | ||
conformation::Residue const & | rsd1, | ||
Size const | atom2_type_index, | ||
Vector const & | atom2_xyz, | ||
Real const | lk_desolvation_of_atom1_by_atom2, | ||
EnergyMap & | emap | ||
) | const |
References get_lk_fractional_contribution(), core::scoring::lk_ball, and core::scoring::lk_ball_iso.
Referenced by residue_pair_energy().
Distance core::scoring::methods::LK_BallEnergy::atomic_interaction_cutoff | ( | ) | const [virtual] |
how far apart must two heavy atoms be to have a zero interaction energy?
If hydrogen atoms interact at the same range as heavy atoms, then this distance should build-in a 2 * max-bound-h-distance-cutoff buffer. There is an improper mixing here between run-time aquired chemical knowledge (max-bound-h-distance-cutoff) and compile time aquired scoring knowledge (max atom cutoff); this could be resolved by adding a boolean uses_hydrogen_interaction_distance() to the SRTBEnergy class along with a method of the ChemicalManager max_bound_h_distance_cutoff().
Implements core::scoring::methods::ShortRangeTwoBodyEnergy.
References core::scoring::etable::Etable::max_dis().
void core::scoring::methods::LK_BallEnergy::calculate_lk_ball_atom_energies | ( | Size const | atom1, |
conformation::Residue const & | rsd1, | ||
Vectors const & | atom1_waters, | ||
Size const | atom2, | ||
conformation::Residue const & | rsd2, | ||
Real & | lk_desolvation_of_atom1_by_atom2, | ||
Real & | lk_ball_desolvation_of_atom1_by_atom2 | ||
) | const |
get the lk-ball desolvation of atom1 by atom2, and the unoriented lk desolvation of atom1 by atom2
References core::conformation::Residue::atom(), core::scoring::etable::count_pair::CP_CROSSOVER_4, get_lk_fractional_contribution(), core::conformation::Atom::type(), and core::conformation::Residue::xyz().
Real core::scoring::methods::LK_BallEnergy::calculate_lk_desolvation_of_single_atom_by_residue | ( | Size const | atom1, |
conformation::Residue const & | rsd1, | ||
conformation::Residue const & | rsd2 | ||
) |
helper function for outside use
helper function for outsiders
References core::conformation::Residue::atom(), core::scoring::etable::count_pair::CP_CROSSOVER_4, core::conformation::Residue::nheavyatoms(), core::conformation::Atom::type(), and core::conformation::Residue::xyz().
Real core::scoring::methods::LK_BallEnergy::calculate_lk_desolvation_of_single_atom_by_residue_no_count_pair | ( | Size const | atom1, |
conformation::Residue const & | rsd1, | ||
conformation::Residue const & | rsd2 | ||
) |
EnergyMethodOP core::scoring::methods::LK_BallEnergy::clone | ( | ) | const [virtual] |
virtual bool core::scoring::methods::LK_BallEnergy::defines_intrares_energy | ( | EnergyMap const & | weights | ) | const [inline, virtual] |
Two body energies are able to define intra-residue energies, and to do so only in the presence of certain non-zero weights. The ScoreFunction will hand over its weight set as it asks whether the energy method defines an intraresidue energy or not.
For example, the Etable method defines intra-residue energies only when one or more of the fa_intra_{atr,rep,sol} weights are non-zero.
Implements core::scoring::methods::TwoBodyEnergy.
Real core::scoring::methods::LK_BallEnergy::eval_d_lk_fraction_dr_over_r | ( | Real const | d2_delta | ) | const |
Referenced by eval_lk_ball_fraction_deriv(), and sum_contributions_for_atom_pair_one_way().
void core::scoring::methods::LK_BallEnergy::eval_desolvation_derivs_no_count_pair | ( | Real const | d2, |
Size const | atom1, | ||
conformation::Residue const & | rsd1, | ||
Size const | atom2, | ||
conformation::Residue const & | rsd2, | ||
Real & | atom1_lk_desolvation_by_atom2_deriv, | ||
Real & | atom2_lk_desolvation_by_atom1_deriv | ||
) |
References core::conformation::Residue::atom(), and core::conformation::Atom::type().
virtual void core::scoring::methods::LK_BallEnergy::eval_intrares_energy | ( | conformation::Residue const & | rsd, |
pose::Pose const & | pose, | ||
ScoreFunction const & | sfxn, | ||
EnergyMap & | emap | ||
) | const [inline, virtual] |
Evaluate the intra-residue energy for a given residue.
Implements core::scoring::methods::TwoBodyEnergy.
Real core::scoring::methods::LK_BallEnergy::eval_lk_ball_fraction_deriv | ( | Vector const & | atom2_xyz, |
Size const | atom2_type, | ||
Vectors const & | atom1_waters, | ||
bool const | evaluate_deriv, | ||
Vector & | f1, | ||
Vector & | f2 | ||
) | const |
for external use
Note that we calculate the lk_ball_iso derivative as well as the lk_ball derivative...
Derivatives are only included for heavyatoms.
For a non-polar heavyatom, the derivs are for all polar atoms that it desolvates
For a polar heavyatom, derivs are for all polar atoms that it desolvates as well as all atoms it's being desolvated by.
Given an atom desolvating a polar atom: the lk_ball_iso deriv is the standard lk deriv, but make sure we use the correct array! (see LK_hack code)
the lk_ball score = wt * lk_polar, so the derivs have two components. One looks like wt * lk_polar deriv contribution. The other looks like the lk_polar term * the derivative of the wt. The derivative of the wt is found by getting the closest water, taking the derivative of the wt term wrt distance and using f1/f2 contributions for the desolvating atom xyz and the water xyz.
Compute the f1 and f2 vectors for the derivative of the lk_fraction term for atom2 desolvating atom1
References eval_d_lk_fraction_dr_over_r(), and get_lk_fractional_contribution().
Referenced by core::scoring::methods::apply_lk_ball_fraction_weight_for_hbonds().
Stolen from LK_SigmoidalFunc in lk_hack d2_delta = d2 - d2_low
Referenced by get_lk_fractional_contribution(), and get_lk_fractional_contribution_for_single_water().
void core::scoring::methods::LK_BallEnergy::eval_residue_pair_derivatives | ( | conformation::Residue const & | rsd1, |
conformation::Residue const & | rsd2, | ||
ResSingleMinimizationData const & | , | ||
ResSingleMinimizationData const & | , | ||
ResPairMinimizationData const & | min_data, | ||
pose::Pose const & | pose, | ||
EnergyMap const & | weights, | ||
utility::vector1< DerivVectorPair > & | r1_atom_derivs, | ||
utility::vector1< DerivVectorPair > & | r2_atom_derivs | ||
) | const [virtual] |
F1 and F2 are not zeroed -- contributions from this atom are just summed in
Reimplemented from core::scoring::methods::TwoBodyEnergy.
References core::conformation::Residue::atom_is_hydrogen(), core::scoring::etab_pair_nblist, core::scoring::ResPairMinimizationData::get_data(), core::scoring::ResPairMinimizationData::get_data_ref(), core::conformation::Residue::natoms(), core::scoring::methods::retrieve_residue_info(), core::conformation::Residue::seqpos(), and sum_contributions_for_atom_pair().
void core::scoring::methods::LK_BallEnergy::evaluate_rotamer_background_energies | ( | conformation::RotamerSetBase const & | set, |
conformation::Residue const & | residue, | ||
pose::Pose const & | pose, | ||
ScoreFunction const & | sfxn, | ||
EnergyMap const & | weights, | ||
utility::vector1< core::PackerEnergy > & | energy_vector | ||
) | const [virtual] |
Batch computation of rotamer/background energies. Need not be overriden in derived class -- by default, iterates over all rotamers in the set, and calls derived class's residue_pair_energy method for each one against the background rotamer Since short range rotamer pairs may not need calculation, the default method looks at blocks of residue type pairs and only calls the residue_pair_energy method if the rotamer pairs are within range.
Reimplemented from core::scoring::methods::ShortRangeTwoBodyEnergy.
References core::scoring::EMapVector::dot(), core::scoring::methods::LKB_ResidueInfo::has_waters(), residue_pair_energy(), core::scoring::methods::retrieve_residue_info(), core::scoring::methods::retrieve_rotamer_set_info(), and core::conformation::Residue::seqpos().
void core::scoring::methods::LK_BallEnergy::evaluate_rotamer_pair_energies | ( | conformation::RotamerSetBase const & | set1, |
conformation::RotamerSetBase const & | set2, | ||
pose::Pose const & | pose, | ||
ScoreFunction const & | sfxn, | ||
EnergyMap const & | weights, | ||
ObjexxFCL::FArray2D< core::PackerEnergy > & | energy_table | ||
) | const [virtual] |
Batch computation of rotamer pair energies. Need not be overriden in derived class -- by default, iterates over all pairs of rotamers, and calls derived class's residue_pair_energy method. Since short range rotamer pairs may not need calculation, the default method looks at blocks of residue type pairs and only calls the residue_pair_energy method if the rotamer pairs are within range.
Reimplemented from core::scoring::methods::ShortRangeTwoBodyEnergy.
References core::scoring::EMapVector::dot(), core::conformation::RotamerSetBase::get_n_residue_types(), core::conformation::RotamerSetBase::get_n_rotamers_for_residue_type(), core::conformation::RotamerSetBase::get_residue_type_begin(), residue_pair_energy(), core::scoring::methods::retrieve_rotamer_set_info(), and core::conformation::RotamerSetBase::rotamer().
Real core::scoring::methods::LK_BallEnergy::get_lk_fractional_contribution | ( | Vector const & | atom2_xyz, |
Size const | atom2_type_index, | ||
Vectors const & | atom1_waters | ||
) | const |
References get_lk_fractional_contribution().
Real core::scoring::methods::LK_BallEnergy::get_lk_fractional_contribution | ( | Vector const & | atom2_xyz, |
Size const | atom2_type, | ||
Vectors const & | atom1_waters, | ||
Size & | closest_water, | ||
Real & | closest_water_d2_delta | ||
) | const |
References eval_lk_fraction().
Referenced by accumulate_single_atom_contributions(), calculate_lk_ball_atom_energies(), eval_lk_ball_fraction_deriv(), get_lk_fractional_contribution(), and sum_contributions_for_atom_pair_one_way().
Real core::scoring::methods::LK_BallEnergy::get_lk_fractional_contribution_for_single_water | ( | Vector const & | atom2_xyz, |
Size const | atom2_type, | ||
Vector const & | atom1_water | ||
) | const |
References eval_lk_fraction().
void core::scoring::methods::LK_BallEnergy::indicate_required_context_graphs | ( | utility::vector1< bool > & | context_graphs_required | ) | const [virtual] |
Indicate in the context-graphs-required list which context-graphs this energy method requires that the Pose maintain when doing neighbor evaluation. Context graphs are allowed.
Implements core::scoring::methods::EnergyMethod.
void core::scoring::methods::LK_BallEnergy::prepare_rotamers_for_packing | ( | pose::Pose const & | , |
conformation::RotamerSetBase & | |||
) | const [virtual] |
default implementation noop
Reimplemented from core::scoring::methods::EnergyMethod.
References core::conformation::RotamerSetBase::data(), core::conformation::RotamerSetCacheableDataType::LK_BALL_ROTAMER_SET_INFO, core::conformation::RotamerSetBase::num_rotamers(), and core::conformation::RotamerSetBase::rotamer().
void core::scoring::methods::LK_BallEnergy::residue_pair_energy | ( | conformation::Residue const & | rsd1, |
conformation::Residue const & | rsd2, | ||
pose::Pose const & | pose, | ||
ScoreFunction const & | , | ||
EnergyMap & | emap | ||
) | const [virtual] |
This guy is used during scoring.
Implements core::scoring::methods::TwoBodyEnergy.
References core::scoring::methods::retrieve_residue_info(), and core::conformation::Residue::seqpos().
Referenced by evaluate_rotamer_background_energies(), and evaluate_rotamer_pair_energies().
void core::scoring::methods::LK_BallEnergy::residue_pair_energy | ( | conformation::Residue const & | rsd1, |
LKB_ResidueInfo const & | rsd1_info, | ||
conformation::Residue const & | rsd2, | ||
LKB_ResidueInfo const & | rsd2_info, | ||
EnergyMap & | emap | ||
) | const |
References accumulate_single_atom_contributions(), core::conformation::Residue::atom(), core::scoring::methods::determine_crossover_behavior(), core::conformation::Residue::nheavyatoms(), core::conformation::Atom::type(), core::scoring::methods::LKB_ResidueInfo::waters(), and core::conformation::Residue::xyz().
void core::scoring::methods::LK_BallEnergy::setup_d2_bounds | ( | ) |
void core::scoring::methods::LK_BallEnergy::setup_for_derivatives | ( | pose::Pose & | pose, |
ScoreFunction const & | sfxn | ||
) | const [virtual] |
Called immediately before atom- and DOF-derivatives are calculated allowing the derived class a chance to prepare for future calls.
default implementation noop
Reimplemented from core::scoring::methods::EnergyMethod.
References core::scoring::methods::compute_and_store_pose_waters(), and core::pose::Pose::update_residue_neighbors().
void core::scoring::methods::LK_BallEnergy::setup_for_packing | ( | pose::Pose & | , |
utility::vector1< bool > const & | , | ||
utility::vector1< bool > const & | |||
) | const [virtual] |
default implementation noop
Reimplemented from core::scoring::methods::EnergyMethod.
References core::scoring::methods::compute_and_store_pose_waters(), and core::pose::Pose::update_residue_neighbors().
void core::scoring::methods::LK_BallEnergy::setup_for_scoring | ( | pose::Pose & | pose, |
ScoreFunction const & | |||
) | const [virtual] |
Reimplemented from core::scoring::methods::EnergyMethod.
References core::scoring::methods::compute_and_store_pose_waters(), and core::pose::Pose::update_residue_neighbors().
void core::scoring::methods::LK_BallEnergy::sum_contributions_for_atom_pair | ( | Size const | atom1, |
conformation::Residue const & | rsd1, | ||
LKB_ResidueInfo const & | rsd1_info, | ||
Size const | atom2, | ||
conformation::Residue const & | rsd2, | ||
LKB_ResidueInfo const & | rsd2_info, | ||
pose::Pose const & | pose, | ||
scoring::EnergyMap const & | weights, | ||
Real const | cp_weight, | ||
Vector & | F1, | ||
Vector & | F2 | ||
) | const |
References sum_contributions_for_atom_pair_one_way(), core::scoring::methods::LKB_ResidueInfo::waters(), and core::conformation::Residue::xyz().
Referenced by eval_residue_pair_derivatives().
void core::scoring::methods::LK_BallEnergy::sum_contributions_for_atom_pair_one_way | ( | Size const | atom1, |
conformation::Residue const & | rsd1, | ||
Vectors const & | atom1_waters, | ||
Size const | atom2, | ||
conformation::Residue const & | rsd2, | ||
scoring::EnergyMap const & | weights, | ||
Real const | weight_factor, | ||
Real const | d2, | ||
Vector & | F1, | ||
Vector & | F2 | ||
) | const |
References core::conformation::Residue::atom(), eval_d_lk_fraction_dr_over_r(), get_lk_fractional_contribution(), core::scoring::lk_ball, core::scoring::lk_ball_iso, core::conformation::Atom::type(), and core::conformation::Residue::xyz().
Referenced by sum_contributions_for_atom_pair().
void core::scoring::methods::LK_BallEnergy::update_residue_for_packing | ( | pose::Pose & | , |
Size | resid | ||
) | const [virtual] |
ensure this function gets called. The default behavior is to do nothing.
default implementation noop
Reimplemented from core::scoring::methods::EnergyMethod.
References core::scoring::methods::LKB_ResidueInfo::build_waters(), core::pose::Pose::residue(), and core::scoring::methods::retrieve_nonconst_residue_info().