Rosetta 3.4
|
#include <PairEnergy.hh>
Public Types | |
typedef ContextDependentTwoBodyEnergy | parent |
Public Member Functions | |
PairEnergy () | |
virtual EnergyMethodOP | clone () const |
clone | |
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 | setup_for_derivatives (pose::Pose &pose, ScoreFunction const &) const |
Called immediately before atom- and DOF-derivatives are calculated allowing the derived class a chance to prepare for future calls. | |
virtual void | prepare_rotamers_for_packing (pose::Pose const &pose, conformation::RotamerSetBase &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 | residue_pair_energy (conformation::Residue const &rsd1, conformation::Residue const &rsd2, pose::Pose const &pose, ScoreFunction const &, EnergyMap &emap) const |
Evaluate the interaction between a given residue pair accumulating the unweighted energies in an EnergyMap. | |
bool | minimize_in_whole_structure_context (pose::Pose const &) const |
Should this EnergyMethod have score and derivative evaluation evaluated only in the context of the whole Pose, or can it be included in a decomposed manner for a residue or a set of residue-pairs that are not part of the Pose that's serving as their context? The default method implemented in the base class returns true in order to grandfather in EnergyMethods that have not had their derivatives changed to take advantage of the new derivative-evaluation machinery. Methods that return "true" will not have their residue-energy(-ext) / residue-pair-energy(-ext) methods invoked by the ScoreFunction during its traversal of the MinimizationGraph, and instead will be asked to perform all their work during finalize_total_energies(). Similarly, they will be expected to perform all their work during eval_atom_deriv() instead of during the ScoreFunction's traversal of the MinimizationGraph for derivative evaluation. IMPORTANT: Methods that return "true" cannot be included in RTMin. | |
virtual bool | defines_score_for_residue_pair (conformation::Residue const &res1, conformation::Residue const &res2, bool res_moving_wrt_eachother) const |
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 |
Evaluate the derivative for an atom in rsd1 with respect to rsd2 in the context of a particular pose, and increment the F1 and F2 vectors. This base class provides a default noop implementation of this function. The calling function must guarantee that this EnergyMethod has had the opportunity to update the input ResPairMinimizationData object for the given residue in a call to prepare_for_minimization before this function is invoked. DEPRECATED. Too slow. Too much overhead for each atom; slowed fast-relax runs by ~40%. | |
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. | |
virtual void | evaluate_rotamer_background_energy_maps (conformation::RotamerSetBase const &set, conformation::Residue const &residue, pose::Pose const &pose, ScoreFunction const &sfxn, EnergyMap const &weights, utility::vector1< EnergyMap > &emaps) 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. | |
virtual Distance | atomic_interaction_cutoff () const |
PairEnergy distance cutoff set to the same cutoff used by EtableEnergy, for now. | |
Distance | interaction_cutoff () const |
virtual void | indicate_required_context_graphs (utility::vector1< bool > &context_graphs_required) const |
PairEnergy requires that Energies class maintains a TenANeighborGraph. | |
virtual bool | defines_intrares_energy (EnergyMap const &) const |
PairEnergy does not define intraresidue interactions. | |
virtual void | eval_intrares_energy (conformation::Residue const &rsd, pose::Pose const &pose, ScoreFunction const &sfxn, EnergyMap &emap) const |
Evaluate the intra-residue energy for a given residue. |
Reimplemented from core::scoring::methods::ContextDependentTwoBodyEnergy.
core::scoring::methods::PairEnergy::PairEnergy | ( | ) |
Referenced by clone().
Distance core::scoring::methods::PairEnergy::atomic_interaction_cutoff | ( | ) | const [virtual] |
PairEnergy distance cutoff set to the same cutoff used by EtableEnergy, for now.
probably move this logic to PairEPotential ??
Implements core::scoring::methods::ShortRangeTwoBodyEnergy.
References interaction_cutoff().
Referenced by evaluate_rotamer_pair_energies().
EnergyMethodOP core::scoring::methods::PairEnergy::clone | ( | ) | const [virtual] |
bool core::scoring::methods::PairEnergy::defines_intrares_energy | ( | EnergyMap const & | ) | const [virtual] |
PairEnergy does not define intraresidue interactions.
Implements core::scoring::methods::TwoBodyEnergy.
bool core::scoring::methods::PairEnergy::defines_score_for_residue_pair | ( | conformation::Residue const & | res1, |
conformation::Residue const & | res2, | ||
bool | res_moving_wrt_eachother | ||
) | const [virtual] |
Returns false if !res_movign_wrt_eachother since the score function does not update the neighbor counts for residues during minimization. If two residues are not moving wrt each other, their scores are not changing during minimization, even though this is a context dependent score function.
Reimplemented from core::scoring::methods::TwoBodyEnergy.
References core::conformation::Residue::is_aromatic(), core::conformation::Residue::is_polar(), and core::conformation::Residue::is_protein().
void core::scoring::methods::PairEnergy::eval_intrares_energy | ( | conformation::Residue const & | rsd, |
pose::Pose const & | pose, | ||
ScoreFunction const & | sfxn, | ||
EnergyMap & | emap | ||
) | const [virtual] |
Evaluate the intra-residue energy for a given residue.
Implements core::scoring::methods::TwoBodyEnergy.
void core::scoring::methods::PairEnergy::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] |
Evaluate the derivative for an atom in rsd1 with respect to rsd2 in the context of a particular pose, and increment the F1 and F2 vectors. This base class provides a default noop implementation of this function. The calling function must guarantee that this EnergyMethod has had the opportunity to update the input ResPairMinimizationData object for the given residue in a call to prepare_for_minimization before this function is invoked. DEPRECATED. Too slow. Too much overhead for each atom; slowed fast-relax runs by ~40%.
Evaluate the derivatives for all atoms on rsd1 and rsd2 with respect to each other and increment the derivatives in atom-derivatives vector1s. The calling function must guarantee that the r1_atom_derivs vector1 holds at least as many entries as there are atoms in rsd1, and that the r2_atom_derivs vector1 holds at least as many entries as there are atoms in rsd2.
Reimplemented from core::scoring::methods::TwoBodyEnergy.
References core::conformation::Residue::actcoord(), core::conformation::Residue::actcoord_atoms(), core::pose::Pose::energies(), core::scoring::fa_pair, core::scoring::fa_pair_aro_aro, core::scoring::fa_pair_aro_pol, core::scoring::fa_pair_pol_pol, core::conformation::Residue::has_variant_type(), core::conformation::Residue::is_aromatic(), core::conformation::Residue::is_polar(), core::conformation::Residue::seqpos(), and core::scoring::Energies::tenA_neighbor_graph().
void core::scoring::methods::PairEnergy::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::fa_pair, core::scoring::fa_pair_aro_aro, core::scoring::fa_pair_aro_pol, core::scoring::fa_pair_pol_pol, core::conformation::Residue::is_aromatic(), core::conformation::Residue::is_polar(), core::conformation::Residue::is_protein(), and residue_pair_energy().
void core::scoring::methods::PairEnergy::evaluate_rotamer_background_energy_maps | ( | conformation::RotamerSetBase const & | set, |
conformation::Residue const & | residue, | ||
pose::Pose const & | pose, | ||
ScoreFunction const & | sfxn, | ||
EnergyMap const & | weights, | ||
utility::vector1< EnergyMap > & | emaps | ||
) | 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::fa_pair, core::scoring::fa_pair_aro_aro, core::scoring::fa_pair_aro_pol, core::scoring::fa_pair_pol_pol, core::conformation::Residue::is_aromatic(), core::conformation::Residue::is_polar(), core::conformation::Residue::is_protein(), and residue_pair_energy().
void core::scoring::methods::PairEnergy::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 atomic_interaction_cutoff(), core::scoring::fa_pair, core::scoring::fa_pair_aro_aro, core::scoring::fa_pair_aro_pol, core::scoring::fa_pair_pol_pol, 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::conformation::RotamerSetBase::rotamer(), and protocols::kinmatch::xyz().
void core::scoring::methods::PairEnergy::indicate_required_context_graphs | ( | utility::vector1< bool > & | context_graphs_required | ) | const [virtual] |
PairEnergy requires that Energies class maintains a TenANeighborGraph.
Implements core::scoring::methods::EnergyMethod.
References core::scoring::ten_A_neighbor_graph.
Distance core::scoring::methods::PairEnergy::interaction_cutoff | ( | ) | const |
non-virtual accessor for speed
non-virtual accessor for speed; assumption: PairEnergy is not inherrited from.
Referenced by atomic_interaction_cutoff(), and residue_pair_energy().
bool core::scoring::methods::PairEnergy::minimize_in_whole_structure_context | ( | pose::Pose const & | ) | const [inline, virtual] |
Should this EnergyMethod have score and derivative evaluation evaluated only in the context of the whole Pose, or can it be included in a decomposed manner for a residue or a set of residue-pairs that are not part of the Pose that's serving as their context? The default method implemented in the base class returns true in order to grandfather in EnergyMethods that have not had their derivatives changed to take advantage of the new derivative-evaluation machinery. Methods that return "true" will not have their residue-energy(-ext) / residue-pair-energy(-ext) methods invoked by the ScoreFunction during its traversal of the MinimizationGraph, and instead will be asked to perform all their work during finalize_total_energies(). Similarly, they will be expected to perform all their work during eval_atom_deriv() instead of during the ScoreFunction's traversal of the MinimizationGraph for derivative evaluation. IMPORTANT: Methods that return "true" cannot be included in RTMin.
Reimplemented from core::scoring::methods::EnergyMethod.
void core::scoring::methods::PairEnergy::prepare_rotamers_for_packing | ( | pose::Pose const & | , |
conformation::RotamerSetBase & | |||
) | const [virtual] |
default implementation noop
Reimplemented from core::scoring::methods::EnergyMethod.
void core::scoring::methods::PairEnergy::residue_pair_energy | ( | conformation::Residue const & | rsd1, |
conformation::Residue const & | rsd2, | ||
pose::Pose const & | pose, | ||
ScoreFunction const & | sfxn, | ||
EnergyMap & | emap | ||
) | const [virtual] |
Evaluate the interaction between a given residue pair accumulating the unweighted energies in an EnergyMap.
Implements core::scoring::methods::TwoBodyEnergy.
References core::kinematics::tree::distance_squared(), core::pose::Pose::energies(), core::scoring::fa_pair, core::scoring::fa_pair_aro_aro, core::scoring::fa_pair_aro_pol, core::scoring::fa_pair_pol_pol, core::conformation::Residue::has_variant_type(), interaction_cutoff(), core::conformation::Residue::is_aromatic(), core::conformation::Residue::is_polar(), core::conformation::Residue::is_protein(), core::conformation::Residue::nbr_atom(), core::conformation::Residue::nbr_radius(), core::scoring::PairEPotential::pair_term_energy(), core::conformation::Residue::seqpos(), core::scoring::Energies::tenA_neighbor_graph(), and core::conformation::Residue::xyz().
Referenced by evaluate_rotamer_background_energies(), evaluate_rotamer_background_energy_maps(), and evaluate_rotamer_pair_energies().
void core::scoring::methods::PairEnergy::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::pose::Pose::update_residue_neighbors().
void core::scoring::methods::PairEnergy::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::pose::Pose::update_residue_neighbors().
void core::scoring::methods::PairEnergy::setup_for_scoring | ( | pose::Pose & | pose, |
ScoreFunction const & | |||
) | const [virtual] |
Reimplemented from core::scoring::methods::EnergyMethod.
References core::pose::Pose::update_residue_neighbors().
void core::scoring::methods::PairEnergy::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::pose::Pose::update_actcoord().