Rosetta
|
#include <devel/init.hh>
#include <core/chemical/AtomType.fwd.hh>
#include <core/chemical/ChemicalManager.hh>
#include <core/chemical/ResidueType.hh>
#include <core/chemical/ResidueTypeSet.hh>
#include <core/conformation/Residue.hh>
#include <core/conformation/ResidueFactory.hh>
#include <core/chemical/ResidueTypeSet.fwd.hh>
#include <core/id/AtomID.hh>
#include <core/id/AtomID_Map.hh>
#include <core/kinematics/MoveMap.hh>
#include <core/pose/Pose.hh>
#include <core/pose/util.hh>
#include <core/pose/init_id_map.hh>
#include <core/pose/annotated_sequence.hh>
#include <core/scoring/EnergyGraph.fwd.hh>
#include <core/scoring/MinimizationGraph.hh>
#include <core/scoring/ScoreFunction.hh>
#include <core/scoring/ScoreFunctionFactory.hh>
#include <core/scoring/ScoreTypeManager.hh>
#include <core/scoring/hbonds/HBondOptions.hh>
#include <core/scoring/methods/EnergyMethodOptions.hh>
#include <core/optimization/MinimizerMap.hh>
#include <protocols/toolbox/match_enzdes_util/MatchConstraintFileInfo.hh>
#include <protocols/toolbox/match_enzdes_util/ExternalGeomSampler.hh>
#include <protocols/toolbox/match_enzdes_util/LigandConformer.hh>
#include <numeric/random/random.hh>
#include <numeric/constants.hh>
#include <basic/options/option.hh>
#include <basic/options/keys/in.OptionKeys.gen.hh>
#include <basic/options/option_macros.hh>
#include <basic/database/sql_utils.hh>
#include <basic/database/schema_generator/DbDataType.hh>
#include <basic/database/schema_generator/PrimaryKey.hh>
#include <basic/database/schema_generator/ForeignKey.hh>
#include <basic/database/schema_generator/Column.hh>
#include <basic/database/schema_generator/Schema.hh>
#include <utility/sql_database/DatabaseSessionManager.hh>
#include <utility/file/FileName.hh>
#include <utility/io/izstream.hh>
#include <utility/LexicographicalIterator.hh>
#include <fstream>
#include <cppdb/frontend.h>
#include <boost/uuid/uuid.hpp>
#include <ObjexxFCL/format.hh>
#include <boost/uuid/random_generator.hpp>
Classes | |
class | hbgeom_to_measure |
class | local_minimum |
struct | sort_minima_by_scores |
Typedefs | |
using | hbgeoms_to_measure = utility::vector1< hbgeom_to_measure > |
using | HTReal = numeric::HomogeneousTransform< core::Real > |
Functions | |
void | create_schema (utility::sql_database::sessionOP db_session) |
void | write_score_types_to_database (utility::sql_database::sessionOP db_session) |
void | write_hbgeom_types_to_database (utility::sql_database::sessionOP db_session) |
boost::uuids::uuid | write_new_respair_to_database (utility::sql_database::sessionOP db_session, protocols::toolbox::match_enzdes_util::MatchConstraintFileInfo const &mcfi) |
return the new respair_id uuid created by this insertion More... | |
void | write_hbgeom_to_db (utility::sql_database::sessionOP db_session, boost::uuids::uuid const conf_id, std::string const &geom_name, core::Real geometry) |
void | write_ahdist_to_db (utility::sql_database::sessionOP db_session, boost::uuids::uuid const conf_id, core::conformation::Residue const &acc_res, core::conformation::Residue const &don_res, core::Size acc_ind, core::Size hdon_ind) |
void | write_AHD_to_db (utility::sql_database::sessionOP db_session, boost::uuids::uuid const conf_id, core::conformation::Residue const &acc_res, core::conformation::Residue const &don_res, core::Size acc_ind, core::Size hdon_ind, core::Size don_ind) |
void | write_BAH_to_db (utility::sql_database::sessionOP db_session, boost::uuids::uuid const conf_id, core::conformation::Residue const &acc_res, core::conformation::Residue const &don_res, core::Size acc_base, core::Size acc_ind, core::Size hdon_ind) |
void | write_chi_to_db (utility::sql_database::sessionOP db_session, boost::uuids::uuid const conf_id, core::conformation::Residue const &acc_res, core::conformation::Residue const &don_res, core::Size acc_base2, core::Size acc_base, core::Size acc_ind, core::Size hdon_ind) |
void | write_hbgeoms_to_database (utility::sql_database::sessionOP db_session, boost::uuids::uuid const conf_id, core::pose::Pose const &pose, hbgeoms_to_measure const &geoms, core::Size res1ind, core::Size res2ind) |
void | write_respair_scores_to_database (utility::sql_database::sessionOP db_session, boost::uuids::uuid const conf_id, core::scoring::ScoreFunction const &sfxn, core::pose::Pose &pose, core::Size res1ind, core::Size res2ind) |
void | write_scores_and_hbond_geoms_to_database (utility::sql_database::sessionOP db_session, boost::uuids::uuid const respair_id, core::scoring::ScoreFunction const &sfxn, core::pose::Pose &pose, hbgeoms_to_measure const &geoms, core::Size res1ind, core::Size res2ind) |
void | populate_database_with_dummy_data (utility::sql_database::sessionOP db_session) |
hbgeoms_to_measure | create_fullcoverage_hbgeoms_to_measure (core::pose::Pose const &pose, protocols::toolbox::match_enzdes_util::MatchConstraintFileInfo const &mcfi, core::Size acc_id, core::Size don_id) |
assumes that the geometry is specified between the donor and the acceptor; this is not necessarily true! FIX THIS so that the hbond geometry can be defined independently of the mat More... | |
core::Real | score_residue_pair (core::pose::Pose const &pose, core::scoring::ScoreFunction const &sfxn, core::Size const res1_index, core::Size const res2_index) |
core::Real | build_and_score_res1_against_res2 (core::pose::Pose &pose, core::scoring::ScoreFunction const &sfxn, HTReal const &htend, core::Size res1_index, core::Size res2_index, protocols::toolbox::match_enzdes_util::LigandConformer const &res1_geom) |
bool | determine_if_at_local_minimum_numeric (core::pose::Pose &pose, core::scoring::ScoreFunction const &sfxn, protocols::toolbox::match_enzdes_util::ExternalGeomSamplerCOP exgeom, HTReal const &launch, core::Size res1_index, core::Size res2_index, utility::LexicographicalIterator const &lex, protocols::toolbox::match_enzdes_util::LigandConformer const &res1_geom, core::Real &score) |
void | create_mingraph_for_focused_residue_pair (core::pose::Pose &pose, core::scoring::ScoreFunction const &sfxn, core::Size res1_index, core::Size res2_index, core::optimization::MinimizerMapOP &minimizer_map, core::scoring::MinimizationGraphOP &mingraph) |
core::Real | gradient_magnitude_for_conformation (core::pose::Pose &pose, core::scoring::ScoreFunction const &sfxn, core::Size res1_index, core::Size res2_index, core::optimization::MinimizerMapOP &minimizer_map, core::scoring::MinimizationGraphOP &mingraph) |
bool | determine_if_at_local_minimum_analytic (core::pose::Pose &pose, core::scoring::ScoreFunction const &sfxn, protocols::toolbox::match_enzdes_util::ExternalGeomSamplerCOP exgeom, HTReal const &launch, core::Size res1_index, core::Size res2_index, utility::LexicographicalIterator const &lex, protocols::toolbox::match_enzdes_util::LigandConformer const &res1_geom, core::optimization::MinimizerMapOP minimizer_map, core::scoring::MinimizationGraphOP mingraph, core::Real &score) |
bool | same_coordinates (core::conformation::Residue const &r1, core::conformation::Residue const &r2, core::Real tolerance) |
std::list< local_minimum > | trim_redundant_local_minima (std::list< local_minimum > const &input_minima, core::Real tolerance) |
void | output_local_minima (core::pose::Pose &pose, std::list< local_minimum > &local_minima, std::string const &acc3let, std::string const &don3let, core::Size res1_index) |
void | sweep_params_from_match_constraint_file (utility::sql_database::sessionOP db_session, core::scoring::ScoreFunction const &sfxn, std::string const &cst_fname) |
int | main (int argc, char *argv[]) |
core::Real build_and_score_res1_against_res2 | ( | core::pose::Pose & | pose, |
core::scoring::ScoreFunction const & | sfxn, | ||
HTReal const & | htend, | ||
core::Size | res1_index, | ||
core::Size | res2_index, | ||
protocols::toolbox::match_enzdes_util::LigandConformer const & | res1_geom | ||
) |
References create_a3b_hbs::ii, beta_nonlocal::pose, score_residue_pair(), and test.T120_core::sfxn.
Referenced by determine_if_at_local_minimum_analytic(), and determine_if_at_local_minimum_numeric().
hbgeoms_to_measure create_fullcoverage_hbgeoms_to_measure | ( | core::pose::Pose const & | pose, |
protocols::toolbox::match_enzdes_util::MatchConstraintFileInfo const & | mcfi, | ||
core::Size | acc_id, | ||
core::Size | don_id | ||
) |
assumes that the geometry is specified between the donor and the acceptor; this is not necessarily true! FIX THIS so that the hbond geometry can be defined independently of the mat
References hbgeom_to_measure::hbgeoms_, beta_nonlocal::pose, hbgeom_to_measure::r1atind, and hbgeom_to_measure::r2atind.
Referenced by sweep_params_from_match_constraint_file().
void create_mingraph_for_focused_residue_pair | ( | core::pose::Pose & | pose, |
core::scoring::ScoreFunction const & | sfxn, | ||
core::Size | res1_index, | ||
core::Size | res2_index, | ||
core::optimization::MinimizerMapOP & | minimizer_map, | ||
core::scoring::MinimizationGraphOP & | mingraph | ||
) |
References beta_nonlocal::mm, beta_nonlocal::pose, and test.T120_core::sfxn.
Referenced by sweep_params_from_match_constraint_file().
void create_schema | ( | utility::sql_database::sessionOP | db_session | ) |
bool determine_if_at_local_minimum_analytic | ( | core::pose::Pose & | pose, |
core::scoring::ScoreFunction const & | sfxn, | ||
protocols::toolbox::match_enzdes_util::ExternalGeomSamplerCOP | exgeom, | ||
HTReal const & | launch, | ||
core::Size | res1_index, | ||
core::Size | res2_index, | ||
utility::LexicographicalIterator const & | lex, | ||
protocols::toolbox::match_enzdes_util::LigandConformer const & | res1_geom, | ||
core::optimization::MinimizerMapOP | minimizer_map, | ||
core::scoring::MinimizationGraphOP | mingraph, | ||
core::Real & | score | ||
) |
bool determine_if_at_local_minimum_numeric | ( | core::pose::Pose & | pose, |
core::scoring::ScoreFunction const & | sfxn, | ||
protocols::toolbox::match_enzdes_util::ExternalGeomSamplerCOP | exgeom, | ||
HTReal const & | launch, | ||
core::Size | res1_index, | ||
core::Size | res2_index, | ||
utility::LexicographicalIterator const & | lex, | ||
protocols::toolbox::match_enzdes_util::LigandConformer const & | res1_geom, | ||
core::Real & | score | ||
) |
core::Real gradient_magnitude_for_conformation | ( | core::pose::Pose & | pose, |
core::scoring::ScoreFunction const & | sfxn, | ||
core::Size | res1_index, | ||
core::Size | res2_index, | ||
core::optimization::MinimizerMapOP & | minimizer_map, | ||
core::scoring::MinimizationGraphOP & | mingraph | ||
) |
References create_a3b_hbs::ii, beta_nonlocal::pose, and test.T120_core::sfxn.
Referenced by determine_if_at_local_minimum_analytic().
int main | ( | int | argc, |
char * | argv[] | ||
) |
References argv, basic::options::OptionKeys::chemical::chemical, create_schema(), test.T009_Exceptions::e, PREcst::fname, basic::database::get_db_session(), create_a3b_hbs::ii, basic::init(), in::file::l(), NEW_OPT, basic::options::option, option, beta_nonlocal::pose, basic::options::OptionKeys::frags::scoring::scoring, basic::database::set_cache_size(), test.T120_core::sfxn, sweep_params_from_match_constraint_file(), write_hbgeom_types_to_database(), and write_score_types_to_database().
void output_local_minima | ( | core::pose::Pose & | pose, |
std::list< local_minimum > & | local_minima, | ||
std::string const & | acc3let, | ||
std::string const & | don3let, | ||
core::Size | res1_index | ||
) |
References count, ObjexxFCL::format::I(), create_a3b_hbs::ii, natoms(), erraser_single_res_analysis::out, beta_nonlocal::pose, and trim_redundant_local_minima().
Referenced by sweep_params_from_match_constraint_file().
void populate_database_with_dummy_data | ( | utility::sql_database::sessionOP | db_session | ) |
A function to populate the database with fake data in order to write the R scripts that will be necessary to visualize the data that will be generated by this program.
References dist(), create_a3b_hbs::ii, beta_nonlocal::jj, max(), min(), numeric::constants::d::pi, ObjexxFCL::pow(), numeric::random::rg(), basic::database::safely_prepare_statement(), basic::database::safely_write_to_database(), and basic::options::OptionKeys::blivens::score_type.
bool same_coordinates | ( | core::conformation::Residue const & | r1, |
core::conformation::Residue const & | r2, | ||
core::Real | tolerance | ||
) |
core::Real score_residue_pair | ( | core::pose::Pose const & | pose, |
core::scoring::ScoreFunction const & | sfxn, | ||
core::Size const | res1_index, | ||
core::Size const | res2_index | ||
) |
References test.T200_Scoring::emap, beta_nonlocal::pose, and test.T120_core::sfxn.
Referenced by build_and_score_res1_against_res2().
void sweep_params_from_match_constraint_file | ( | utility::sql_database::sessionOP | db_session, |
core::scoring::ScoreFunction const & | sfxn, | ||
std::string const & | cst_fname | ||
) |
References utility::LexicographicalIterator::at_end(), utility::LexicographicalIterator::begin(), create_a3b_hbs::best_pose, create_a3b_hbs::best_score, basic::options::OptionKeys::chemical::chemical, count, utility::io::oc::cout, create_fullcoverage_hbgeoms_to_measure(), create_mingraph_for_focused_residue_pair(), determine_if_at_local_minimum_analytic(), test.T200_Scoring::emap, create_a3b_hbs::ii, utility::LexicographicalIterator::num_states_total(), basic::options::option, output_local_minima(), beta_nonlocal::pose, res, local_minimum::res1_conformation, erraser_analysis::res2, basic::options::OptionKeys::in::file::residue_type_set, create_a3b_hbs::score, local_minimum::score_, test.T120_core::sfxn, utility::to_string(), numeric::HomogeneousTransform< T >::walk_along_z(), write_new_respair_to_database(), and write_scores_and_hbond_geoms_to_database().
Referenced by main().
std::list< local_minimum > trim_redundant_local_minima | ( | std::list< local_minimum > const & | input_minima, |
core::Real | tolerance | ||
) |
References erraser_util::copy(), create_a3b_hbs::ii, beta_nonlocal::jj, same_coordinates(), and basic::options::OptionKeys::loops::ccd::tolerance.
Referenced by output_local_minima().
void write_AHD_to_db | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | conf_id, | ||
core::conformation::Residue const & | acc_res, | ||
core::conformation::Residue const & | don_res, | ||
core::Size | acc_ind, | ||
core::Size | hdon_ind, | ||
core::Size | don_ind | ||
) |
References numeric::angle_radians(), and write_hbgeom_to_db().
Referenced by write_hbgeoms_to_database().
void write_ahdist_to_db | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | conf_id, | ||
core::conformation::Residue const & | acc_res, | ||
core::conformation::Residue const & | don_res, | ||
core::Size | acc_ind, | ||
core::Size | hdon_ind | ||
) |
References dist(), and write_hbgeom_to_db().
Referenced by write_hbgeoms_to_database().
void write_BAH_to_db | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | conf_id, | ||
core::conformation::Residue const & | acc_res, | ||
core::conformation::Residue const & | don_res, | ||
core::Size | acc_base, | ||
core::Size | acc_ind, | ||
core::Size | hdon_ind | ||
) |
References numeric::angle_radians(), and write_hbgeom_to_db().
Referenced by write_hbgeoms_to_database().
void write_chi_to_db | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | conf_id, | ||
core::conformation::Residue const & | acc_res, | ||
core::conformation::Residue const & | don_res, | ||
core::Size | acc_base2, | ||
core::Size | acc_base, | ||
core::Size | acc_ind, | ||
core::Size | hdon_ind | ||
) |
References numeric::dihedral_radians(), and write_hbgeom_to_db().
Referenced by write_hbgeoms_to_database().
void write_hbgeom_to_db | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | conf_id, | ||
std::string const & | geom_name, | ||
core::Real | geometry | ||
) |
void write_hbgeom_types_to_database | ( | utility::sql_database::sessionOP | db_session | ) |
References basic::database::safely_prepare_statement(), and basic::database::safely_write_to_database().
Referenced by main().
void write_hbgeoms_to_database | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | conf_id, | ||
core::pose::Pose const & | pose, | ||
hbgeoms_to_measure const & | geoms, | ||
core::Size | res1ind, | ||
core::Size | res2ind | ||
) |
boost::uuids::uuid write_new_respair_to_database | ( | utility::sql_database::sessionOP | db_session, |
protocols::toolbox::match_enzdes_util::MatchConstraintFileInfo const & | mcfi | ||
) |
return the new respair_id uuid created by this insertion
References numeric::random::rg(), basic::database::safely_prepare_statement(), and basic::database::safely_write_to_database().
Referenced by sweep_params_from_match_constraint_file().
void write_respair_scores_to_database | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | conf_id, | ||
core::scoring::ScoreFunction const & | sfxn, | ||
core::pose::Pose & | pose, | ||
core::Size | res1ind, | ||
core::Size | res2ind | ||
) |
References test.T200_Scoring::emap, create_a3b_hbs::ii, beta_nonlocal::pose, basic::database::safely_prepare_statement(), basic::database::safely_write_to_database(), basic::options::OptionKeys::frags::scoring::scoring, and test.T120_core::sfxn.
Referenced by write_scores_and_hbond_geoms_to_database().
void write_score_types_to_database | ( | utility::sql_database::sessionOP | db_session | ) |
write to database all the score types possible; there may be overlap if this is called multiple times on a single database, (e.g. multiple invocations) so I'm using the "INSERT OR IGNORE" SQL statement. This code is basically a complete rip off of ScoreTypeFeatures::insert_score_type_rows
References enumerate_junctions::default, utility::sql_database::DatabaseMode::mysql, utility::sql_database::name_from_database_mode(), utility::sql_database::DatabaseMode::postgres, basic::database::safely_prepare_statement(), basic::database::safely_write_to_database(), basic::options::OptionKeys::blivens::score_type, basic::options::OptionKeys::frags::scoring::scoring, utility::sql_database::DatabaseMode::sqlite3, and utility_exit_with_message.
Referenced by main().
void write_scores_and_hbond_geoms_to_database | ( | utility::sql_database::sessionOP | db_session, |
boost::uuids::uuid const | respair_id, | ||
core::scoring::ScoreFunction const & | sfxn, | ||
core::pose::Pose & | pose, | ||
hbgeoms_to_measure const & | geoms, | ||
core::Size | res1ind, | ||
core::Size | res2ind | ||
) |