Rosetta
|
#include <basic/Tracer.hh>
#include <basic/options/util.hh>
#include <basic/options/option.hh>
#include <basic/options/option_macros.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 <core/chemical/AA.hh>
#include <utility/vector1.hh>
#include <string>
#include <fstream>
#include <map>
Classes | |
struct | CnlRes |
data structure for a residue contributing to a constellation More... | |
Typedefs | |
typedef std::map< AtomID, vector1< AtomID > > | HB_Partners |
Functions | |
Size | get_pose_resnum (int const pdbnum, char const pdbchn, Pose &ps) |
Returns the residue number of a residue in a pose. More... | |
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 | print_atom_pdbid (AtomID const &aid, Pose const &ps, std::ostream &os) |
prints an atom's PDB identifier More... | |
void | print_hb_partners (HB_Partners const &ptns, Pose const &ps, std::ostream &os) |
prints the contents of an HB_Partners instance More... | |
void | don_store_hbs (AtomID const &don, Pose const &ps, HBondDatabase const &database, HBondSet const &hbond_set, HB_Partners &hbptns) |
records a donor atom as an hbond partner for each atom accepting hbonds from it More... | |
void | acc_store_hbs (AtomID const &acc, Pose const &ps, HBondDatabase const &database, HBondSet const &hbond_set, HB_Partners &hbptns) |
records an acceptor atom as an hbond partner for each atom donating hbonds to it. More... | |
void | cnlres_store_hbs (const Size ridx, const char newaa, Pose const &ps, HBondDatabase const &database, HBondSet const &hbond_set, HB_Partners &hbptns) |
stores a residue's constellation atoms as hbond partners of the atoms, if any, with which they form hydrogen bonds. More... | |
void | cnl_store_hbs (vector1< CnlRes > const &cnl, Pose const &ps, HBondDatabase const &database, HBondSet const &hbond_set, HB_Partners &hbptns) |
stores a constellation's atoms as hbond partners of the atoms, if any, with which they form hydrogen bonds. More... | |
void | cnl_print (vector1< CnlRes > const &cnl, Pose const &ps, std::ostream &os) |
prints a constellation's description More... | |
bool | in_cnl (AtomID const &polat, vector1< CnlRes > const &cnl, Pose const &ps) |
returns true if atom 'polat' belongs to constellation 'cnl'; returns false otherwise. More... | |
void | prune_away_cnl (HB_Partners &hbptns, vector1< CnlRes > const &cnl, Pose const &ps) |
Size | hbonds_to_ptnres (AtomID const &rep, Size ptnidx, Pose const &ps, HBondDatabase const &database, HBondSet const &hbond_set, std::ostream &os) |
Detects the hbonds between an hbond-representative atom and a partner residue. More... | |
int | main (int argc, char *argv[]) |
Variables | |
static basic::Tracer | TR ("apps.pilot.cnl_env_lost_hbs") |
typedef std::map<AtomID, vector1<AtomID> > HB_Partners |
void acc_store_hbs | ( | AtomID const & | acc, |
Pose const & | ps, | ||
HBondDatabase const & | database, | ||
HBondSet const & | hbond_set, | ||
HB_Partners & | hbptns | ||
) |
records an acceptor atom as an hbond partner for each atom donating hbonds to it.
[in] | acc | the acceptor atom |
[in] | ps | pose to which the atom and its partners belong |
[in] | database | hbond database |
[in] | hbond_set | dummy hbond set (will not be filled in) |
[out] | hbptns | stores the acceptor atom as an hbond partner |
For each atom x donating an hbond to 'acc', 'acc' is added as a a partner of R(x) in 'hbptns' (i.e., to vector hbptns[R(x)]), where R(x) is the hbond representative atom of x.
References kic_runner::database, test.T200_Scoring::hbond_set, is_hbond(), and rep_hb_atom().
Referenced by cnlres_store_hbs().
prints a constellation's description
[in] | cnl | residue-specific contributions to the constellation |
[in] | ps | pose to which the constellation belongs |
[out] | os | output stream |
the ith output line contains the description of the ith residue contribution in cnl (i=1,...,N, where N is the size of cnl).
References create_a3b_hbs::i, and N.
Referenced by main().
void cnl_store_hbs | ( | vector1< CnlRes > const & | cnl, |
Pose const & | ps, | ||
HBondDatabase const & | database, | ||
HBondSet const & | hbond_set, | ||
HB_Partners & | hbptns | ||
) |
stores a constellation's atoms as hbond partners of the atoms, if any, with which they form hydrogen bonds.
[in] | cnl | the constellation |
[in] | ps | pose to which the constellation belongs |
[in] | database | hbond database |
[in] | hbond_set | dummy hbond set (will not be filled in) |
[out] | hbptns | repository of hbond partners |
References cnlres_store_hbs(), kic_runner::database, test.T200_Scoring::hbond_set, create_a3b_hbs::i, and N.
Referenced by main().
void cnlres_store_hbs | ( | const Size | ridx, |
const char | newaa, | ||
Pose const & | ps, | ||
HBondDatabase const & | database, | ||
HBondSet const & | hbond_set, | ||
HB_Partners & | hbptns | ||
) |
stores a residue's constellation atoms as hbond partners of the atoms, if any, with which they form hydrogen bonds.
[in] | ridx | index of the residue in its pose |
[in] | newaa | amino acid type to which the residue is mutated (to yield the constellation) |
[in] | ps | the pose |
[in] | database | hbond database |
[in] | hbond_set | dummy hbond set (will not be filled in) |
[out] | hbptns | repository of hbond partners |
it is assumed that, for all constellations but Thr->Ser, all polar side-chain atoms are part of the constellation (this holds for the present ensemble of donors and acceptors in Rosetta).
References acc_store_hbs(), kic_runner::database, don_store_hbs(), test.T200_Scoring::hbond_set, and res.
Referenced by cnl_store_hbs().
void don_store_hbs | ( | AtomID const & | don, |
Pose const & | ps, | ||
HBondDatabase const & | database, | ||
HBondSet const & | hbond_set, | ||
HB_Partners & | hbptns | ||
) |
records a donor atom as an hbond partner for each atom accepting hbonds from it
[in] | don | the donor atom |
[in] | ps | pose to which the atom and its partners belong |
[in] | database | hbond database |
[in] | hbond_set | dummy hbond set (will not be filled in) |
[out] | hbptns | stores the donor atom as an hbond partner |
For each atom x accepting an hbond from 'don', 'don' is added as a a partner of R(x) in 'hbptns' (i.e., to vector hbptns[R(x)]), where R(x) is the hbond representative atom of x.
References kic_runner::database, test.T200_Scoring::hbond_set, is_hbond(), and rep_hb_atom().
Referenced by cnlres_store_hbs().
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 basic::options::TR.
Referenced by main().
Size hbonds_to_ptnres | ( | AtomID const & | rep, |
Size | ptnidx, | ||
Pose const & | ps, | ||
HBondDatabase const & | database, | ||
HBondSet const & | hbond_set, | ||
std::ostream & | os | ||
) |
Detects the hbonds between an hbond-representative atom and a partner residue.
[in] | rep | the hbond-representative atom |
[in] | ptnidx | index of the partner residue in its pose |
[in] | ps | pose to which both atom 'rep' and residue 'ptnidx' belong |
[in] | database | hbond database |
[in] | hbond_set | dummy hbond set (will not be filled in) |
[out] | os | output stream where hbonds are listed |
if 'rep' represents only acceptors or only donors, the output can be seen as a sequence of N blocks, where N is the number of atoms represented by 'rep' that form at least one hydrogen bond with residue 'ptnidx'. The ith block lists the hydrogen bonds made by the ith such represented atom, according to the order specified by Residue::accpt_pos() (acceptors) or Residue::Hpos_polar() (donors) (i=0,...,N-1). Within block i, the jth line denotes the jth polar atom in residue 'ptnidx' to form a hydrogen bond with the represented atom in question for block i (i=0,...,N-1; j=0,...,M(i)-1, where M(i) is the number of such polar atoms, and acceptors and donors in residue 'ptnidx' are also ordered according to Residue::accpt_pos() and Residue::Hpos_polar(), respectively).
if 'rep' represents both donors and acceptors, 2 instances of the above output are produced, the first for the represented acceptors and the second, immediately following, for the represented donors.
References kic_runner::database, test.T200_Scoring::hbond_set, is_hbond(), print_atom_pdbid(), test.T220_AtomAtomPairEnergies::rep, and rep_hb_atom().
Referenced by main().
returns true if atom 'polat' belongs to constellation 'cnl'; returns false otherwise.
[in] | polat | an hbond-representative polar atom |
[in] | cnl | the constellation |
[in] | ps | pose to which the atom and the constellation belong |
it is assumed that, for all single-residue constellations but Thr->Ser, all polar side-chain atoms are part of the constellation (this holds for the present ensemble of donors and acceptors in Rosetta).
References create_a3b_hbs::i, N, and res.
Referenced by prune_away_cnl().
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.
[in] | don | candidate donor atom. |
[in] | acc | candidate acceptor atom. |
[in] | ps | pose containing the atoms. |
[in] | database | hbond database. |
[in] | hbond_set | dummy hbond set (will not be filled in). |
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 acc_store_hbs(), don_store_hbs(), and hbonds_to_ptnres().
int main | ( | int | argc, |
char * | argv[] | ||
) |
References argv, cnl_print(), cnl_store_hbs(), utility::io::oc::cout, test.T009_Exceptions::e, get_pose_resnum(), hbonds_to_ptnres(), create_a3b_hbs::i, basic::init(), NEW_OPT, basic::options::option, pyrosetta.distributed.io::pose_from_file, print_atom_pdbid(), print_hb_partners(), prune_away_cnl(), oop_conformations::scorefxn, and basic::options::start_file().
void print_atom_pdbid | ( | AtomID const & | aid, |
Pose const & | ps, | ||
std::ostream & | os | ||
) |
prints an atom's PDB identifier
param[in] aid atom identifier in the pose param[in] ps the pose param[out] os output stream
References res.
Referenced by hbonds_to_ptnres(), main(), and print_hb_partners().
void print_hb_partners | ( | HB_Partners const & | ptns, |
Pose const & | ps, | ||
std::ostream & | os | ||
) |
prints the contents of an HB_Partners instance
[in] | ptns | the HB_Partners instance |
[in] | ps | the relevant pose |
[out] | os | output stream |
The output can be seen as a sequence of N blocks, where N is the number of keys (atoms whose partners are stored) in ptns. The ith block lists the partners of the ith key in ptns (i=0,...,N-1). Within block i, the jth line contains the identifier of ptns[i]j.
References create_a3b_hbs::j, print_atom_pdbid(), and test.T850_SubClassing::pv.
Referenced by main().
void prune_away_cnl | ( | HB_Partners & | hbptns, |
vector1< CnlRes > const & | cnl, | ||
Pose const & | ps | ||
) |
References create_a3b_hbs::i, and in_cnl().
Referenced by main().
returns the index in the residue of the atom designated to represent a target atom for hydrogen bonding.
[in] | tgt | index in the residue of the target atom |
[in] | res | residue to which the target atom belongs |
: the representative atom is used to make some atoms equivalent with respect to hydrogen bonding. Currently:
References res.
Referenced by acc_store_hbs(), don_store_hbs(), and hbonds_to_ptnres().
|
static |