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

#include <DEERDataCache.hh>

Inheritance diagram for core::scoring::epr_deer::DEERDataCache:
Inheritance graph
[legend]

Public Member Functions

 DEERDataCache ()=default
 Constructor. More...
 
 DEERDataCache (DEERDataCache const &)=default
 Copy constructor. More...
 
 ~DEERDataCache () override
 Destructor. More...
 
basic::datacache::CacheableDataOP clone () const override
 Copy function, overrides parent class. More...
 
metrics::DEERDataOPoperator[] (Size const &i)
 Returns non-const data for a given ID (or nullptr if empty) More...
 
metrics::DEERDataOP const & at (Size const &i) const
 Returns const data for a given ID (or nullptr if empty) More...
 
void append (metrics::DEERDataOP const &data)
 Adds DEERDataOP object to DEERDataCache at earliest spot. More...
 
void append (metrics::DEERDataOP const &data, Size const &i)
 Adds DEERDataOP object to DEERDataCache at predefined spot. More...
 
void push_back (metrics::DEERDataOP const &data)
 Adds DEERDataOP object to DEERDataCache at last spot. More...
 
Size size () const
 Returns number of DEERDataOPs stored here. More...
 
std::set< Sizeindices () const
 Returns set of keys in the data map. More...
 
void fetch_and_organize_data (pose::Pose const &pose)
 Fetches are parses data from command line using DEERIO object. More...
 
void set_up_residues ()
 Initializer function following reading of data. More...
 
std::map< Size, Realedge (Size const &rsd1, Size const &rsd2) const
 Returns number of edges corresponding to the pair of residues. More...
 
utility::vector1< std::pair
< Size, std::string > > 
labeled_residues () const
 Returns set of residues and appropriate spin labels to compute. More...
 
std::set< std::string > label_types () const
 Returns list of residues spin labels to compute. More...
 
utility::vector1< EPRSpinLabellabels () const
 Stores the coordinates for residues with CUSTOM spin labels. More...
 
void set_labels (utility::vector1< EPRSpinLabel > const &labels)
 Stores the normalized coordinates for residues with CUSTOM spin labels. More...
 
utility::vector1< Real > const & sl_weights () const
 Returns the weights assigned to CUSTOM spin label coordinates. More...
 
void set_sl_weights (utility::vector1< Real > const &weights)
 Stores the weights assigned to CUSTOM spin label coordinates. More...
 
bool has_f1_force (Size const &res) const
 Returns if F1 force is stored for residue. More...
 
bool has_f2_force (Size const &res) const
 Checks if residues has an F1 force, used for gradient minimzation. More...
 
void f1_force (Size const &res, numeric::xyzVector< Real > const &vec)
 Sets F1 force stored for residue. More...
 
void f2_force (Size const &res, numeric::xyzVector< Real > const &vec)
 Sets F2 force stored for residue. More...
 
numeric::xyzVector< Real > const & f1_force (Size const &res) const
 Returns the F1 force applied to a residue. More...
 
numeric::xyzVector< Real > const & f2_force (Size const &res) const
 Returns the F2 force applied to a residue. More...
 
void delete_data (core::Size const &i)
 Removes data at specific spot and reparameterizes. More...
 
bool has_data (core::Size const &i)
 Check and return if data in spot is occupied. More...
 

Private Attributes

std::map< Size,
metrics::DEERDataOP
data_
 Data container. More...
 
std::map< Size,
numeric::xyzVector< Real > > 
f1_forces_
 Container for F1 forces. More...
 
std::map< Size,
numeric::xyzVector< Real > > 
f2_forces_
 Container for F2 forces. More...
 
std::set< std::pair< Size,
std::string > > 
labeled_residues_
 Set of all labeled residues (string is SL type) More...
 
std::map< std::pair< Size,
Size >, std::map< Size, Real > > 
pair_data_
 Map of IDs and weights corresponding to residue pairs. More...
 
utility::vector1< EPRSpinLabelspin_labels_
 List of CUSTOM EPRSpin labels (obtained by multilateration) More...
 
utility::vector1< Realsl_weights_
 Weights for CUSTOM labels (obtained by multilateration) More...
 

Constructor & Destructor Documentation

