Rosetta Protocols  2014.35
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
protocols::qsar::scoring_grid::GridManager Class Reference

#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::stringget_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::Realatom_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 &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! More...
 
void 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! More...
 
void 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! More...
 
void initialize_all_grids (core::Vector const &center)
 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 GridManagerget_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 GridManagercreate_singleton_instance ()
 private singleton creation function to be used with utility::thread::threadsafe_singleton More...
 

Private Attributes

std::map< std::string, GridMapgrid_map_cache_
 
std::map< std::string, core::Realgrid_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 GridManagerinstance_
 

Constructor & Destructor Documentation

protocols::qsar::scoring_grid::GridManager::GridManager ( )
private

References grid_map_, and score_map_.

Referenced by create_singleton_instance().

protocols::qsar::scoring_grid::GridManager::GridManager ( GridManager const &  )
private

Member Function Documentation

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

GridManager * protocols::qsar::scoring_grid::GridManager::create_singleton_instance ( )
staticprivate

private singleton creation function to be used with utility::thread::threadsafe_singleton

References GridManager().

Referenced by get_instance().

void protocols::qsar::scoring_grid::GridManager::deserialize ( utility::json_spirit::mArray  data)
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 ( )
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_.

GridManager * protocols::qsar::scoring_grid::GridManager::get_instance ( )
static
void protocols::qsar::scoring_grid::GridManager::initialize_all_grids ( core::Vector const &  center)
void protocols::qsar::scoring_grid::GridManager::insert_grid ( std::string const  name,
GridBaseOP const  grid 
)

insert a grid pointer into the grid manager

References grid_map_.

Referenced by make_new_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)
GridManager const& protocols::qsar::scoring_grid::GridManager::operator= ( GridManager const &  )
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_.

utility::json_spirit::Value protocols::qsar::scoring_grid::GridManager::serialize ( )
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)
void protocols::qsar::scoring_grid::GridManager::set_qsar_map ( qsarMapOP  qsar_map)

set the qsar_map

References qsar_map_.

Referenced by protocols::qsar::qsarMover::apply().

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 ( )
core::Real protocols::qsar::scoring_grid::GridManager::total_score ( core::conformation::UltraLightResidue const &  residue)
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 
)
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 
)
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 
)
void protocols::qsar::scoring_grid::GridManager::write_grids ( std::string  prefix)

write all grids out using the BRIX format

References grid_map_.

Member Data Documentation

char protocols::qsar::scoring_grid::GridManager::chain_
private

Referenced by reset(), set_chain(), and update_grids().

GridMap protocols::qsar::scoring_grid::GridManager::grid_map_
private
std::map<std::string,GridMap> protocols::qsar::scoring_grid::GridManager::grid_map_cache_
private

Referenced by update_grids().

std::map<std::string,core::Real> protocols::qsar::scoring_grid::GridManager::grid_weights_
private
bool protocols::qsar::scoring_grid::GridManager::initialized_
private

Referenced by initialize_all_grids(), and reset().

GridManager * protocols::qsar::scoring_grid::GridManager::instance_
staticprivate

Referenced by get_instance().

std::string protocols::qsar::scoring_grid::GridManager::last_tag_
private

Referenced by reset().

ScoreNormalizationOP protocols::qsar::scoring_grid::GridManager::norm_function_
private
qsar::qsarMapOP protocols::qsar::scoring_grid::GridManager::qsar_map_
private
core::Real protocols::qsar::scoring_grid::GridManager::resolution_
private
ScoreMap protocols::qsar::scoring_grid::GridManager::score_map_
private
core::Real protocols::qsar::scoring_grid::GridManager::width_
private

The documentation for this class was generated from the following files: