Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
core::scoring::hbonds::HBondSet Class Reference

A class that holds Hbond objects and helps setup Hbonds for scoring. More...

#include <HBondSet.hh>

Inheritance diagram for core::scoring::hbonds::HBondSet:
Inheritance graph
[legend]

Public Member Functions

 HBondSet ()
 
 ~HBondSet () override
 
 HBondSet (Size const nres)
 
 HBondSet (HBondOptions const &options)
 
 HBondSet (HBondOptions const &options, Size const nres)
 
 HBondSet (pose::Pose &pose, bool const bb_only=true)
 Convenience constructor: Find all the hbonds in the pose. BB only default. More...
 
 HBondSet (HBondOptions const &options, pose::Pose &pose, bool const bb_only=true)
 Convenience constructor: Find all the hbonds in the pose. BB only default. More...
 
 HBondSet (core::conformation::Residue const &res1, core::conformation::Residue const &res2, core::scoring::hbonds::HBondDatabase const &database)
 Convenience constructor: Find all the hbonds between two residues. BB only default. More...
 
 HBondSet (HBondOptions const &options, core::conformation::Residue const &res1, core::conformation::Residue const &res2, core::scoring::hbonds::HBondDatabase const &database)
 Convenience constructor: Find all the hbonds between two residues. BB only default. More...
 
 HBondSet (HBondSet const &src)
 copy ctor More...
 
 HBondSet (HBondSet const &src, utility::vector1< core::Size > exclude_list)
 copy ctor More...
 
 HBondSet (HBondSet const &src, utility::vector1< bool > residue_mask)
 copy ctor More...
 
 HBondSet (HBondSet const &src, Size seqpos)
 copy ctor More...
 
void setup_for_residue_pair_energies (pose::Pose const &pose, bool const calculate_derivative=false, bool const backbone_only=true)
 
HBond const & hbond (Size const number) const
 Access hbond. More...
 
HBondCOP hbond_cop (Size const number) const
 Access hbond. More...
 
utility::vector1< HBondCOPatom_hbonds (AtomID const &atom, bool include_only_allowed=true) const
 Get a vector of the hbonds involving a particular atom. More...
 
utility::vector1< HBondCOP >
const & 
atom_hbonds_all (AtomID const &atom) const
 Get a reference to a vector of all the hbonds involving a particular atom; in contrast to "atom_hbonds" (above), this function does not exclude sc/bb hydrogen bonds. More...
 
utility::vector1< HBondCOPresidue_hbonds (Size const seqpos, bool include_only_allowed=true) const
 Get a vector of all the hbonds involving this residue. More...
 
Size nhbonds () const
 Number of hbonds. More...
 
utility::vector1< HBondOP > const & hbonds () const
 Return the vector of HBond pointers. More...
 
Size nhbonds (Size const seqpos, bool include_only_allowed=true) const
 Number of hbonds involving this residue. More...
 
Size nhbonds (AtomID const &atom, bool include_only_allowed=true) const
 Number of hbonds involving this atom. More...
 
int nbrs (Size const seqpos) const
 general function for accessing the number of 10A neighbors of a given position set by setup_for_residue_pair_energies. More...
 
HBondOptions const & hbond_options () const
 Read access to the stored hbond options. More...
 
bool allow_hbond (Size const index) const
 Is this hbond allowed under the bb-bb exclusion scheme? More...
 
bool allow_hbond (HBond const &hbond) const
 
bool acc_bbg_in_bb_bb_hbond (Size const residue) const
 is the backbone bone acceptor group in a bb/bb hydrogen bond? More...
 
bool don_bbg_in_bb_bb_hbond (Size const residue) const
 is the backbone bone donor group in a bb/bb hydrogen bond? More...
 
void append_hbond (Size const dhatm, conformation::Residue const &don_rsd, Size const aatm, conformation::Residue const &acc_rsd, HBEvalTuple const &hbe_tuple, Real const energy, Real const weight, HBondDerivs const &deriv)
 Add a new hbond to the list updates the "hbchk" array as necessary. More...
 
