Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
protocols::qsar::scoring_grid::GridSet Class Reference

A set of related grids. More...

#include <GridSet.hh>

Inheritance diagram for protocols::qsar::scoring_grid::GridSet:
Inheritance graph
[legend]

Public Types

typedef std::map< std::string,
core::Real
ScoreMap
 

Public Member Functions

 GridSet ()
 
 GridSet (GridSet const &src)
 
 ~GridSet () override
 
GridSetOP clone () const
 
void width (core::Real width)
 set width (must be done before initialization) More...
 
void resolution (core::Real resolution)
 set resolution (must be done before initialization) More...
 
void chain (char chain)
 set ligand chain (must be done before initialization) More...
 
core::Real width () const
 get grid width More...
 
core::Real resolution () const
 get grid resoultion More...
 
char chain () const
 get ligand chain More...
 
void set_normalization_function (std::string norm_function_name)
 set normalization function More...
 
bool is_normalization_enabled () const
 is normalization applied during scoring? More...
 
void set_qsar_map (qsarMapCOP qsar_map)
 set the qsar_map More...
 
bool is_qsar_map_attached () const
 is a qsar map attached to the grid manager? More...
 
void reinitialize (core::pose::Pose const &pose, core::Vector const &center)
 Reinitialize the included grids with the given information. More...
 
GridBaseCOP get_grid (std::string const &name) const
 
void add_grid (std::string const &name, GridBaseOP grid, core::Real weight=1.0)
 Add a grid to the GridSet under the given name. More...
 
void make_new_grid (utility::tag::TagCOP tag)
 make a new grid from grid tag, and insert it into the grid manager More...
 
bool has_grid (std::string const &name) const
 Returns true if we already have a grid with the given name. More...
 
utility::vector1< std::string > get_grid_names () const
 get a list of grid names More...
 
core::Size size () const
 return the number of grids More...
 
core::Real average_score (utility::vector1< core::conformation::UltraLightResidue > &residues) const
 return the average score of multiple residues on the grid More...
 
core::Real total_score (core::conformation::UltraLightResidue const &residue) const
 return the total score of a residue on the grid More...
 
core::Real total_score (core::conformation::Residue const &residue) const
 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) const
 return the total score of a chain on the grid More...
 
core::Real total_score (core::pose::Pose const &pose, utility::vector1< core::Size > const &residues) const
 return the total score for a set of residues on the grid More...
 
ScoreMap grid_scores (core::conformation::Residue const &residue) const
 
ScoreMap grid_scores (core::pose::Pose const &pose, utility::vector1< core::Size > const &residues) const
 
ScoreMap atom_score (core::pose::Pose const &pose, core::conformation::Residue const &residue, core::Size atomindex) const
 get a map of (unweighted, unnormalized) scoring terms and scores for each term given a residue and atom number More...
 
bool is_in_grid (utility::vector1< core::conformation::UltraLightResidue > const &residues) const
 check if all atoms in all the ligands are in grid More...
 
bool is_in_grid (core::conformation::UltraLightResidue const &residue) const
 check to see if all atoms in the ligand are in the grid More...
 
bool is_in_grid (core::conformation::Residue const &residue) const
 check to see if all atoms in the ligand are in the grid More...
 
std::string hash_fingerprint () const
 Return a string representing the settings of this GridSet. More...
 
void write_grids (std::string prefix) const
 write all grids out using the BRIX format More...
 
utility::json_spirit::Value serialize () const
 serialize the current map to a JSON object. More...
 
void deserialize (utility::json_spirit::mArray data)
 deserialize the JSON object to a map. More...
 

Private Types

typedef std::map< std::string,
GridBaseOP
MappingType
 

Private Member Functions

template<class GridScorable >
core::Real total_score (utility::vector1< GridScorable const * > const &items) const
 Return a single weighted, normalized score for all items Templated to allow for common implementation between Residue and UltraLightResidue. More...
 
core::Real normalize (core::Real total_score, utility::vector1< core::conformation::UltraLightResidue const * > const &items) const
 Normalize a score based on the passed items;. More...
 
core::Real normalize (core::Real total_score, utility::vector1< core::conformation::Residue const * > const &items) const
 Normalize a score based on the passed items;. More...
 
template<class GridScorable >
ScoreMap grid_scores (utility::vector1< GridScorable const * > const &items) const
 Return a map of summed unweighted, unormalized scores for each grid. Templated to allow for common implementation between Residue and UltraLightResidue. More...
 

Private Attributes

MappingType grids_
 
std::map< std::string, core::Realgrid_weights_
 
core::Real width_ = 40
 
core::Real resolution_ = 0.25
 
char chain_ = 'X'
 
