Rosetta
Functions | Variables
sel_hbonds.cc File Reference
#include <basic/Tracer.hh>
#include <basic/options/util.hh>
#include <basic/options/option.hh>
#include <basic/options/option_macros.hh>
#include <core/conformation/Residue.hh>
#include <core/id/AtomID.hh>
#include <core/import_pose/import_pose.hh>
#include <core/pose/PDBInfo.hh>
#include <core/pose/Pose.hh>
#include <core/scoring/Energies.hh>
#include <core/scoring/EnergyGraph.hh>
#include <core/scoring/ScoreFunction.hh>
#include <core/scoring/ScoreFunctionFactory.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 <devel/init.hh>
#include <numeric/xyzVector.hh>
#include <iomanip>
#include <fstream>
#include <string>

Functions

Size get_pose_resnum (int const pdbnum, char const pdbchn, Pose &ps)
 Returns the residue number of a residue in a pose. More...
 
bool is_donor_h (AtomID const &aid, Pose const &ps)
 Tells whether a hydrogen atom may be an hbond donor. More...
 
bool is_acceptor (AtomID const &aid, Pose const &ps)
 Tells whether an atom may be an hbond acceptor. 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 print_hbond (string const &ndon, int const idon, char const cdon, string const &nacc, int const iacc, char const cacc)
 Prints an hbond identifier. More...
 
int main (int argc, char *argv[])
 

Variables

static basic::Tracer TR ("apps.pilot.sel_hbonds.main")
 Outputs selected hydrogen bonds from a pose. More...
 

Function Documentation

◆ get_pose_resnum()

Size get_pose_resnum ( int const  pdbnum,
char const  pdbchn,
Pose ps 
)

Returns the residue number of a residue in a pose.

@parm[in] pdbnum residue number of the residue in its PDB file. @parm[in] pdbchn chain identifier of the residue in the PDB file. @parm[in] ps pose that the residue has been loaded into.

References utility::options::OptionKeys::options::exit, create_a3b_hbs::j, and TR.

Referenced by main().

◆ is_acceptor()

bool is_acceptor ( AtomID const &  aid,
Pose const &  ps 
)

Tells whether an atom may be an hbond acceptor.

Parameters
[in]aidatom identifier in its pose.
[in]psthe pose.
Returns
true if the atom may be an acceptor atom; false otherwise.

Referenced by main().

◆ is_donor_h()

bool is_donor_h ( AtomID const &  aid,
Pose const &  ps 
)

Tells whether a hydrogen atom may be an hbond donor.

Parameters
[in]aidatom identifier in its pose.
[in]psthe pose.
Returns
true if the atom is a polar hydrogen bond; false otherwise.

Referenced by main().

◆ 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 main().

◆ main()

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

◆ print_hbond()

void print_hbond ( string const &  ndon,
int const  idon,
char const  cdon,
string const &  nacc,
int const  iacc,
char const  cacc 
)

Prints an hbond identifier.

Parameters
[in]ndonname of the donor atom.
[in]idonPDB index of the donor residue.
[in]cdonPDB chain identifier of the donor residue.
[in]naccname of the acceptor atom.
[in]iaccPDB index of the acceptor residue.
[in]caccPDB chain identifier of the acceptor residue.

References TR.

Referenced by main().

Variable Documentation

◆ TR

basic::Tracer TR("apps.pilot.sel_hbonds.main") ( "apps.pilot.sel_hbonds.main"  )
static

Outputs selected hydrogen bonds from a pose.

Parameters
[in]-s<PDB>, where <PDB> is the path to the PDB file containing the pose.
[in]-bond_fil<BOFIL>, where <BOFIL> is the path to a file specifying the hbonds to be searched for in the pose. The file has the following format:

C1 I1 A1, c1 i1 a1
... CM IM AM, cM iM aM
Here, M is the number of hydrogen bonds to be searched for. Ci, Ii, and Ai indicate, respectively, the chain identifier, residue index, and name of the DONOR atom in the ith hbond to be searched for (i=1,...,M); ci, ii, and ai indicate, respectively, the chain identifier, residue index and name of the ACCEPTOR atom in the ith hbond to be searched for (i=1,...,M).

Parameters
[in]-atom_fil<ATFIL>, where <ATFIL> is the path to a file specifying the atoms whose hbonds are to be searched for. The file has the following format:

C1 I1 A1
... CN IN AN
Here Ci, Ii, and Ai indicate, respectively, the chain identifier, residue index, and name of the ith atom whose hbonds are to be searched for (i=1,...,N, where N is the number of such atoms).

If both the -bond_fil and -atom_fil options are specified, only the former will be applied.

In the case of option -bond_fil, the ith output line indicates the ith hbond from the input list (i=0,...,N-1, where N is the number of such hbonds).

In the case of option -atom_fil, the output can be seen as a sequence of S blocks, where the ith block lists the hbond identifiers of the ith input atom that forms any hydrogen bonds (i=1,...,S).

Author
Andrea Bazzoli (bazzo.nosp@m.li@k.nosp@m.u.edu)

Referenced by get_pose_resnum(), main(), and print_hbond().