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

#include <Simulated4PDEERTraceFactory.hh>

Public Member Functions

 Simulated4PDEERTraceFactory ()=default
 Default constructor. More...
 
 Simulated4PDEERTraceFactory (utility::vector1< Real > const &exp_trace, utility::vector1< Real > const &time_pts, std::string const &bckg_type, Size const &bins_per_a, Size const &max_dist=100, Size const &n_bins=200)
 More comprehensive constructor that gets everything in order. More...
 
numeric::MathMatrix< Realinitialize_kernel (utility::vector1< Real > const &time_pts, Size const &bins_per_a, Size const &max_dist=100, Size const &n_bins=200) const
 Kernel matrix initialization method. More...
 
Simulated4PDEERTrace trace_from_distr (std::map< Size, Real > const &distr)
 Process for converting distance distribution to DEER trace. More...
 
utility::vector1< Realkernel_mult (std::map< Size, Real > const &distr) const
 Actual nitty-gritty code for applying the kernel matrix. More...
 
utility::vector1< Realopt_bckg (utility::vector1< Real > const &deer_trace)
 Optimize the intermolecular background by least squares. More...
 
void initial_search (utility::vector1< Real > const &deer_trace)
 Performs an initial search for background parameters. More...
 
void append_data_and_recalculate (Real const &trace_datum, Real const &time_point)
 Adds a time point to the saved experimental DEER data. More...
 
void reset ()
 Reset background calculation to force initial search. More...
 
utility::vector1< Realtrace () const
 Returns experimental data. More...
 
utility::vector1< Realtime_pts () const
 Returns time points for experimental data. More...
 
std::string bckg_type () const
 Returns background type. More...
 
Size bins_per_a () const
 Returns bins per angstrom in the kernel matrix. More...
 
Real depth () const
 
Real slope () const
 
Real dim () const
 
void trace (utility::vector1< Real > const &val)
 Sets experimental data to new DEER trace. More...
 
void time_pts (utility::vector1< Real > const &val)
 Sets time points to new data. More...
 
void bckg_type (std::string const &val)
 Sets background coupling type. More...
 
void bins_per_a (Size const &val)
 Sets bins per angstrom of kernel matrix and recalculates matrix. More...
 

Private Attributes

utility::vector1< Realexp_data_
 Experimental data. More...
 
utility::vector1< Realtime_pts_
 Time points. More...
 
std::string bckg_type_
 Background type ("3D", "NON-3D", "NONE") More...
 
Size bins_per_a_
 Bins per angstrom in kernel matrix. More...
 
Size max_dist_
 
Size n_bins_ = 200
 Number of bins for magnetic field vector angle calculation. More...
 
numeric::MathMatrix< Realkernel_
 Matrix that converts distribution to intramolecular DEER trace. More...
 
Real depth_ = 0.25
 Last saved modulation depth. More...
 
Real slope_ = 1e-4
 Last saved background slope. More...
 
Real dim_ = dim3d_
 Last saved dimensionality @detail Default value chosen because sigmoid( 0.6931, 2, 3.5 ) = 3 @detail See sigmoid function in util.cc for details. More...
 
bool optimized_ = false
 To know if more LM iterations need to be run. More...
 
Size init_runs_ = 100
 How many times to run LM the first time. More...
 
Size runs_ = 5
 How many times to run LM subsequent times. More...
 
Real tpts_sqd_ = 0.0
 Time points squared, used by initial_search() fxn. More...
 

Constructor & Destructor Documentation

◆ Simulated4PDEERTraceFactory() [1/2]

core::scoring::epr_deer::Simulated4PDEERTraceFactory::Simulated4PDEERTraceFactory ( )
default

Default constructor.

◆ Simulated4PDEERTraceFactory() [2/2]

core::scoring::epr_deer::Simulated4PDEERTraceFactory::Simulated4PDEERTraceFactory ( utility::vector1< Real > const &  exp_trace,
utility::vector1< Real > const &  time_pts,
std::string const &  bckg_type,
Size const &  bins_per_a,
Size const &  max_dist = 100,
Size const &  n_bins = 200 
)

More comprehensive constructor that gets everything in order.

Parameters
exp_traceExperimental DEER trace for comparison
time_ptsTime points for the experimental DEER trace
bckg_typeType of background. Can be "NONE", "3D", "NON-3D"
max_distMaximum distance in angstroms
n_binsFor discretization of angle-dependent dipolar coupling

References bckg_type(), bckg_type_, bins_per_a(), bins_per_a_, exp_data_, initialize_kernel(), kernel_, max_dist_, n_bins_, time_pts(), time_pts_, and tpts_sqd_.

Member Function Documentation

◆ append_data_and_recalculate()

void core::scoring::epr_deer::Simulated4PDEERTraceFactory::append_data_and_recalculate ( Real const &  trace_datum,
Real const &  time_point 
)