void set_hbond_options (HBondOptions const &options)
 set the hbond options for this hbond set; clears all hbonds already stored More...
 
void sort_by_weighted_energy ()
 
void clear ()
 Delete all the data. More...
 
void set_backbone_backbone_acceptor (Size const residue, bool state)
 Manually set the state of backbone-backbone acceptor. Used for symmetry. More...
 
void set_backbone_backbone_donor (Size const residue, bool state)
 Manually set the state of backbone-backbone donor. Used for symmetry. More...
 
void resize_bb_donor_acceptor_arrays (Size const new_dimension)
 Resize bb info arrays. More...
 
void copy_bb_donor_acceptor_arrays (HBondSet const &src)
 
void set_nbrs (Size const seqpos, Size value)
 Used by SymmetricScorFunction. Not sure why. Not for general use. More...
 
basic::datacache::CacheableDataOP clone () const override
 Clone this object. More...
 
void show (std::ostream &out) const
 Print just the information stored in each individual hbond. More...
 
void show () const
 
void show (pose::Pose const &pose, bool const print_header, std::ostream &out) const
 Print nicely formated summary of the hbonds and their geometry in the pose. More...
 
void show (pose::Pose const &pose, bool const print_header=true) const
 
void show (pose::Pose const &pose, Size const residue, bool const print_header, std::ostream &out) const
 Print nicely formated summary of all the hbonds to a specific residue. More...
 
void show (pose::Pose const &pose, Size const residue, bool const print_header=true) const
 

Protected Member Functions

void hbond_don_npd_weight (Size index, Real setting)
 allow the NPDHBondSet to store the npd weights in the hbond objects More...
 
void hbond_acc_npd_weight (Size index, Real setting)
 allow the NPDHBondSet to store the npd weights in the hbond objects More...
 

Private Types

typedef id::AtomID AtomID
 
typedef std::map< AtomID,
utility::vector1< HBondCOP > > 
HBondAtomMap
 

Private Member Functions

void setup_atom_map () const
 Setup the mapping from atoms to hbonds. More...
 

Private Attributes

HBondOptionsCOP options_
 
utility::vector1< HBondOPhbonds_
 
utility::vector1< boolbackbone_backbone_donor_
 
utility::vector1< boolbackbone_backbone_acceptor_
 
utility::vector1< int > nbrs_
 
HBondAtomMap atom_map_
 
bool atom_map_init_
 
utility::vector1< HBondCOPempty_hbond_vector_
 

Friends

std::ostream & operator<< (std::ostream &out, const HBondSet &hbond_set)
 
bool operator== (HBondSet const &a, HBondSet const &b)
 equality operator More...
 

Detailed Description

A class that holds Hbond objects and helps setup Hbonds for scoring.

For general hydrogen bond information, either use the default or option constructor, then use the fill methods in hbonds.hh OR use the convenience constructors to detect all Hbonds. Use the copy constructors to fill HBondSets with the Hydrogen bonds you are interested in.

Member Typedef Documentation

typedef std::map< AtomID, utility::vector1< HBondCOP > > core::scoring::hbonds::HBondSet::HBondAtomMap
private

Constructor & Destructor Documentation

core::scoring::hbonds::HBondSet::HBondSet ( )
core::scoring::hbonds::HBondSet::~HBondSet ( )
overridedefault
core::scoring::hbonds::HBondSet::HBondSet ( Size const  nres)
core::scoring::hbonds::HBondSet::HBondSet ( HBondOptions const &  options)
core::scoring::hbonds::HBondSet::HBondSet ( HBondOptions const &  options,
Size const  nres 
)
core::scoring::hbonds::HBondSet::HBondSet ( pose::Pose pose,
bool const  bb_only = true 
)

Convenience constructor: Find all the hbonds in the pose. BB only default.

