Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup Class Reference

MHCEpitopeEnergySetup, a helper class for the MHCEpitopeEnergy energy method that stores all of its setup data. More...

#include <MHCEpitopeEnergySetup.hh>

Inheritance diagram for core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup:
Inheritance graph
[legend]

Public Member Functions

 MHCEpitopeEnergySetup ()
 Default constructor for MHCEpitopeEnergySetup. More...
 
 ~MHCEpitopeEnergySetup () override
 Default destructor for MHCEpitopeEnergySetup. More...
 
virtual MHCEpitopeEnergySetupOP clone () const
 Clone: create a copy of this object, and return an owning pointer to the copy. More...
 
virtual bool operator== (MHCEpitopeEnergySetup const &) const
 
void reset ()
 Reset all data in this data storage object. More...
 
void initialize_from_file (std::string const &filename)
 Initialize from a .mhc file. More...
 
void initialize_from_file_contents (std::string const &filecontents)
 Initialize from a string in the format of a .mhc file. More...
 
std::string report () const
 Get a summary of the data stored in this object. More...
 
bool is_default () const
 Is is just the default, always-zero, predictor? More...
 
core::Size get_peptide_length () const
 How long are the peptides to be predicted? More...
 
core::Size get_overhang_length () const
 If the peptide has a core peptide plus overhangs, how many residues are in the overhangs (on both the N- and C-terminus)? More...
 
core::Real raw_score (std::string peptide) const
 The MHC epitope score for the peptide, as returned by the predictor. More...
 
core::Real xform (core::Real, core::Real) const
 Transform the MHC epitope score, as specified for this helper. More...
 
core::Real score (std::string peptide, core::Real native) const
 The xformed MHC epitope score, in a single step. More...
 
MHCEpitopePredictorOP get_predictor () const
 Getter for predictor_ (MHCEpitopePredictorOP) More...
 
bool get_relative () const
 Return whether using relative or absolute scoring. More...
 
bool get_apply_offset () const
 Return whether to apply an offset to the score. More...
 
bool get_relative_additive () const
 Return whether the relative score is in additive (true) or multiplicative (false) mode. More...
 
core::Real get_score_offset () const
 Return the score_offset_ value. More...
 

Private Member Functions

void setup_predictor (utility::vector1< std::string > const &lines)
 Parse the data from an mhc-format file, and create the appropriate MHCEpitopePredictor object. More...
 

Private Attributes

MHCEpitopePredictorOP predictor_
 
bool relative_ = false
 is the contribution computed just from the current score (!relative) or compared to the native score (relative) More...
 
bool apply_offset_ = false
 offset the score? More...
 
bool relative_additive_ = true
 if relative and offset, is the offset a value added to the native score (additive) or a factor times the native score (multiplicative / !additive) More...
 
core::Real score_offset_ = 0.0
 if apply_offset_, then scores below this value contribute 0; above this value, linearly More...
 

Detailed Description

MHCEpitopeEnergySetup, a helper class for the MHCEpitopeEnergy energy method that stores all of its setup data.

Constructor & Destructor Documentation

core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::MHCEpitopeEnergySetup ( )

Default constructor for MHCEpitopeEnergySetup.

core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::~MHCEpitopeEnergySetup ( )
overridedefault

Default destructor for MHCEpitopeEnergySetup.

Member Function Documentation

MHCEpitopeEnergySetupOP core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::clone ( ) const
virtual

Clone: create a copy of this object, and return an owning pointer to the copy.

bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::get_apply_offset ( ) const
inline

Return whether to apply an offset to the score.

References apply_offset_.

Referenced by operator==().

core::Size core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::get_overhang_length ( ) const
inline

If the peptide has a core peptide plus overhangs, how many residues are in the overhangs (on both the N- and C-terminus)?

For example, if we have a total peptide length of 15, with a core of 9 residues and overhangs of 3 residues on both sides, peptide_length_ should be 15 and overhang_length should be 3.