Adds a time point to the saved experimental DEER data.

Parameters
trace_datumThe datapoint (Y-axis)
time_pointThe datapoint's time (X-axis) @detail NOT RECOMMENDED. The entire kernel matrix is reinitialized! @detail This is insanely time-consuming!

References bins_per_a_, exp_data_, initialize_kernel(), kernel_, max_dist_, n_bins_, and time_pts_.

◆ bckg_type() [1/2]

std::string core::scoring::epr_deer::Simulated4PDEERTraceFactory::bckg_type ( ) const

Returns background type.

Returns
Background type

References bckg_type_.

Referenced by protocols::simple_moves::DEEROptimizeCoordsMover::initial_search(), and Simulated4PDEERTraceFactory().

◆ bckg_type() [2/2]

void core::scoring::epr_deer::Simulated4PDEERTraceFactory::bckg_type ( std::string const &  val)

Sets background coupling type.

Parameters
valNew background coupling

References bckg_type_, and protocols::hybridization::val.

◆ bins_per_a() [1/2]

Size core::scoring::epr_deer::Simulated4PDEERTraceFactory::bins_per_a ( ) const

Returns bins per angstrom in the kernel matrix.

Returns
Bins per angstrom in the kernel matrix

References bins_per_a_.

Referenced by initialize_kernel(), and Simulated4PDEERTraceFactory().

◆ bins_per_a() [2/2]

void core::scoring::epr_deer::Simulated4PDEERTraceFactory::bins_per_a ( Size const &  val)

Sets bins per angstrom of kernel matrix and recalculates matrix.

Parameters
valNew value for bins per angstrom

References bins_per_a_, initialize_kernel(), kernel_, max_dist_, n_bins_, time_pts_, and protocols::hybridization::val.

◆ depth()

Real core::scoring::epr_deer::Simulated4PDEERTraceFactory::depth ( ) const

◆ dim()

Real core::scoring::epr_deer::Simulated4PDEERTraceFactory::dim ( ) const

◆ initial_search()

void core::scoring::epr_deer::Simulated4PDEERTraceFactory::initial_search ( utility::vector1< Real > const &  deer_trace)

◆ initialize_kernel()

numeric::MathMatrix< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::initialize_kernel ( utility::vector1< Real > const &  time_pts,
Size const &  bins_per_a,
Size const &  max_dist = 100,
Size const &  n_bins = 200 
) const

Kernel matrix initialization method.

Parameters
time_ptsTime points to be used in the kernel
bins_per_aBins per angstrom
max_distMaximum distance in Angstroms to be stored here
n_binsFor discretization of angle-dependent dipolar coupling
Returns
Kernel matrix @detail Mathematical details can be found in Ibanez and Jeschke, 2019 @detail JMR (doi: 10.1016/j.jmr.2019.01.008)

References core::pose::motif::a(), bins_per_a(), protocols::hybridization::t, time_pts(), and protocols::hybridization::val.

Referenced by append_data_and_recalculate(), bins_per_a(), Simulated4PDEERTraceFactory(), and time_pts().

◆ kernel_mult()

utility::vector1< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::kernel_mult ( std::map< Size, Real > const &  distr) const

Actual nitty-gritty code for applying the kernel matrix.

Parameters
distrDEER distribution stored as a map
Returns
Vector with intramolecular component @detail Note that throughout this calculation, the bins per angstrom @detail and time points are assumed to be correct! This is not @detail checked (maybe a debug assert can be used?)

References kernel_, core::scoring::epr_deer::TR(), trace(), and protocols::hybridization::val.

Referenced by trace_from_distr().

◆ opt_bckg()

utility::vector1< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::opt_bckg ( utility::vector1< Real > const &  deer_trace)

Optimize the intermolecular background by least squares.

Parameters
deer_traceThe intramolecular deer trace
Returns
vector with final DEER trace @detail The function can be run with and without dimensionality @detail calculation. This is reserved for cases where membrane @detail proteins are studied and are not uniformly distributed @detail in three-dimensional space.

References core::scoring::epr_deer::add_bckg(), bckg_type_, depth_, dim_, exp_data_, init_runs_, initial_search(), core::scoring::epr_deer::maxdepth_, core::scoring::epr_deer::mindepth_, core::scoring::epr_deer::minimize_sumsq(), core::scoring::epr_deer::minimize_sumsq_nodim(), optimized_, runs_, core::scoring::epr_deer::sigmoid(), slope_, time_pts_, and core::scoring::epr_deer::TR().

Referenced by trace_from_distr().

◆ reset()

void core::scoring::epr_deer::Simulated4PDEERTraceFactory::reset ( )

Reset background calculation to force initial search.

References optimized_.

◆ slope()

Real core::scoring::epr_deer::Simulated4PDEERTraceFactory::slope ( ) const

References slope_.