Convenience constructor. If you need more controlled construction please use one of the other constructors.

The pose must be non-const because the neighbor graph may need to be initialized.

References setup_for_residue_pair_energies(), and core::pose::Pose::update_residue_neighbors().

core::scoring::hbonds::HBondSet::HBondSet ( HBondOptions const &  opts,
pose::Pose pose,
bool const  bb_only = true 
)

Convenience constructor: Find all the hbonds in the pose. BB only default.

Convenience constructor. If you need more controlled construction please use one of the other constructors.

The pose must be non-const because the neighbor graph may need to be initialized.

References setup_for_residue_pair_energies(), and core::pose::Pose::update_residue_neighbors().

core::scoring::hbonds::HBondSet::HBondSet ( core::conformation::Residue const &  res1,
core::conformation::Residue const &  res2,
core::scoring::hbonds::HBondDatabase const &  database 
)

Convenience constructor: Find all the hbonds between two residues. BB only default.

A bit inefficient, internally, since this creates an intermediate two-residue pose.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

References core::scoring::hbonds::identify_hbonds_1way().

core::scoring::hbonds::HBondSet::HBondSet ( HBondOptions const &  options,
core::conformation::Residue const &  res1,
core::conformation::Residue const &  res2,
core::scoring::hbonds::HBondDatabase const &  database 
)

Convenience constructor: Find all the hbonds between two residues. BB only default.

A bit inefficient, internally, since this creates an intermediate two-residue pose.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

References core::scoring::hbonds::identify_hbonds_1way().

core::scoring::hbonds::HBondSet::HBondSet ( HBondSet const &  src)
core::scoring::hbonds::HBondSet::HBondSet ( HBondSet const &  src,
utility::vector1< core::Size exclude_list 
)
core::scoring::hbonds::HBondSet::HBondSet ( HBondSet const &  src,
utility::vector1< bool residue_mask 
)
core::scoring::hbonds::HBondSet::HBondSet ( HBondSet const &  src,
Size  seqpos 
)

Member Function Documentation

bool core::scoring::hbonds::HBondSet::acc_bbg_in_bb_bb_hbond ( Size const  residue) const

is the backbone bone acceptor group in a bb/bb hydrogen bond?

References backbone_backbone_acceptor_.

Referenced by core::scoring::hbonds::create_rotamer_descriptor().

bool core::scoring::hbonds::HBondSet::allow_hbond ( Size const  index) const

Is this hbond allowed under the bb-bb exclusion scheme?

bb-bb exclusion scheme means that if the query hbond is a sc making a sc-bb hbond with a backbone already involved in a bb-bb hbond, return false This has been included by default when assessing pose Hbond energies due to Rosetta designing too many ser/thr bifricated hbonds in ss structures. Part of the reason is that Rosetta currently does NOT treat bifricated hbonds differently - so both hbonds are counted toward the score. Another reason is that the rotamer library itself favors local bb-sc hbonds. NOTE: This function is called while evaluating / setting up for energies (get_hbond_energies method in hbonds.hh).

References hbonds_.

Referenced by atom_hbonds(), core::optimization::AtomTreeMultifunc::dump(), core::optimization::CartesianMultifunc::dump(), protocols::normalmode::NormalModeMultifunc::dump(), core::scoring::hbonds::get_hbond_energies(), and residue_hbonds().

bool core::scoring::hbonds::HBondSet::allow_hbond ( HBond const &  hbond) const
void core::scoring::hbonds::HBondSet::append_hbond ( Size const  dhatm,
conformation::Residue const &  don_rsd,
Size const  aatm,
conformation::Residue const &  acc_rsd,
HBEvalTuple const &  hbe_tuple,
Real const  energy,
Real const  weight,
HBondDerivs const &  deriv 
)
utility::vector1< HBondCOP > core::scoring::hbonds::HBondSet::atom_hbonds ( AtomID const &  atom,
bool  include_only_allowed = true 
) const