qsar::qsarMapCOP qsar_map_
 
ScoreNormalizationCOP norm_function_
 

Detailed Description

A set of related grids.

Member Typedef Documentation

typedef std::map<std::string,GridBaseOP> protocols::qsar::scoring_grid::GridSet::MappingType
private

Constructor & Destructor Documentation

protocols::qsar::scoring_grid::GridSet::GridSet ( )
default
protocols::qsar::scoring_grid::GridSet::GridSet ( GridSet const &  src)

References grids_, and core::scoring::pair.

protocols::qsar::scoring_grid::GridSet::~GridSet ( )
overridedefault

Member Function Documentation

void protocols::qsar::scoring_grid::GridSet::add_grid ( std::string const &  name,
GridBaseOP  grid,
core::Real  weight = 1.0 
)

Add a grid to the GridSet under the given name.

References grid_weights_, and grids_.

Referenced by make_new_grid().

GridSet::ScoreMap protocols::qsar::scoring_grid::GridSet::atom_score ( core::pose::Pose const &  pose,
core::conformation::Residue const &  residue,
core::Size  atomindex 
) const

get a map of (unweighted, unnormalized) scoring terms and scores for each term given a residue and atom number

References grid_weights_, grids_, and qsar_map_.

core::Real protocols::qsar::scoring_grid::GridSet::average_score ( utility::vector1< core::conformation::UltraLightResidue > &  residues) const

return the average score of multiple residues on the grid

References protocols::hybridization::score, and total_score().

void protocols::qsar::scoring_grid::GridSet::chain ( char  chain)
inline

set ligand chain (must be done before initialization)

References chain(), and chain_.

Referenced by chain().

char protocols::qsar::scoring_grid::GridSet::chain ( ) const
inline

get ligand chain

References chain_.

GridSetOP protocols::qsar::scoring_grid::GridSet::clone ( ) const
void protocols::qsar::scoring_grid::GridSet::deserialize ( utility::json_spirit::mArray  data)

deserialize the JSON object to a map.

References grids_.

GridBaseCOP protocols::qsar::scoring_grid::GridSet::get_grid ( std::string const &  name) const

References grids_.

utility::vector1< std::string > protocols::qsar::scoring_grid::GridSet::get_grid_names ( ) const

get a list of grid names

References grids_.

GridSet::ScoreMap protocols::qsar::scoring_grid::GridSet::grid_scores ( core::conformation::Residue const &  residue) const

Referenced by grid_scores(), and total_score().

GridSet::ScoreMap protocols::qsar::scoring_grid::GridSet::grid_scores ( core::pose::Pose const &  pose,
utility::vector1< core::Size > const &  residues 
) const
template<class GridScorable >
GridSet::ScoreMap protocols::qsar::scoring_grid::GridSet::grid_scores ( utility::vector1< GridScorable const * > const &  items) const
private

Return a map of summed unweighted, unormalized scores for each grid. Templated to allow for common implementation between Residue and UltraLightResidue.