◆ time_pts() [1/2]

utility::vector1< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::time_pts ( ) const

Returns time points for experimental data.

Returns
Time points for experimental data

References time_pts_.

Referenced by initialize_kernel(), and Simulated4PDEERTraceFactory().

◆ time_pts() [2/2]

void core::scoring::epr_deer::Simulated4PDEERTraceFactory::time_pts ( utility::vector1< Real > const &  val)

Sets time points to new data.

Sets time points to new data and recalculates matrix.

Parameters
valNew data to set

References bins_per_a_, initialize_kernel(), kernel_, max_dist_, n_bins_, time_pts_, and protocols::hybridization::val.

◆ trace() [1/2]

utility::vector1< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::trace ( ) const

Returns experimental data.

Returns
DEER data

References exp_data_.

Referenced by kernel_mult(), and core::scoring::epr_deer::metrics::DEERDecayData::sum_of_squares().

◆ trace() [2/2]

void core::scoring::epr_deer::Simulated4PDEERTraceFactory::trace ( utility::vector1< Real > const &  val)

Sets experimental data to new DEER trace.

Parameters
valNew data to set

References exp_data_, and protocols::hybridization::val.

◆ trace_from_distr()

Simulated4PDEERTrace core::scoring::epr_deer::Simulated4PDEERTraceFactory::trace_from_distr ( std::map< Size, Real > const &  distr)

Process for converting distance distribution to DEER trace.

Parameters
distrDEER distribution stored as a map
Returns
DEER trace with all the bells and whistles attached

References depth_, dim_, kernel_mult(), opt_bckg(), slope_, and time_pts_.

Referenced by core::scoring::epr_deer::metrics::DEERDecayData::get_score().

Member Data Documentation

◆ bckg_type_

std::string core::scoring::epr_deer::Simulated4PDEERTraceFactory::bckg_type_
private

Background type ("3D", "NON-3D", "NONE")

Referenced by bckg_type(), opt_bckg(), and Simulated4PDEERTraceFactory().

◆ bins_per_a_

Size core::scoring::epr_deer::Simulated4PDEERTraceFactory::bins_per_a_
private

Bins per angstrom in kernel matrix.

Referenced by append_data_and_recalculate(), bins_per_a(), Simulated4PDEERTraceFactory(), and time_pts().

◆ depth_

Real core::scoring::epr_deer::Simulated4PDEERTraceFactory::depth_ = 0.25
private

Last saved modulation depth.

Referenced by depth(), initial_search(), opt_bckg(), and trace_from_distr().

◆ dim_

Real core::scoring::epr_deer::Simulated4PDEERTraceFactory::dim_ = dim3d_
private

Last saved dimensionality @detail Default value chosen because sigmoid( 0.6931, 2, 3.5 ) = 3 @detail See sigmoid function in util.cc for details.

Referenced by dim(), opt_bckg(), and trace_from_distr().

◆ exp_data_

utility::vector1< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::exp_data_
private

◆ init_runs_

Size core::scoring::epr_deer::Simulated4PDEERTraceFactory::init_runs_ = 100
private

How many times to run LM the first time.

Referenced by opt_bckg().

◆ kernel_

numeric::MathMatrix< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::kernel_
private

Matrix that converts distribution to intramolecular DEER trace.

Referenced by append_data_and_recalculate(), bins_per_a(), kernel_mult(), Simulated4PDEERTraceFactory(), and time_pts().

◆ max_dist_

Size core::scoring::epr_deer::Simulated4PDEERTraceFactory::max_dist_
private

◆ n_bins_

Size core::scoring::epr_deer::Simulated4PDEERTraceFactory::n_bins_ = 200
private

Number of bins for magnetic field vector angle calculation.

Referenced by append_data_and_recalculate(), bins_per_a(), Simulated4PDEERTraceFactory(), and time_pts().

◆ optimized_

bool core::scoring::epr_deer::Simulated4PDEERTraceFactory::optimized_ = false
private

To know if more LM iterations need to be run.

Referenced by opt_bckg(), and reset().

◆ runs_

Size core::scoring::epr_deer::Simulated4PDEERTraceFactory::runs_ = 5
private

How many times to run LM subsequent times.

Referenced by opt_bckg().

◆ slope_

Real core::scoring::epr_deer::Simulated4PDEERTraceFactory::slope_ = 1e-4
private

Last saved background slope.

Referenced by initial_search(), opt_bckg(), slope(), and trace_from_distr().

◆ time_pts_

utility::vector1< Real > core::scoring::epr_deer::Simulated4PDEERTraceFactory::time_pts_
private

◆ tpts_sqd_

Real core::scoring::epr_deer::Simulated4PDEERTraceFactory::tpts_sqd_ = 0.0
private

Time points squared, used by initial_search() fxn.

Referenced by initial_search(), and Simulated4PDEERTraceFactory().


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