Get a vector of the hbonds involving a particular atom.

Excludes 'not allowed' bonds by default. See hbond_allowed function for more info)

References allow_hbond(), atom_map_, and setup_atom_map().

Referenced by protocols::simple_filters::SimpleHbondsToAtomFilter::compute(), core::scoring::methods::WaterAdductHBondEnergy::get_atom_h2o_hbond_derivative(), protocols::constel::HBondCommon::is_rmoi_hbonded(), and nhbonds().

utility::vector1< HBondCOP > const & core::scoring::hbonds::HBondSet::atom_hbonds_all ( AtomID const &  atom) const
void core::scoring::hbonds::HBondSet::clear ( )
basic::datacache::CacheableDataOP core::scoring::hbonds::HBondSet::clone ( ) const
override

Clone this object.

clone this object

void core::scoring::hbonds::HBondSet::copy_bb_donor_acceptor_arrays ( HBondSet const &  src)
bool core::scoring::hbonds::HBondSet::don_bbg_in_bb_bb_hbond ( Size const  residue) const

is the backbone bone donor group in a bb/bb hydrogen bond?

References backbone_backbone_donor_.

Referenced by core::scoring::hbonds::create_rotamer_descriptor().

HBond const & core::scoring::hbonds::HBondSet::hbond ( Size const  number) const

Access hbond.

References hbonds_.

Referenced by protocols::task_operations::SelectByDeltaScoreOperation::apply(), protocols::residue_selectors::HBondSelector::apply(), protocols::simple_filters::TaskAwareScoreTypeFilter::compute(), core::pack::guidance_scoreterms::buried_unsat_penalty::graph::BuriedUnsatPenaltyNode::detect_intra_residue_hydrogen_bonds(), core::pack::guidance_scoreterms::buried_unsat_penalty::graph::BuriedUnsatPenaltyNode::detect_intra_residue_hydrogen_bonds_symmetric(), core::pack::hbonds::determine_atom_level_edge_info(), core::optimization::CartesianMultifunc::dump(), core::optimization::AtomTreeMultifunc::dump(), protocols::normalmode::NormalModeMultifunc::dump(), protocols::pockets::GenPharmacophore::extract_Hbond_atoms_from_protein_rna_complex(), core::pack::hbonds::find_satisfying_interactions_with_background(), core::scoring::hbonds::get_hbond_energies(), protocols::loop_grower::LoopGrower::get_resrange_hbond_energy(), core::scoring::hbonds::NPDHBondSet::get_weights_for_one_partner_hbonder(), core::scoring::hbonds::NPDHBondSet::get_weights_for_two_partner_hbonder(), protocols::protein_interface_design::hbonded(), protocols::protein_interface_design::hbonded_atom(), HBondSet(), core::scoring::hbonds::identify_intra_res_hbonds(), core::pack::guidance_scoreterms::buried_unsat_penalty::graph::BuriedUnsatPenaltyGraph::initialize_graph_for_packing(), protocols::loop_grower::LoopGrower::nton3_hbond_score(), core::scoring::hbonds::operator==(), protocols::features::HBondFeatures::report_features(), protocols::moves::PyMOLMover::send_hbonds(), protocols::loop_grower::SheetSampler::sheethbonds(), core::scoring::hbonds::NPDHBondSet::show(), and show().

void core::scoring::hbonds::HBondSet::hbond_acc_npd_weight ( Size  index,
Real  setting 
)
protected

allow the NPDHBondSet to store the npd weights in the hbond objects

References hbonds_.

Referenced by core::scoring::hbonds::NPDHBondSet::derive_per_hbond_donor_and_acceptor_weights().

HBondCOP core::scoring::hbonds::HBondSet::hbond_cop ( Size const  number) const

Access hbond.

References hbonds_.

Referenced by residue_hbonds().

void core::scoring::hbonds::HBondSet::hbond_don_npd_weight ( Size  index,
Real  setting 
)
protected