Yes, raw pointer. This is for speed reasons (don't have to copy objects) and because this is a class-internal implementation detail. Do not publically expose this interface.

References grids_, and qsar_map_.

bool protocols::qsar::scoring_grid::GridSet::has_grid ( std::string const &  name) const

Returns true if we already have a grid with the given name.

References grids_.

Referenced by make_new_grid().

std::string protocols::qsar::scoring_grid::GridSet::hash_fingerprint ( ) const

Return a string representing the settings of this GridSet.

This should encapsulate everything that doesn't change with a call to reinitialize() The string is not meant to be interpretable.

References chain_, grid_weights_, grids_, norm_function_, core::scoring::pair, qsar_map_, resolution_, and width_.

Referenced by protocols::qsar::scoring_grid::GridManager::compute_hash().

bool protocols::qsar::scoring_grid::GridSet::is_in_grid ( utility::vector1< core::conformation::UltraLightResidue > const &  residues) const

check if all atoms in all the ligands are in grid

bool protocols::qsar::scoring_grid::GridSet::is_in_grid ( core::conformation::UltraLightResidue const &  residue) const

check to see if all atoms in the ligand are in the grid

References grids_.

bool protocols::qsar::scoring_grid::GridSet::is_in_grid ( core::conformation::Residue const &  residue) const

check to see if all atoms in the ligand are in the grid

References grids_.

bool protocols::qsar::scoring_grid::GridSet::is_normalization_enabled ( ) const

is normalization applied during scoring?

References norm_function_.

bool protocols::qsar::scoring_grid::GridSet::is_qsar_map_attached ( ) const

is a qsar map attached to the grid manager?

References qsar_map_.

void protocols::qsar::scoring_grid::GridSet::make_new_grid ( utility::tag::TagCOP  tag)

make a new grid from grid tag, and insert it into the grid manager

References add_grid(), has_grid(), and protocols::qsar::scoring_grid::TR().

core::Real protocols::qsar::scoring_grid::GridSet::normalize ( core::Real  total_score,
utility::vector1< core::conformation::UltraLightResidue const * > const &  items 
) const
private

Normalize a score based on the passed items;.

Yes, raw pointer. This is to interface with the other functions. Do not publically expose this interface.

References norm_function_, protocols::hybridization::score, and protocols::qsar::scoring_grid::TR().

Referenced by total_score().

core::Real protocols::qsar::scoring_grid::GridSet::normalize ( core::Real  total_score,
utility::vector1< core::conformation::Residue const * > const &  items 
) const
private

Normalize a score based on the passed items;.

Yes, raw pointer. This is to interface with the other functions. Do not publically expose this interface.

References norm_function_, protocols::hybridization::score, and protocols::qsar::scoring_grid::TR().

void protocols::qsar::scoring_grid::GridSet::reinitialize ( core::pose::Pose const &  pose,
core::Vector const &  center 
)

Reinitialize the included grids with the given information.

References chain_, grids_, resolution_, protocols::qsar::scoring_grid::TR(), and width_.

void protocols::qsar::scoring_grid::GridSet::resolution ( core::Real  resolution)
inline

set resolution (must be done before initialization)

References resolution(), and resolution_.

Referenced by resolution().

core::Real protocols::qsar::scoring_grid::GridSet::resolution ( ) const
inline

get grid resoultion

References resolution_.

utility::json_spirit::Value protocols::qsar::scoring_grid::GridSet::serialize ( ) const

serialize the current map to a JSON object.

References grids_.

void protocols::qsar::scoring_grid::GridSet::set_normalization_function ( std::string  norm_function_name)
void protocols::qsar::scoring_grid::GridSet::set_qsar_map ( qsarMapCOP  qsar_map)

set the qsar_map

References qsar_map_.

core::Size protocols::qsar::scoring_grid::GridSet::size ( ) const

return the number of grids

References grids_.

Referenced by protocols::ligand_docking::get_ligand_grid_scores().

core::Real protocols::qsar::scoring_grid::GridSet::total_score ( core::conformation::UltraLightResidue const &  residue) const

return the total score of a residue on the grid

Referenced by average_score(), and total_score().

core::Real protocols::qsar::scoring_grid::GridSet::total_score ( core::conformation::Residue const &  residue) const

return the total score of a residue on the grid

References total_score().

core::Real protocols::qsar::scoring_grid::GridSet::total_score ( core::pose::Pose const &  pose,
core::Size const  chain_id 
) const

return the total score of a chain on the grid

References core::pose::get_resnums_for_chain_id(), and total_score().

core::Real protocols::qsar::scoring_grid::GridSet::total_score ( core::pose::Pose const &  pose,
utility::vector1< core::Size > const &  residues 
) const

return the total score for a set of residues on the grid

References core::pose::Pose::residue(), and total_score().

template<class GridScorable >
core::Real protocols::qsar::scoring_grid::GridSet::total_score ( utility::vector1< GridScorable const * > const &  items) const
private

Return a single weighted, normalized score for all items Templated to allow for common implementation between Residue and UltraLightResidue.

Yes, raw pointer. This is for speed reasons (don't have to copy objects) and because this is a class-internal implementation detail. Do not publically expose this interface.

References grid_scores(), grid_weights_, norm_function_, normalize(), and protocols::hybridization::score.

void protocols::qsar::scoring_grid::GridSet::width ( core::Real  width)
inline

set width (must be done before initialization)

References width(), and width_.

Referenced by width().

core::Real protocols::qsar::scoring_grid::GridSet::width ( ) const
inline

get grid width

References width_.

void protocols::qsar::scoring_grid::GridSet::write_grids ( std::string  prefix) const

write all grids out using the BRIX format

References grids_.

Member Data Documentation

char protocols::qsar::scoring_grid::GridSet::chain_ = 'X'
private
std::map< std::string, core::Real > protocols::qsar::scoring_grid::GridSet::grid_weights_
private
MappingType protocols::qsar::scoring_grid::GridSet::grids_
private
ScoreNormalizationCOP protocols::qsar::scoring_grid::GridSet::norm_function_
private
qsar::qsarMapCOP protocols::qsar::scoring_grid::GridSet::qsar_map_
private
core::Real protocols::qsar::scoring_grid::GridSet::resolution_ = 0.25
private
core::Real protocols::qsar::scoring_grid::GridSet::width_ = 40
private

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