32 #include <basic/Tracer.hh>
37 #include <utility/pointer/owning_ptr.hh>
38 #include <utility/pointer/ReferenceCount.hh>
40 #include <numeric/xyzVector.hh>
41 #include <numeric/xyz.functions.hh>
42 #include <numeric/conversions.hh>
45 #include <ObjexxFCL/format.hh>
53 #include <utility/vector1.hh>
67 using namespace ObjexxFCL::fmt;
69 static basic::Tracer
t(
"core.scoring.hbonds.HBondSet");
73 bool const dhatm_is_protein_backbone,
74 bool const dres_is_protein,
75 bool const dres_is_dna,
76 bool const dhatm_is_backbone,
79 bool const aatm_is_protein_backbone,
80 bool const ares_is_protein,
81 bool const ares_is_dna,
82 bool const aatm_is_backbone,
90 don_hatm_is_protein_backbone_( dhatm_is_protein_backbone ),
91 don_res_is_protein_( dres_is_protein ),
92 don_res_is_dna_( dres_is_dna ),
93 don_hatm_is_backbone_( dhatm_is_backbone ),
96 acc_atm_is_protein_backbone_( aatm_is_protein_backbone ),
97 acc_res_is_protein_( ares_is_protein ),
98 acc_res_is_dna_( ares_is_dna ),
99 acc_atm_is_backbone_( aatm_is_backbone ),
101 eval_tuple_( hbe_tuple ),
102 energy_( energy_in ),
103 weight_( weight_in ),
242 return ( a->energy() * a->weight() < b->energy() * b->weight() );
276 <<
"#Dch Dn Dres Da Ach An Ares Aa length AHDang BAHang BAtor weight energy"
301 Real const HAdist(Hxyz.distance(Axyz));
302 Real const AHDangle(numeric::angle_degrees(Axyz, Hxyz, Dxyz));
303 Real const BAHangle(numeric::angle_degrees(Bxyz, Axyz, Hxyz));
304 Real const BAtorsion(dihedral_degrees(BBxyz, Bxyz, Axyz, Hxyz));
312 <<
A(1, don_pdb_chain) << I(5, don_pdb_number) <<
A(1, don_pdb_icode)
313 << I(4, don_res_name) << I(5, don_atom_name)
316 <<
A(1, acc_pdb_chain) << I(5, acc_pdb_number) <<
A(1, acc_pdb_icode)
317 << I(4, acc_res_name) << I(5, acc_atom_name)
323 << F(7, 1, AHDangle) << F(7, 1, BAHangle)
328 << F(7, 1, BAtorsion)
376 atom_map_init_( false )
383 atom_map_init_( false )
395 atom_map_init_( false )
400 atom_map_init_( false )
413 atom_map_init_(false)
428 atom_map_init_(false)
437 basic::datacache::CacheableData(),
452 basic::datacache::CacheableData(),
462 for (
Size k = 1; k <= exclude_list.size(); k ++ ){
463 if( exclude_list[k] == (
core::Size)dres ){ exclude =
true;
break; };
464 if( exclude_list[k] == (
core::Size)ares ){ exclude =
true;
break; };
466 if( exclude )
continue;
479 basic::datacache::CacheableData(),
504 basic::datacache::CacheableData(),
522 basic::datacache::CacheableDataOP
540 return nbrs_[ seqpos ];
546 nbrs_[ seqpos ] = value;
574 bool const dhatm_is_protein_backbone
576 bool const aatm_is_protein_backbone
579 bool const dhatm_is_backbone
581 bool const aatm_is_backbone
589 dhatm_is_backbone, don_pos,
590 aatm , aatm_is_protein_backbone, acc_rsd.
is_protein(),
591 acc_rsd.
is_DNA(), aatm_is_backbone, acc_pos,
592 hbe_tuple, energy, weight, derivs ) );
596 if (
options_->bb_donor_acceptor_check() ){
597 if ( dhatm_is_protein_backbone || aatm_is_protein_backbone ) {
598 Size const max_pos( std::max( acc_pos, don_pos ) );
605 if ( dhatm_is_protein_backbone && aatm_is_protein_backbone ) {
655 HBondAtomMap::const_iterator iter(
atom_map_.find( atom ) );
658 }
else return iter->second;
676 HBondSet::clear_hbonds()
714 for (
Size r=1; r<= 2; ++r ) {
715 AtomID const & atom( r == 1 ? don_atom : acc_atom );
716 HBondAtomMap::iterator iter(
atom_map_.find( atom ) );
722 iter->second.push_back( &hb );
731 bool const calculate_derivative ,
732 bool const backbone_only
745 false, backbone_only, backbone_only, backbone_only);
758 ir = tenA_neighbor_graph.get_node( i )->const_edge_list_begin(),
761 Size const neighbor_id( (*ir)->get_other_ind( i ) );
765 if ( nbr_rsd.is_protein() ) {
767 }
else if ( nbr_rsd.is_DNA() ) {
804 hbond_set.
show( out );
837 t <<
"HBondSets not equal!" << std::endl;
838 t << a << std::endl << b << std::endl;
843 if (!(a.
hbond(i) == b.
hbond(i)))
return false;
858 hbond(i).
show(pose, i==1 && print_header, out);
870 Size const residue_number,
871 bool const print_header ,
875 bool first_found(
true);
877 if((
hbond(i).don_res() == residue_number)
880 hbond(i).
show(pose, print_header && first_found, out);