Rosetta
Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::scoring::epr_deer::EPRSpinLabel Class Reference

#include <EPRSpinLabel.hh>

Public Member Functions

 EPRSpinLabel ()
 Constructor. More...
 
 ~EPRSpinLabel ()
 Destructor. More...
 
void init_vdw () const
 Initialize object used to calculate centroid clashes. More...
 
utility::vector1< PseudoSLread_db_file (std::string const &name)
 Read DB file for a given type of spin label. More...
 
utility::vector1< PseudoSL > & operator[] (PairSizeString const &res)
 Operator to return nnn-const PseudoSL from specific residue. More...
 
utility::vector1< PseudoSL > const & at (PairSizeString const &res) const
 Return const PseudoSL from specific residue. More...
 
std::map< Size, Realhistogram (utility::vector1< PairSizeString > const &residues, Size const &bins_per_a, int const &mod=0, Real const &stdev=1.0, std::map< Size, Real > const &dist_ids={})
 Returns histogram between coordinate sets for residues. More...
 
std::map< Size, Realhistogram (utility::vector1< PseudoSL > const &res1_coords, utility::vector1< PseudoSL > const &res2_coords, Size const &bins_per_a, int const &mod=0, Real const &stdev=1.0, std::map< Size, Real > const &dist_ids={})
 Return histogram for pair of coordinate sets. More...
 
std::map< Size, Realhistogram (PairSizeString const &res1, PairSizeString const &res2, Size const &bins_per_a, int const &mod=0, Real const &stdev=1.0, std::map< Size, Real > const &dist_ids={})
 Returns histogram between coordinate sets for residues. More...
 
void label (PairSizeString const &res_label, pose::Pose const &pose, bool const &skip_clash_eval=false)
 Label a residue with a certain spin label. More...
 
std::map< Size, Realnormalize (std::map< Size, Real > sim_map) const
 Normalize distribution so that the sum is equal to 1.0. More...
 
utility::vector1< PseudoSLcalc_sl_for_res (Size const &res, pose::Pose const &pose, utility::vector1< PseudoSL > const &sl_vec, bool const &skip_clash_eval=false, Real const &min_rad=0.0)
 Get positions of unpaired electrons at a residue. More...
 
Real weight (Size const &res1, numeric::xyzVector< core::Real > const &clash_xyz, Real w, pose::Pose const &pose, Real const &rad)
 retrieve weight for given coordinate More...
 
Real cutoff () const
 Getter for cutoff for weights. More...
 
void load_custom_electrons (std::map< Size, utility::vector1< PseudoSL > > const &all_coords)
 Allows a custom set of electrons to be read without superimposition. More...
 
void label_everything (pose::Pose &pose, utility::vector1< PairSizeString > const &residues, bool const &skip_clash_eval)
 Goes through every residue in provided list and calculates. More...
 

Private Member Functions

numeric::xyzVector< Realbulk (numeric::xyzVector< Real > const &coord, numeric::xyzVector< Real > const &cb) const
 Returns the center of mass between coordinate and CB. More...
 

Private Attributes

std::map< PairSizeString, utility::vector1< PseudoSL > > coords_
 Coordinates for each residue being stored. More...
 
std::map< Size, utility::vector1< PseudoSL > > custom_coords_
 Custom coordinates (residue-specific) More...
 
Real cutoff_ = 0.001
 Cutoff for clash evaluation. More...
 
std::string path_ = "scoring/epr_deer/"
 Path for files describing default PseudoSL objects to read. More...
 

Constructor & Destructor Documentation

◆ EPRSpinLabel()

core::scoring::epr_deer::EPRSpinLabel::EPRSpinLabel ( )

Constructor.

References init_vdw().

◆ ~EPRSpinLabel()

core::scoring::epr_deer::EPRSpinLabel::~EPRSpinLabel ( )

Destructor.

Member Function Documentation

◆ at()

utility::vector1< PseudoSL > const & core::scoring::epr_deer::EPRSpinLabel::at ( PairSizeString const &  res) const

Return const PseudoSL from specific residue.

Parameters
resResidue info (number and spin label type)
Returns
Coords corresponding to residue

References coords_.

◆ bulk()

numeric::xyzVector< Real > core::scoring::epr_deer::EPRSpinLabel::bulk ( numeric::xyzVector< Real > const &  coord,
numeric::xyzVector< Real > const &  cb 
) const
private

Returns the center of mass between coordinate and CB.

Parameters
coordCoordinate xyz
cbCB coordinate
Returns
XYZ of bulk / center of mass of nitroxide ring @detail See del Alamo et al 2020 Biophysical Journal for details on why 0.875 was computed/chosen