allow the NPDHBondSet to store the npd weights in the hbond objects

References hbonds_.

Referenced by core::scoring::hbonds::NPDHBondSet::derive_per_hbond_donor_and_acceptor_weights().

HBondOptions const & core::scoring::hbonds::HBondSet::hbond_options ( ) const
utility::vector1< HBondOP > const & core::scoring::hbonds::HBondSet::hbonds ( ) const

Return the vector of HBond pointers.

References hbonds_.

int core::scoring::hbonds::HBondSet::nbrs ( Size const  seqpos) const

general function for accessing the number of 10A neighbors of a given position set by setup_for_residue_pair_energies.

References nbrs_.

Referenced by core::scoring::hbonds::hb_energy().

Size core::scoring::hbonds::HBondSet::nhbonds ( ) const

Number of hbonds.

References hbonds_.

Referenced by protocols::task_operations::SelectByDeltaScoreOperation::apply(), protocols::residue_selectors::HBondSelector::apply(), protocols::simple_filters::TaskAwareScoreTypeFilter::compute(), protocols::simple_filters::SimpleHbondsToAtomFilter::compute(), protocols::simple_pose_metric_calculators::NumberHBondsCalculator::compute_Hbonds_for_residue(), core::scoring::hbonds::NPDHBondSet::derive_per_hbond_donor_and_acceptor_weights(), core::pack::guidance_scoreterms::buried_unsat_penalty::graph::BuriedUnsatPenaltyNode::detect_intra_residue_hydrogen_bonds(), core::pack::guidance_scoreterms::buried_unsat_penalty::graph::BuriedUnsatPenaltyNode::detect_intra_residue_hydrogen_bonds_symmetric(), core::pack::hbonds::determine_atom_level_edge_info(), core::optimization::CartesianMultifunc::dump(), core::optimization::AtomTreeMultifunc::dump(), protocols::normalmode::NormalModeMultifunc::dump(), protocols::pockets::GenPharmacophore::extract_Hbond_atoms_from_protein_rna_complex(), core::pack::hbonds::find_satisfying_interactions_with_background(), core::scoring::hbonds::get_hbond_energies(), protocols::loop_grower::LoopGrower::get_resrange_hbond_energy(), protocols::protein_interface_design::hbonded(), protocols::protein_interface_design::hbonded_atom(), HBondSet(), core::scoring::hbonds::identify_intra_res_hbonds(), core::pack::guidance_scoreterms::buried_unsat_penalty::graph::BuriedUnsatPenaltyGraph::initialize_graph_for_packing(), protocols::loop_grower::LoopGrower::nton3_hbond_score(), core::scoring::hbonds::operator==(), protocols::features::HBondFeatures::report_features(), residue_hbonds(), protocols::moves::PyMOLMover::send_hbonds(), protocols::loop_grower::SheetSampler::sheethbonds(), core::scoring::hbonds::NPDHBondSet::show(), show(), and core::scoring::hbonds::NPDHBondSet::sum_dEtot_dEhb_for_atom().

Size core::scoring::hbonds::HBondSet::nhbonds ( Size const  seqpos,
bool  include_only_allowed = true 
) const

Number of hbonds involving this residue.

Excludes 'not allowed' bonds by default. See hbond_allowed function for more info)

References residue_hbonds().

Size core::scoring::hbonds::HBondSet::nhbonds ( AtomID const &  atom,
bool  include_only_allowed = true 
) const

Number of hbonds involving this atom.

Excludes 'not allowed' bonds by default. See hbond_allowed function for more info)

References atom_hbonds().

utility::vector1< HBondCOP > core::scoring::hbonds::HBondSet::residue_hbonds ( Size const  seqpos,
bool  include_only_allowed = true 
) const
void core::scoring::hbonds::HBondSet::resize_bb_donor_acceptor_arrays ( Size const  new_dimension)
void core::scoring::hbonds::HBondSet::set_backbone_backbone_acceptor ( Size const  residue,
bool  state 
)
inline

