Rosetta
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::RealScoreMap
 

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, GridBaseOPMappingType
 

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

◆ MappingType

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

◆ ScoreMap

Constructor & Destructor Documentation

◆ GridSet() [1/2]

protocols::qsar::scoring_grid::GridSet::GridSet ( )
default

◆ GridSet() [2/2]

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

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

◆ ~GridSet()

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

Member Function Documentation

◆ add_grid()

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

◆ atom_score()

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_.

◆ average_score()

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

◆ chain() [1/2]

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

get ligand chain

References chain_.

◆ chain() [2/2]

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

◆ clone()

GridSetOP protocols::qsar::scoring_grid::GridSet::clone ( ) const

◆ deserialize()

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

deserialize the JSON object to a map.

References grids_.

◆ get_grid()

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

References grids_.

◆ get_grid_names()

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

get a list of grid names

References grids_.

◆ grid_scores() [1/3]

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

Referenced by grid_scores(), and total_score().

◆ grid_scores() [2/3]

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

◆ grid_scores() [3/3]

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_.

◆ has_grid()

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

◆ hash_fingerprint()

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

◆ is_in_grid() [1/3]

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_.

◆ is_in_grid() [2/3]

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_.

◆ is_in_grid() [3/3]

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

◆ is_normalization_enabled()

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

is normalization applied during scoring?

References norm_function_.

◆ is_qsar_map_attached()

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

is a qsar map attached to the grid manager?

References qsar_map_.

◆ make_new_grid()

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

◆ normalize() [1/2]

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

◆ normalize() [2/2]

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

◆ reinitialize()

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 core::conformation::membrane::center, chain_, grids_, resolution_, protocols::qsar::scoring_grid::TR(), and width_.

◆ resolution() [1/2]

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

get grid resoultion

References resolution_.

◆ resolution() [2/2]

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

◆ serialize()

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

serialize the current map to a JSON object.

References grids_.

◆ set_normalization_function()

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

◆ set_qsar_map()

void protocols::qsar::scoring_grid::GridSet::set_qsar_map ( qsarMapCOP  qsar_map)

set the qsar_map

References qsar_map_.

◆ size()

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

◆ total_score() [1/5]

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

◆ total_score() [2/5]

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

◆ total_score() [3/5]

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

◆ total_score() [4/5]

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

◆ total_score() [5/5]

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.

◆ width() [1/2]

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

get grid width

References width_.

◆ width() [2/2]

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

◆ write_grids()

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

◆ chain_

char protocols::qsar::scoring_grid::GridSet::chain_ = 'X'
private

◆ grid_weights_

std::map< std::string, core::Real > protocols::qsar::scoring_grid::GridSet::grid_weights_
private

◆ grids_

MappingType protocols::qsar::scoring_grid::GridSet::grids_
private

◆ norm_function_

ScoreNormalizationCOP protocols::qsar::scoring_grid::GridSet::norm_function_
private

◆ qsar_map_

qsar::qsarMapCOP protocols::qsar::scoring_grid::GridSet::qsar_map_
private

◆ resolution_

core::Real protocols::qsar::scoring_grid::GridSet::resolution_ = 0.25
private

◆ width_

core::Real protocols::qsar::scoring_grid::GridSet::width_ = 40
private

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