Referenced by calc_sl_for_res().

◆ calc_sl_for_res()

utility::vector1< PseudoSL > core::scoring::epr_deer::EPRSpinLabel::calc_sl_for_res ( Size const &  res,
pose::Pose const &  pose,
utility::vector1< PseudoSL > const &  sl_vec,
bool const &  skip_clash_eval = false,
Real const &  min_rad = 0.0 
)

Get positions of unpaired electrons at a residue.

Parameters
resResidue number
posePose for clash eval
sl_vecVector of PseudoSLs, which have positions of unpaired e
skip_clash_evalExactly what it suggested by the title
min_radLowest radius for clash eval to check
Returns
Vector of PseudoSLs in local coordinate frame of residue

References bulk(), cutoff_, core::conformation::Residue::is_protein(), core::pose::Pose::residue(), core::scoring::epr_deer::vrt_cb_(), weight(), and core::conformation::Residue::xyz().

Referenced by label().

◆ cutoff()

Real core::scoring::epr_deer::EPRSpinLabel::cutoff ( ) const

Getter for cutoff for weights.

Returns
Weight cutoff

References cutoff_.

Referenced by protocols::simple_moves::DEEROptimizeCoordsMover::init_coords().

◆ histogram() [1/3]

std::map< Size, Real > core::scoring::epr_deer::EPRSpinLabel::histogram ( PairSizeString const &  res1,
PairSizeString const &  res2,
Size const &  bins_per_a,
int const &  mod = 0,
Real const &  stdev = 1.0,
std::map< Size, Real > const &  dist_ids = {} 
)

Returns histogram between coordinate sets for residues.

Parameters
res1Residue 1
res2Residue 2
bins_per_aGranularity of histogram (bins per angstrom)
modWhat to add to the X-axis
dist_idsIf a custom X-axis is used (default: empty)
Returns
Histogram with X- and Y-values being keys and values @detail Note: the X-axis = bins_per_a * distance, rounded to an int

References coords_, histogram(), and core::scoring::epr_deer::TR().

◆ histogram() [2/3]

std::map< Size, Real > core::scoring::epr_deer::EPRSpinLabel::histogram ( utility::vector1< PairSizeString > const &  residues,
Size const &  bins_per_a,
int const &  mod = 0,
Real const &  stdev = 1.0,
std::map< Size, Real > const &  dist_ids = {} 
)

Returns histogram between coordinate sets for residues.

Parameters
residuesResidues contributing to histogram
bins_per_aGranularity of histogram (bins per angstrom)
modWhat to add to the X-axis
dist_idsIf a custom X-axis is used (default: empty)
Returns
Histogram with X- and Y-values being keys and values @detail Note: the X-axis = bins_per_a * distance, rounded to an int @detail Note: Equal labeling assumed for all sites @detail This matters if residues.size() > 2

References core::scoring::epr_deer::add_to_map(), and normalize().

Referenced by core::energy_methods::DEEREnergy::get_score(), and histogram().

◆ histogram() [3/3]

std::map< Size, Real > core::scoring::epr_deer::EPRSpinLabel::histogram ( utility::vector1< PseudoSL > const &  res1_coords,
utility::vector1< PseudoSL > const &  res2_coords,
Size const &  bins_per_a,
int const &  mod = 0,
Real const &  stdev = 1.0,
std::map< Size, Real > const &  dist_ids = {} 
)

Return histogram for pair of coordinate sets.

Parameters
res1_coordsPair of PseudoSL coords for res1
res2_coordsPair of PseudoSL coords for res2
bins_per_aBins per angstrom for distribution
modHow much to shift X-axis
stdevSt deviation of gauss used to convolute pairwise dists
dist_idsIf a custom X-axis is used (default: empty)
Returns
Histogram with X- and Y-values being keys and values @detail Note: the X-axis = bins_per_a * distance, rounded to an int

References core::scoring::epr_deer::add_to_map(), core::scoring::epr_deer::gauss(), protocols::mean_field::max(), normalize(), and protocols::noesy_assign::round().

◆ init_vdw()

void core::scoring::epr_deer::EPRSpinLabel::init_vdw ( ) const

Initialize object used to calculate centroid clashes.

References core::scoring::epr_deer::atom_vdw_, and core::chemical::CENTROID.

Referenced by EPRSpinLabel().

◆ label()

void core::scoring::epr_deer::EPRSpinLabel::label ( PairSizeString const &  res_label,
pose::Pose const &  pose,
bool const &  skip_clash_eval = false 
)

Label a residue with a certain spin label.