core::scoring::epr_deer::DEERDataCache::DEERDataCache ( )
default

Constructor.

Referenced by clone().

core::scoring::epr_deer::DEERDataCache::DEERDataCache ( DEERDataCache const &  )
default

Copy constructor.

core::scoring::epr_deer::DEERDataCache::~DEERDataCache ( )
override

Destructor.

Member Function Documentation

void core::scoring::epr_deer::DEERDataCache::append ( metrics::DEERDataOP const &  data)

Adds DEERDataOP object to DEERDataCache at earliest spot.

Parameters
datametrics::DEERDataOP object to insert
datametrics::DEERDataOP object to insert Not threadsafe

References data_, and size().

void core::scoring::epr_deer::DEERDataCache::append ( metrics::DEERDataOP const &  data,
Size const &  i 
)

Adds DEERDataOP object to DEERDataCache at predefined spot.

Parameters
dataObject to insert
iPosition to insert object
dataObject to insert
iPosition to insert object Not threadsafe

References data_.

metrics::DEERDataOP const & core::scoring::epr_deer::DEERDataCache::at ( Size const &  i) const

Returns const data for a given ID (or nullptr if empty)

Parameters
iIndex of data object ()
Returns
Requested DEERDataOP object (or nullptr)

References data_, and core::id::to_string().

basic::datacache::CacheableDataOP core::scoring::epr_deer::DEERDataCache::clone ( ) const
override

Copy function, overrides parent class.

References DEERDataCache().

void core::scoring::epr_deer::DEERDataCache::delete_data ( core::Size const &  i)

Removes data at specific spot and reparameterizes.

Parameters
iKey of data in map

References data_, and set_up_residues().

std::map< Size, Real > core::scoring::epr_deer::DEERDataCache::edge ( Size const &  rsd1,
Size const &  rsd2 
) const

Returns number of edges corresponding to the pair of residues.

Parameters
rsd1identity of first residue (AA sequence)
rsd2identity of second residue (AA sequence)
Returns
Map with edges and weights for residue pair

References protocols::mean_field::max(), protocols::mean_field::min(), and pair_data_.

Referenced by set_up_residues().

void core::scoring::epr_deer::DEERDataCache::f1_force ( Size const &  res,
numeric::xyzVector< Real > const &  vec 
)

Sets F1 force stored for residue.

Parameters
resResidue ID of interest
vecVector of F1 force

References f1_forces_.

numeric::xyzVector< Real > const & core::scoring::epr_deer::DEERDataCache::f1_force ( Size const &  res) const

Returns the F1 force applied to a residue.

Parameters
resResidue ID of interest
Returns
F1 force

References f1_forces_.

void core::scoring::epr_deer::DEERDataCache::f2_force ( Size const &  res,
numeric::xyzVector< Real > const &  vec 
)

Sets F2 force stored for residue.

Parameters
resResidue ID of interest
vecVector of F2 force

References f2_forces_.

numeric::xyzVector< Real > const & core::scoring::epr_deer::DEERDataCache::f2_force ( Size const &  res) const

Returns the F2 force applied to a residue.

Parameters
resResidue ID of interest
Returns
F2 force

References f2_forces_.

void core::scoring::epr_deer::DEERDataCache::fetch_and_organize_data ( pose::Pose const &  pose)

Fetches are parses data from command line using DEERIO object.

Parameters
posePose object from which data will be fetched

References data_, core::scoring::epr_deer::DEERIO::generate_data(), core::scoring::epr_deer::DEERIO::pull_coords(), set_up_residues(), sl_weights_, and spin_labels_.

bool core::scoring::epr_deer::DEERDataCache::has_data ( core::Size const &  i)

Check and return if data in spot is occupied.

Parameters
iKey to check
Returns
Whether key is being used

References data_.

bool core::scoring::epr_deer::DEERDataCache::has_f1_force ( Size const &  res) const

Returns if F1 force is stored for residue.

Parameters
resResidue ID of interest
Returns
True or false if residue is stored in F1 force map

References f1_forces_.

bool core::scoring::epr_deer::DEERDataCache::has_f2_force ( Size const &  res) const

Checks if residues has an F1 force, used for gradient minimzation.

Returns if F2 force is stored for residue.