References predictor_.

core::Size core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::get_peptide_length ( ) const
inline

How long are the peptides to be predicted?

References predictor_.

MHCEpitopePredictorOP core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::get_predictor ( ) const
inline

Getter for predictor_ (MHCEpitopePredictorOP)

References predictor_.

bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::get_relative ( ) const
inline

Return whether using relative or absolute scoring.

References relative_.

Referenced by operator==().

bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::get_relative_additive ( ) const
inline

Return whether the relative score is in additive (true) or multiplicative (false) mode.

References relative_additive_.

Referenced by operator==().

core::Real core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::get_score_offset ( ) const
inline

Return the score_offset_ value.

References score_offset_.

Referenced by operator==().

void core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::initialize_from_file ( std::string const &  filename)
void core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::initialize_from_file_contents ( std::string const &  filecontents)

Initialize from a string in the format of a .mhc file.

Allows external code to initialize object without having it read directly from disk. Note however that the specs in the file may require subsequent disk reads depending on the type of predictor indicated.

References reset(), setup_predictor(), and core::scoring::mhc_epitope_energy::TR().

bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::is_default ( ) const
inline

Is is just the default, always-zero, predictor?

References predictor_.

Referenced by raw_score().

bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::operator== ( MHCEpitopeEnergySetup const &  other) const
virtual
core::Real core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::raw_score ( std::string  peptide) const

The MHC epitope score for the peptide, as returned by the predictor.

References is_default(), predictor_, and core::scoring::mhc_epitope_energy::TR().

Referenced by score().

std::string core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::report ( ) const

Get a summary of the data stored in this object.

References apply_offset_, predictor_, relative_, relative_additive_, and score_offset_.

Referenced by setup_predictor().

void core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::reset ( )

Reset all data in this data storage object.

Referenced by initialize_from_file(), and initialize_from_file_contents().

core::Real core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::score ( std::string  peptide,
core::Real  native 
) const
inline

The xformed MHC epitope score, in a single step.

References raw_score(), and xform().

void core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::setup_predictor ( utility::vector1< std::string > const &  lines)
private

Parse the data from an mhc-format file, and create the appropriate MHCEpitopePredictor object.

Generally speaking, Predictor creation will trigger disk reads to the appropriate database files.

Only call setup_predictor prior to packing trajectories to avoid triggering repeated disk reads.

References apply_offset_, protocols::abinitio::filename(), protocols::cluster::calibur::filetype(), core::scoring::nmer_pssm, core::scoring::nmer_svm, predictor_, relative_, relative_additive_, report(), score_offset_, core::scoring::mhc_epitope_energy::TR(), and xform().

Referenced by initialize_from_file(), and initialize_from_file_contents().

core::Real core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::xform ( core::Real  raw,
core::Real  native 
) const

Transform the MHC epitope score, as specified for this helper.

References apply_offset_, relative_, relative_additive_, and score_offset_.

Referenced by score(), and setup_predictor().

Member Data Documentation

bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::apply_offset_ = false
private

offset the score?

Referenced by get_apply_offset(), operator==(), report(), setup_predictor(), and xform().

MHCEpitopePredictorOP core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::predictor_
private
bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::relative_ = false
private

is the contribution computed just from the current score (!relative) or compared to the native score (relative)

Referenced by get_relative(), operator==(), report(), setup_predictor(), and xform().

bool core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::relative_additive_ = true
private

if relative and offset, is the offset a value added to the native score (additive) or a factor times the native score (multiplicative / !additive)

Referenced by get_relative_additive(), operator==(), report(), setup_predictor(), and xform().

core::Real core::scoring::mhc_epitope_energy::MHCEpitopeEnergySetup::score_offset_ = 0.0
private

if apply_offset_, then scores below this value contribute 0; above this value, linearly

Referenced by get_score_offset(), operator==(), report(), setup_predictor(), and xform().


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