Manually set the state of backbone-backbone acceptor. Used for symmetry.

References backbone_backbone_acceptor_.

void core::scoring::hbonds::HBondSet::set_backbone_backbone_donor ( Size const  residue,
bool  state 
)
inline

Manually set the state of backbone-backbone donor. Used for symmetry.

References backbone_backbone_donor_.

void core::scoring::hbonds::HBondSet::set_hbond_options ( HBondOptions const &  options)

set the hbond options for this hbond set; clears all hbonds already stored

References clear(), and options_.

Referenced by core::scoring::WaterAdductHBondPotential::fill_h2o_hbond_set().

void core::scoring::hbonds::HBondSet::set_nbrs ( Size const  seqpos,
Size  value 
)

Used by SymmetricScorFunction. Not sure why. Not for general use.

References nbrs_.

void core::scoring::hbonds::HBondSet::setup_atom_map ( ) const
private

Setup the mapping from atoms to hbonds.

References atom_map_, atom_map_init_, and hbonds_.

Referenced by atom_hbonds(), and atom_hbonds_all().

void core::scoring::hbonds::HBondSet::setup_for_residue_pair_energies ( pose::Pose const &  pose,
bool const  calculate_derivative = false,
bool const  backbone_only = true 
)
void core::scoring::hbonds::HBondSet::show ( std::ostream &  out) const

Print just the information stored in each individual hbond.

References hbond(), and nhbonds().

Referenced by core::scoring::hbonds::operator<<().

void core::scoring::hbonds::HBondSet::show ( ) const
inline

References show().

Referenced by show().

void core::scoring::hbonds::HBondSet::show ( pose::Pose const &  pose,
bool const  print_header,
std::ostream &  out 
) const

Print nicely formated summary of the hbonds and their geometry in the pose.

Optionally print a header, and then a row for each hydrogen bond in the set using the iterprable version of the hbond show format formatted for easy parsing by R, Excel, etc.

References hbond(), nhbonds(), and core::scoring::hbonds::HBond::show().

void core::scoring::hbonds::HBondSet::show ( pose::Pose const &  pose,
bool const  print_header = true 
) const
void core::scoring::hbonds::HBondSet::show ( pose::Pose const &  pose,
Size const  residue_number,
bool const  print_header,
std::ostream &  out 
) const

Print nicely formated summary of all the hbonds to a specific residue.

Optionally print a header, and then a row for each hydrogen bond in the set using the iterprable version of the hbond show format formatted for easy parsing by R, Excel, etc.

References core::scoring::hbonds::HBond::acc_res(), hbond(), nhbonds(), and core::scoring::hbonds::HBond::show().

void core::scoring::hbonds::HBondSet::show ( pose::Pose const &  pose,
Size const  residue,
bool const  print_header = true 
) const
inline

References show().

void core::scoring::hbonds::HBondSet::sort_by_weighted_energy ( )

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const HBondSet hbond_set 
)
friend
bool operator== ( HBondSet const &  a,
HBondSet const &  b 
)
friend

equality operator

Member Data Documentation

HBondAtomMap core::scoring::hbonds::HBondSet::atom_map_
mutableprivate
bool core::scoring::hbonds::HBondSet::atom_map_init_
mutableprivate
utility::vector1< bool > core::scoring::hbonds::HBondSet::backbone_backbone_acceptor_
private
utility::vector1< bool > core::scoring::hbonds::HBondSet::backbone_backbone_donor_
private
utility::vector1< HBondCOP > core::scoring::hbonds::HBondSet::empty_hbond_vector_
private

Referenced by atom_hbonds_all().

utility::vector1< HBondOP > core::scoring::hbonds::HBondSet::hbonds_
private
utility::vector1< int > core::scoring::hbonds::HBondSet::nbrs_
private
HBondOptionsCOP core::scoring::hbonds::HBondSet::options_
private

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