Parameters
resResidue index
labelSL type
posePose used for superimposition
skip_clash_evalWhether clash evaluation is skipped @detail Clashes are skipped for custom coordinates for reasons @detail relating to the way they have been calculated

References calc_sl_for_res(), coords_, custom_coords_, core::scoring::epr_deer::deflt_coords_, and read_db_file().

Referenced by protocols::simple_moves::DEEROptimizeCoordsMover::init_coords(), label_everything(), and protocols::simple_moves::DEEROptimizeCoordsMover::print_coords().

◆ label_everything()

void core::scoring::epr_deer::EPRSpinLabel::label_everything ( pose::Pose pose,
utility::vector1< PairSizeString > const &  residues,
bool const &  skip_clash_eval 
)

Goes through every residue in provided list and calculates.

Parameters
posePose to label
residuesResidues that need to be labeled
skip_clash_evalWhether clash evaluation should be skipped

References label().

Referenced by core::energy_methods::DEEREnergy::get_score().

◆ load_custom_electrons()

void core::scoring::epr_deer::EPRSpinLabel::load_custom_electrons ( std::map< Size, utility::vector1< PseudoSL > > const &  all_coords)

Allows a custom set of electrons to be read without superimposition.

Parameters
all_coordsCustom residue-specific PseudoSLs

References custom_coords_.

Referenced by core::scoring::epr_deer::DEERIO::pull_coords().

◆ normalize()

std::map< Size, Real > core::scoring::epr_deer::EPRSpinLabel::normalize ( std::map< Size, Real sim_map) const

Normalize distribution so that the sum is equal to 1.0.

Parameters
sim_mapSimulated DEER distribution
Returns
Identical std::map except values add up to 1.0

References protocols::analysis::total.

Referenced by histogram().

◆ operator[]()

utility::vector1< PseudoSL > & core::scoring::epr_deer::EPRSpinLabel::operator[] ( PairSizeString const &  res)

Operator to return nnn-const PseudoSL from specific residue.

Parameters
resResidue info (number and spin label type)
Returns
Coords corresponding to residue

References coords_.

◆ read_db_file()

utility::vector1< PseudoSL > core::scoring::epr_deer::EPRSpinLabel::read_db_file ( std::string const &  name)

Read DB file for a given type of spin label.

Parameters
Nameof file/SL type
Returns
PseudoSLs used for simulation of DEER distributions

References path_, protocols::sparta::split(), and protocols::hybridization::val.

Referenced by label().

◆ weight()

Real core::scoring::epr_deer::EPRSpinLabel::weight ( Size const &  res1,
numeric::xyzVector< core::Real > const &  clash_xyz,
Real  w,
pose::Pose const &  pose,
Real const &  rad 
)

retrieve weight for given coordinate

Parameters
res1Residue over which the coordinate is being superimposed
clash_xyzCoordinate used for clash calculation
wWeight, passed by value since we need a new obj to modify
posePose with all the residues we check for clash evaluation
vdw_radRadius of the clash_xyz atom to consider
Returns
Weight of PseudoSL at position given local environment of pose

References core::conformation::Residue::atom(), core::conformation::Residue::atom_index(), core::conformation::Residue::atom_is_backbone(), core::conformation::Residue::atom_type(), core::conformation::Residue::atom_type_index(), core::scoring::epr_deer::atom_vdw_, core::pose::Pose::energies(), core::pose::Pose::is_fullatom(), core::conformation::Residue::is_virtual_residue(), core::chemical::AtomType::lj_radius(), protocols::mean_field::min(), core::pose::Pose::residue(), core::scoring::Energies::tenA_neighbor_graph(), core::scoring::vdw, and core::conformation::Atom::xyz().

Referenced by calc_sl_for_res().

Member Data Documentation

◆ coords_

std::map< PairSizeString, utility::vector1< PseudoSL > > core::scoring::epr_deer::EPRSpinLabel::coords_
private

Coordinates for each residue being stored.

Referenced by at(), histogram(), label(), and operator[]().

◆ custom_coords_

std::map< Size, utility::vector1< PseudoSL > > core::scoring::epr_deer::EPRSpinLabel::custom_coords_
private

Custom coordinates (residue-specific)

Referenced by label(), and load_custom_electrons().

◆ cutoff_

Real core::scoring::epr_deer::EPRSpinLabel::cutoff_ = 0.001
private

Cutoff for clash evaluation.

Referenced by calc_sl_for_res(), and cutoff().

◆ path_

std::string core::scoring::epr_deer::EPRSpinLabel::path_ = "scoring/epr_deer/"
private

Path for files describing default PseudoSL objects to read.

Referenced by read_db_file().


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