![]() |
Rosetta Protocols
2014.35
|
#include <GridManager.hh>
Public Member Functions | |
void | reset () |
reset GridManager to the default settings More... | |
void | set_width (core::Real width) |
set width (must be done before initialization) More... | |
void | set_resolution (core::Real resolution) |
set resolution (must be done before initialization) More... | |
void | set_normalization_function (std::string norm_function_name) |
set normalization function More... | |
void | set_chain (char chain) |
set ligand chain (must be done before initialization) More... | |
void | make_new_grid (utility::tag::TagCOP tag) |
make a new grid from grid tag, and insert it into the grid manager More... | |
void | insert_grid (std::string const name, GridBaseOP const grid) |
insert a grid pointer into the grid manager More... | |
void | set_qsar_map (qsarMapOP qsar_map) |
set the qsar_map More... | |
bool | is_qsar_map_attached () |
is a qsar map attached to the grid manager? More... | |
bool | is_normalization_enabled () |
is normalization applied during scoring? More... | |
GridBaseOP | get_grid (std::string const &grid_name) |
given a grid type, return a pointer to the grid More... | |
utility::vector1< std::string > | get_grid_names () |
get a list of grid names More... | |
core::Real | total_score (core::conformation::UltraLightResidue const &residue) |
return the total score of a residue on the grid More... | |
core::Real | total_score (core::conformation::Residue const &residue) |
return the total score of a residue on the grid More... | |
core::Real | total_score (core::pose::Pose const &pose, core::Size const chain_id) |
return the total score of a chain on the grid More... | |
std::map< std::string, core::Real > | atom_score (core::pose::Pose const &pose, core::conformation::Residue const &residue, core::Size atomindex) |
get a map of scoring terms and scores for each term given a residue and atom number More... | |
void | update_grids (core::pose::Pose const &pose, core::Vector const ¢er, core::Size const &ligand_chain_id_to_exclude) |
recalculate all grids for a pose. This must be called if the backbone or sidechain conformations change! More... | |
void | update_grids (core::pose::Pose const &pose, core::Vector const ¢er, utility::vector1< core::Size > ligand_chain_ids_to_exclude) |
recalculate all grids for a pose. This must be called if the backbone or sidechain conformations change! More... | |
void | update_grids (core::pose::Pose const &pose, core::Vector const ¢er) |
recalculate all grids for a pose. This must be called if the backbone or sidechain conformations change! More... | |
void | initialize_all_grids (core::Vector const ¢er) |
initialize all grids and fill with 0s given a center point More... | |
core::Size | size () |
return the number of grids in the manager More... | |
ScoreMap | get_cached_scores () |
get a map of cached scores More... | |
void | append_cached_scores (jd2::JobOP job) |
append all cached scores to a current job More... | |
void | write_grids (std::string prefix) |
write all grids out using the BRIX format More... | |
bool | is_in_grid (core::conformation::UltraLightResidue const &residue) |
check to see if all atoms in the ligand are in the grid More... | |
bool | is_in_grid (core::conformation::Residue const &residue) |
check to see if all atoms in the ligand are in the grid More... | |
Static Public Member Functions | |
static GridManager * | get_instance () |
static function to get the instance of ( pointer to) this singleton class More... | |
Private Member Functions | |
GridManager () | |
GridManager (GridManager const &) | |
GridManager const & | operator= (GridManager const &) |
utility::json_spirit::Value | serialize () |
serialize the current map to a JSON object. There is no public interface for this because the grid manager takes care of it on its own More... | |
void | deserialize (utility::json_spirit::mArray data) |
deserialize the JSON object to a map. There is no public interface for this because the grid manager takes care of it on its own More... | |
Static Private Member Functions | |
static GridManager * | create_singleton_instance () |
private singleton creation function to be used with utility::thread::threadsafe_singleton More... | |
Private Attributes | |
std::map< std::string, GridMap > | grid_map_cache_ |
std::map< std::string, core::Real > | grid_weights_ |
GridMap | grid_map_ |
ScoreMap | score_map_ |
std::string | last_tag_ |
core::Real | width_ |
core::Real | resolution_ |
qsar::qsarMapOP | qsar_map_ |
bool | initialized_ |
char | chain_ |
ScoreNormalizationOP | norm_function_ |
Static Private Attributes | |
static GridManager * | instance_ |
|
private |
References grid_map_, and score_map_.
Referenced by create_singleton_instance().
|
private |
void protocols::qsar::scoring_grid::GridManager::append_cached_scores | ( | jd2::JobOP | job | ) |
append all cached scores to a current job
References protocols::jd2::Job::add_string_real_pair(), score, score_map_, and total_score().
Referenced by protocols::qsar::qsarMover::apply().
std::map< std::string, core::Real > protocols::qsar::scoring_grid::GridManager::atom_score | ( | core::pose::Pose const & | pose, |
core::conformation::Residue const & | residue, | ||
core::Size | atomindex | ||
) |
get a map of scoring terms and scores for each term given a residue and atom number
References grid_map_, grid_weights_, qsar_map_, and weight.
Referenced by protocols::features::ResidueGridScoresFeatures::report_features().
|
staticprivate |
private singleton creation function to be used with utility::thread::threadsafe_singleton
References GridManager().
Referenced by get_instance().
|
private |
deserialize the JSON object to a map. There is no public interface for this because the grid manager takes care of it on its own
References protocols::qsar::scoring_grid::GridFactory::get_instance(), grid, and grid_map_.
Referenced by update_grids().
ScoreMap protocols::qsar::scoring_grid::GridManager::get_cached_scores | ( | ) |
get a map of cached scores
References score_map_.
Referenced by protocols::ligand_docking::append_ligand_grid_scores(), and protocols::qsar::qsarMover::apply().
GridBaseOP protocols::qsar::scoring_grid::GridManager::get_grid | ( | std::string const & | grid_name | ) |
given a grid type, return a pointer to the grid
References grid_map_.
Referenced by protocols::qsar::qsarMover::apply(), and protocols::qsar::RenderGridsToKinemage::parse_my_tag().
utility::vector1< std::string > protocols::qsar::scoring_grid::GridManager::get_grid_names | ( | ) |
get a list of grid names
References grid_map_.
|
static |
static function to get the instance of ( pointer to) this singleton class
References create_singleton_instance(), instance_, and utility::thread::safely_create_singleton().
Referenced by protocols::ligand_docking::InterfaceScoreCalculator::append_ligand_docking_scores(), protocols::ligand_docking::append_ligand_grid_scores(), protocols::qsar::qsarMover::apply(), protocols::qsar::scoring_grid::GridInitMover::apply(), protocols::ligand_docking::Translate::apply(), protocols::ligand_docking::Rotate::apply(), protocols::ligand_docking::Transform::apply(), protocols::qsar::scoring_grid::ScoringGridLoader::load_data(), protocols::qsar::RenderGridsToKinemage::parse_my_tag(), protocols::features::ResidueGridScoresFeatures::report_features(), and protocols::ligand_docking::Translate::translate_ligand().
void protocols::qsar::scoring_grid::GridManager::initialize_all_grids | ( | core::Vector const & | center | ) |
initialize all grids and fill with 0s given a center point
References grid_map_, initialized_, resolution_, utility_exit_with_message, and width_.
Referenced by protocols::ligand_docking::append_ligand_grid_scores(), protocols::qsar::qsarMover::apply(), protocols::qsar::scoring_grid::GridInitMover::apply(), protocols::ligand_docking::Translate::apply(), protocols::ligand_docking::Transform::apply(), and protocols::features::ResidueGridScoresFeatures::report_features().
void protocols::qsar::scoring_grid::GridManager::insert_grid | ( | std::string const | name, |
GridBaseOP const | grid | ||
) |
bool protocols::qsar::scoring_grid::GridManager::is_in_grid | ( | core::conformation::UltraLightResidue const & | residue | ) |
check to see if all atoms in the ligand are in the grid
References grid_map_.
Referenced by protocols::ligand_docking::Transform::apply().
bool protocols::qsar::scoring_grid::GridManager::is_in_grid | ( | core::conformation::Residue const & | residue | ) |
check to see if all atoms in the ligand are in the grid
References grid_map_.
bool protocols::qsar::scoring_grid::GridManager::is_normalization_enabled | ( | ) |
is normalization applied during scoring?
References norm_function_.
bool protocols::qsar::scoring_grid::GridManager::is_qsar_map_attached | ( | ) |
is a qsar map attached to the grid manager?
References qsar_map_.
void protocols::qsar::scoring_grid::GridManager::make_new_grid | ( | utility::tag::TagCOP | tag | ) |
make a new grid from grid tag, and insert it into the grid manager
References protocols::qsar::scoring_grid::GridFactory::get_instance(), grid_map_, grid_weights_, protocols::qsar::scoring_grid::GridManagerTracer, insert_grid(), and weight.
Referenced by protocols::qsar::scoring_grid::ScoringGridLoader::load_data().
|
private |
void protocols::qsar::scoring_grid::GridManager::reset | ( | void | ) |
reset GridManager to the default settings
References chain_, grid_map_, initialized_, last_tag_, norm_function_, qsar_map_, resolution_, score_map_, and width_.
|
private |
serialize the current map to a JSON object. There is no public interface for this because the grid manager takes care of it on its own
References grid, and grid_map_.
Referenced by update_grids().
void protocols::qsar::scoring_grid::GridManager::set_chain | ( | char | chain | ) |
set ligand chain (must be done before initialization)
References chain_.
Referenced by protocols::qsar::scoring_grid::ScoringGridLoader::load_data().
void protocols::qsar::scoring_grid::GridManager::set_normalization_function | ( | std::string | norm_function_name | ) |
set normalization function
References protocols::qsar::scoring_grid::get_score_normalization_function(), and norm_function_.
Referenced by protocols::qsar::scoring_grid::ScoringGridLoader::load_data().
void protocols::qsar::scoring_grid::GridManager::set_qsar_map | ( | qsarMapOP | qsar_map | ) |
void protocols::qsar::scoring_grid::GridManager::set_resolution | ( | core::Real | resolution | ) |
set resolution (must be done before initialization)
References resolution_.
Referenced by protocols::qsar::scoring_grid::ScoringGridLoader::load_data().
void protocols::qsar::scoring_grid::GridManager::set_width | ( | core::Real | width | ) |
set width (must be done before initialization)
References width_.
Referenced by protocols::qsar::scoring_grid::ScoringGridLoader::load_data().
core::Size protocols::qsar::scoring_grid::GridManager::size | ( | ) |
return the number of grids in the manager
References grid_map_.
Referenced by protocols::ligand_docking::append_ligand_grid_scores(), protocols::ligand_docking::Translate::apply(), protocols::ligand_docking::Rotate::apply(), and protocols::features::ResidueGridScoresFeatures::report_features().
core::Real protocols::qsar::scoring_grid::GridManager::total_score | ( | core::conformation::UltraLightResidue const & | residue | ) |
return the total score of a residue on the grid
References grid_map_, protocols::qsar::scoring_grid::GridManagerTracer, norm_function_, qsar_map_, core::conformation::UltraLightResidue::residue(), and score_map_.
Referenced by append_cached_scores(), protocols::ligand_docking::append_ligand_grid_scores(), protocols::qsar::qsarMover::apply(), protocols::ligand_docking::Transform::apply(), total_score(), and protocols::ligand_docking::Translate::translate_ligand().
core::Real protocols::qsar::scoring_grid::GridManager::total_score | ( | core::conformation::Residue const & | residue | ) |
return the total score of a residue on the grid
References grid_map_, protocols::qsar::scoring_grid::GridManagerTracer, norm_function_, qsar_map_, score_map_, and total_score().
core::Real protocols::qsar::scoring_grid::GridManager::total_score | ( | core::pose::Pose const & | pose, |
core::Size const | chain_id | ||
) |
return the total score of a chain on the grid
References core::pose::get_chain_residues(), grid_map_, grid_weights_, protocols::qsar::scoring_grid::GridManagerTracer, norm_function_, qsar_map_, residue, score_map_, total_score(), and weight.
void protocols::qsar::scoring_grid::GridManager::update_grids | ( | core::pose::Pose const & | pose, |
core::Vector const & | center, | ||
core::Size const & | ligand_chain_id_to_exclude | ||
) |
recalculate all grids for a pose. This must be called if the backbone or sidechain conformations change!
References chain_, grid_map_, resolution_, and width_.
Referenced by protocols::ligand_docking::append_ligand_grid_scores(), protocols::qsar::qsarMover::apply(), protocols::qsar::scoring_grid::GridInitMover::apply(), protocols::ligand_docking::Translate::apply(), protocols::ligand_docking::Transform::apply(), and protocols::features::ResidueGridScoresFeatures::report_features().
void protocols::qsar::scoring_grid::GridManager::update_grids | ( | core::pose::Pose const & | pose, |
core::Vector const & | center, | ||
utility::vector1< core::Size > | ligand_chain_ids_to_exclude | ||
) |
recalculate all grids for a pose. This must be called if the backbone or sidechain conformations change!
References chain_, grid_map_, resolution_, and width_.
void protocols::qsar::scoring_grid::GridManager::update_grids | ( | core::pose::Pose const & | pose, |
core::Vector const & | center | ||
) |
recalculate all grids for a pose. This must be called if the backbone or sidechain conformations change!
References chain_, utility::io::ozstream::close(), deserialize(), utility::file::file_delete(), utility::file::file_exists(), utility::json_spirit::Value_impl< Config >::get_array(), core::pose::get_sha1_hash_excluding_chain(), basic::options::OptionKeys::qsar::grid_dir, grid_map_, grid_map_cache_, protocols::qsar::scoring_grid::GridManagerTracer, basic::options::OptionKeys::qsar::max_grid_cache_size, basic::options::option, utility::json_spirit::read(), resolution_, serialize(), user, utility_exit_with_message, width_, and utility::json_spirit::write().
void protocols::qsar::scoring_grid::GridManager::write_grids | ( | std::string | prefix | ) |
write all grids out using the BRIX format
References grid_map_.
|
private |
Referenced by reset(), set_chain(), and update_grids().
|
private |
|
private |
Referenced by update_grids().
|
private |
Referenced by atom_score(), make_new_grid(), and total_score().
|
private |
Referenced by initialize_all_grids(), and reset().
|
staticprivate |
Referenced by get_instance().
|
private |
Referenced by reset().
|
private |
Referenced by is_normalization_enabled(), reset(), set_normalization_function(), and total_score().
|
private |
Referenced by atom_score(), is_qsar_map_attached(), reset(), set_qsar_map(), and total_score().
|
private |
Referenced by initialize_all_grids(), reset(), set_resolution(), and update_grids().
|
private |
Referenced by append_cached_scores(), get_cached_scores(), GridManager(), reset(), and total_score().
|
private |
Referenced by initialize_all_grids(), reset(), set_width(), and update_grids().