Parameters
resResidue ID of interest
Returns
True or false if residue is stored in F2 force map

References f2_forces_.

std::set< Size > core::scoring::epr_deer::DEERDataCache::indices ( ) const

Returns set of keys in the data map.

Returns
Set object containing all keys in map

References data_.

std::set< std::string > core::scoring::epr_deer::DEERDataCache::label_types ( ) const

Returns list of residues spin labels to compute.

Returns
Labels required by data

References labeled_residues_.

utility::vector1< std::pair< Size, std::string > > core::scoring::epr_deer::DEERDataCache::labeled_residues ( ) const

Returns set of residues and appropriate spin labels to compute.

Returns
Residues in data Returns vector of residues and appropriate spin labels to compute
Residues in data

References labeled_residues_.

utility::vector1< EPRSpinLabel > core::scoring::epr_deer::DEERDataCache::labels ( ) const

Stores the coordinates for residues with CUSTOM spin labels.

Returns
utility::vector1< EPRSpinLabel > of custom SL rotamers in data

References spin_labels_.

Referenced by set_labels().

metrics::DEERDataOP & core::scoring::epr_deer::DEERDataCache::operator[] ( Size const &  i)

Returns non-const data for a given ID (or nullptr if empty)

Parameters
iIndex of data object ()
Returns
Requested DEERDataOP object (or nullptr)

References data_, and core::id::to_string().

void core::scoring::epr_deer::DEERDataCache::push_back ( metrics::DEERDataOP const &  data)

Adds DEERDataOP object to DEERDataCache at last spot.

Parameters
datametrics::DEERDataOP object to insert
datametrics::DEERDataOP object to insert Not threadsafe

References data_.

void core::scoring::epr_deer::DEERDataCache::set_labels ( utility::vector1< EPRSpinLabel > const &  labels)

Stores the normalized coordinates for residues with CUSTOM spin labels.

Parameters
labelsCustom rotamers across model

References labels(), and spin_labels_.

void core::scoring::epr_deer::DEERDataCache::set_sl_weights ( utility::vector1< Real > const &  weights)

Stores the weights assigned to CUSTOM spin label coordinates.

Parameters
weightsVector of weights for custom SLs

References sl_weights_.

void core::scoring::epr_deer::DEERDataCache::set_up_residues ( )
Size core::scoring::epr_deer::DEERDataCache::size ( ) const

Returns number of DEERDataOPs stored here.

Returns
Size object ofnumber of DEERDataOPs in map Note: output could be less than data_.rbegin()->first)

References data_.

Referenced by append().

utility::vector1< Real > const & core::scoring::epr_deer::DEERDataCache::sl_weights ( ) const

Returns the weights assigned to CUSTOM spin label coordinates.

Returns
Vector of weights

References sl_weights_.

Member Data Documentation

std::map< Size, metrics::DEERDataOP > core::scoring::epr_deer::DEERDataCache::data_
private
std::map< Size, numeric::xyzVector< Real > > core::scoring::epr_deer::DEERDataCache::f1_forces_
private

Container for F1 forces.

Referenced by f1_force(), and has_f1_force().

std::map< Size, numeric::xyzVector< Real > > core::scoring::epr_deer::DEERDataCache::f2_forces_
private

Container for F2 forces.

Referenced by f2_force(), and has_f2_force().

std::set< std::pair< Size, std::string > > core::scoring::epr_deer::DEERDataCache::labeled_residues_
private

Set of all labeled residues (string is SL type)

Referenced by label_types(), labeled_residues(), and set_up_residues().

std::map< std::pair< Size, Size >, std::map< Size, Real > > core::scoring::epr_deer::DEERDataCache::pair_data_
private

Map of IDs and weights corresponding to residue pairs.

Referenced by edge(), and set_up_residues().

utility::vector1< Real > core::scoring::epr_deer::DEERDataCache::sl_weights_
private

Weights for CUSTOM labels (obtained by multilateration)

Referenced by fetch_and_organize_data(), set_sl_weights(), and sl_weights().

utility::vector1< EPRSpinLabel > core::scoring::epr_deer::DEERDataCache::spin_labels_
private

List of CUSTOM EPRSpin labels (obtained by multilateration)

Referenced by fetch_and_organize_data(), labels(), and set_labels().


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