Rosetta
Functions | Variables
lig_polar_sat.cc File Reference
#include <basic/Tracer.hh>
#include <basic/options/util.hh>
#include <core/import_pose/import_pose.hh>
#include <devel/init.hh>
#include <core/scoring/hbonds/HBondDatabase.hh>
#include <core/scoring/hbonds/HBondSet.hh>
#include <core/scoring/hbonds/HBEvalTuple.hh>
#include <core/scoring/hbonds/hbonds_geom.hh>
#include <core/scoring/hbonds/constants.hh>
#include <core/scoring/hbonds/types.hh>
#include <core/scoring/Energies.hh>
#include <core/scoring/EnergyGraph.hh>
#include <utility/graph/Graph.hh>
#include <core/scoring/ScoreFunctionFactory.hh>
#include <core/scoring/ScoreFunction.hh>
#include <core/pose/PDBInfo.hh>
#include <core/pose/Pose.hh>
#include <core/conformation/Residue.hh>
#include <core/id/AtomID.hh>
#include <numeric/xyzVector.hh>
#include <utility/vector1.hh>
#include <string>
#include <fstream>
#include <map>
#include <basic/options/keys/OptionKeys.hh>

Functions

Size rep_hb_atom (Size const tgt, Residue const &res)
 returns the index in the residue of the atom designated to represent a target atom for hydrogen bonding. More...
 
bool is_hbond (AtomID const &don, AtomID const &acc, Pose const &ps, HBondDatabase const &database, HBondSet const &hbond_set)
 Tells whether two atoms form a hydrogen bond. More...
 
void store_hb_counts (Size const ridx, Pose const &ps, HBondDatabase const &database, HBondSet const &hbond_set, std::map< AtomID, Size > &dcounts, std::map< AtomID, Size > &acounts)
 computes and stores the number of hydrogen bonds for each representative atom of a residue. More...
 
void print_hb_counts (std::map< AtomID, Size > &counts, Pose const &ps)
 prints the contents of a storage of hydrogen bond counts More...
 
Size nsat (std::map< AtomID, Size > const &counts)
 given a hydrogen-bond-count storage, returns the number of atoms which have at least a hydrogen bond. More...
 
int main (int argc, char *argv[])
 

Variables

static basic::Tracer TR ("apps.pilot.lig_polar_sat")
 

Function Documentation

◆ is_hbond()

bool is_hbond ( AtomID const &  don,
AtomID const &  acc,
Pose const &  ps,
HBondDatabase const &  database,
HBondSet const &  hbond_set 
)

Tells whether two atoms form a hydrogen bond.

Parameters
[in]doncandidate donor atom.
[in]acccandidate acceptor atom.
[in]pspose containing the atoms.
[in]databasehbond database.
[in]hbond_setdummy hbond set (will not be filled in).
Returns
true if the two atoms form a hydrogen bond; false otherwise.

It is assumed that don is a polar hydrogen atom and acc may accept hydrogen bonds.

References test.T005_Bindings::base, kic_runner::database, numeric::xyzVector< T >::distance_squared(), and test.T200_Scoring::hbond_set.

Referenced by store_hb_counts().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ nsat()

Size nsat ( std::map< AtomID, Size > const &  counts)

given a hydrogen-bond-count storage, returns the number of atoms which have at least a hydrogen bond.

Parameters
[in]countsthe storage

References count, and bin_torsions::counts.

Referenced by main().

◆ print_hb_counts()

void print_hb_counts ( std::map< AtomID, Size > &  counts,
Pose const &  ps 
)

prints the contents of a storage of hydrogen bond counts

Parameters
[in]countsthe storage of hydrogen bond counts
[in]pspose from which hydrogen bond counts were computed

The output can be seen as a sequnce of N blocks, where block i reports the counts for the ith residue having at least one atom contributing to counts (i=1,...,N, where N is the number of such residues). Within block i, line j reports the identifier and hydrogen bond count for the residue's jth atom that contributes to counts (i=1,...,N; j=1,...,M(i), where M(i) is the number of such atoms).

References bin_torsions::counts, create_a3b_hbs::i, create_a3b_hbs::j, create_a3b_hbs::r, and basic::options::TR.

Referenced by main().

◆ rep_hb_atom()

Size rep_hb_atom ( Size const  tgt,
Residue const &  res 
)

returns the index in the residue of the atom designated to represent a target atom for hydrogen bonding.

Parameters
[in]tgtindex in the residue of the target atom
[in]resresidue to which the target atom belongs

: the representative atom is used to make some atoms equivalent with respect to hydrogen bonding. Currently:

  • all hydrogen atoms bound to the same heavy atom are equivalent.

References res.

Referenced by store_hb_counts().

◆ store_hb_counts()

void store_hb_counts ( Size const  ridx,
Pose const &  ps,
HBondDatabase const &  database,
HBondSet const &  hbond_set,
std::map< AtomID, Size > &  dcounts,
std::map< AtomID, Size > &  acounts 
)

computes and stores the number of hydrogen bonds for each representative atom of a residue.

Parameters
[in]ridxindex of the residue in the pose
[in]psthe pose
[in]databasehbond database.
[in]hbond_setdummy hbond set (will not be filled in).
[out]dcountsstorage for the donor atoms' hydrogen bond counts
[out]acountsstorage for the acceptor atoms' hydrogen bond counts

For each representative atom r of donor atoms, dcounts[AtomID(r, ridx)] will contain the total number of hydrogen bonds made by the donor atoms it represents.

For each representative atom s of acceptor atoms, acounts[AtomID(s, ridx)] will contain the total number of hydrogen bonds made by the acceptor atoms it represents.

It is assumed that neither dcounts nor acounts contain, when the function begins, any item for residue ridx.

References kic_runner::database, test.T200_Scoring::hbond_set, is_hbond(), test.T220_AtomAtomPairEnergies::rep, rep_hb_atom(), and res.

Referenced by main().

Variable Documentation

◆ TR

basic::Tracer TR("apps.pilot.lig_polar_sat") ( "apps.pilot.lig_polar_sat"  )
static