Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
core::scoring::nmr::rdc::RDCMultiSet Class Reference

#include <RDCMultiSet.hh>

Public Types

enum  COMPUTATION_TYPE {
  SVD = 1, NLS = 2, NLSDA = 3, NLSR = 4,
  NLSDAR = 5
}
 type of tensor and score calculation SVD = singular value decomposition (coupled with grid search) NLS = non-linear least squares fitting NLSDA = non-linear least squares fitting with known alignment magnitude NLSR = non-linear least squares fitting with known rhombicity NLSDAR = non-linear least squares fitting with known alignment magnitude and rhombicity More...
 
typedef std::pair< Vector, VectorSpinPairCoordinates
 

Public Member Functions

 RDCMultiSet (utility::vector1< std::string > const &filenames, std::string const &medium_label, pose::Pose const &pose)
 construct from data files set default values for RDCMultiSet weight and computation_type More...
 
 RDCMultiSet (utility::vector1< std::string > const &filenames, std::string const &medium_label, pose::Pose const &pose, Real const weight, std::string computation_type="SVD")
 constructor with full argument list More...
 
 RDCMultiSet (RDCMultiSet const &other)
 copy constructor More...
 
RDCMultiSetoperator= (RDCMultiSet const &rhs)
 assignment operator More...
 
 ~RDCMultiSet ()
 destructor More...
 
void update_spin_coordinates (pose::Pose const &pose)
 updates the spin coordinates every time the pose is changed make sure that this function is called before update_matrix_A() is called More...
 
void update_matrix_A ()
 builds matrix_A from the spin coordinates and hands it over to the SVD solver More...
 
void update_single_rdc_weighting ()
 updates the array holding the single RDC weights that are used during score calculation needs to be called e.g. when the weighting scheme of one of the RDCSingleSets was changed More...
 
Real solve_tensor_and_compute_score_by_svd ()
 solves the RDC tensor using SVD and returns the weighted RDC score according to the single RDC weighting scheme and the weights of the individual experiments More...
 
Real solve_tensor_and_compute_score_by_nls ()
 solves the RDC tensor using NLS and returns the weighted RDC score according to the single RDC weighting scheme and the weights of the individual experiments More...
 
Real compute_rdc_values_and_score_from_tensor (RDCTensor const &tensor)
 calculate RDC values from a given tensor, set values in the RDCSingle vector and return the RDC score More...
 
Real compute_rdc_values_and_score_from_tensor ()
 calculate RDC values and the RDC score from the dataset's current tensor More...
 
void set_atom_derivatives (pose::Pose const &pose)
 sets the xyz derivative of the RDC RDCTensor must be determined before first call solve_tensor_and_compute_score_by_svd() or solve_tensor_and_compute_score_by_nls() before setting derivatives More...
 
Real get_weight () const
 
Size get_total_number_rdc () const
 
Size get_number_experiments () const
 
std::string get_alignment_medium_label () const
 
utility::vector1
< RDCSingleSetOP > & 
get_rdc_singleset_vec ()
 
utility::vector1
< RDCSingleSetOP > const & 
get_rdc_singleset_vec () const
 
ObjexxFCL::FArray2D< Real > const & get_matrix_A () const
 
ObjexxFCL::FArray1D< Real > const & get_rdc_values () const
 
ObjexxFCL::FArray1D< Real > const & get_rdc_single_weights () const
 
RDCTensorCOP get_tensor_const () const
 
RDCTensorOP get_tensor ()
 
COMPUTATION_TYPE get_computation_type () const
 
NMR_VALUE_AVERAGING_TYPE get_averaging_type () const
 
utility::vector1
< utility::vector1
< RDCMultiSet::SpinPairCoordinates >
> const & 
get_spin_coordinates () const
 
RDC_NORM_TYPE get_normalization_type () const
 
bool symmetric_rdc_calc () const
 
bool correct_sign () const
 
bool tensor_fixed () const
 
void set_weight (Real weight)
 
void set_tensor (RDCTensorOP const &tensor)
 
void set_computation_type (std::string const &type)
 
void set_averaging_type (std::string const &type)
 
void fix_tensor ()
 
void unfix_tensor ()
 
void show (std::ostream &TR) const
 

Private Member Functions

 RDCMultiSet ()
 default constructor More...
 
void init_from_rdc_filedata (utility::vector1< std::string > const &filenames, pose::Pose const &pose)
 utility function used in constructor to initialize RDCMultiSet object from data files. More...
 
void register_options ()
 register options More...
 
void init_from_cml ()
 
void convert_string_to_computation_type (std::string const &computation_type)
 utility function to convert string to class computation type enum More...
 
void deep_copy_rdc_single_set_vec (utility::vector1< RDCSingleSetOP > const &other_vec)
 
void fill_matrix_A_row (utility::fixedsizearray1< Real, 5 > &A_row, utility::vector1< SpinPairCoordinates > const &spin_coord, Real const &Dmax)
 utility function to fill matrix_A that is used for SVD More...
 
Real basic_rdc_equation (utility::fixedsizearray1< Real, 2 > const &par, SpinPairCoordinates const &spin_coord, Real const &Dmax, Matrix const &rotM)
 utility function that calculates one single RDC value given the input arguments Da, R, the spin coordinates, the maximal dipolar coupling constant and a rotation matrix More...
 
Real frdc (Real const *par, utility::vector1< SpinPairCoordinates > const &spin_coord, Real const &Dmax, Matrix const &rotM)
 utility functions to calculate the RDC from different sets of input arguments arguments are a pointer to the parameters (Da, R), the coordinates of equivalent spins, the maximal dipolar coupling constant and a rotation matrix that must be previously constructed from the Euler angles. Fixed values of Da and R can be provided. More...
 
Real frdc_Da (Real const *par, Real const &Da, utility::vector1< SpinPairCoordinates > const &spin_coord, Real const &Dmax, Matrix const &rotM)
 
Real frdc_R (Real const *par, Real const &R, utility::vector1< SpinPairCoordinates > const &spin_coord, Real const &Dmax, Matrix const &rotM)
 
Real frdc_Da_R (Real const &Da, Real const &R, utility::vector1< SpinPairCoordinates > const &spin_coord, Real const &Dmax, Matrix const &rotM)
 

Private Attributes

std::string alignment_medium_
 
utility::vector1< RDCSingleSetOPrdc_singleset_vec_
 
Real weight_
 
Size total_number_rdc_
 
Size number_experiments_
 
ObjexxFCL::FArray2D< Realmatrix_A_
 
ObjexxFCL::FArray1D< Realrdc_values_
 
ObjexxFCL::FArray1D< Realrdc_single_weights_
 
basic::svd::SVD_SolverOP svd_solver_
 
RDCTensorOP tensor_
 
COMPUTATION_TYPE computation_type_
 
utility::vector1
< utility::vector1
< SpinPairCoordinates > > 
spin_coordinates_
 
RDC_NORM_TYPE norm_type_
 
bool symmetric_rdc_calc_
 
bool correct_sign_
 
NMR_VALUE_AVERAGING_TYPE ave_type_
 
Size nls_repeats_
 
bool fixed_tensor_
 

Friends

void rdc_erf (Real const *par, int m_dat, void const *data, Real *fvec, int *)
 rdc error function used in the lmmin function More...
 

Member Typedef Documentation

Member Enumeration Documentation

type of tensor and score calculation SVD = singular value decomposition (coupled with grid search) NLS = non-linear least squares fitting NLSDA = non-linear least squares fitting with known alignment magnitude NLSR = non-linear least squares fitting with known rhombicity NLSDAR = non-linear least squares fitting with known alignment magnitude and rhombicity

Enumerator
SVD 
NLS 
NLSDA 
NLSR 
NLSDAR 

Constructor & Destructor Documentation

core::scoring::nmr::rdc::RDCMultiSet::RDCMultiSet ( utility::vector1< std::string > const &  filenames,
std::string const &  medium_label,
pose::Pose const &  pose 
)

construct from data files set default values for RDCMultiSet weight and computation_type

References init_from_cml(), init_from_rdc_filedata(), and register_options().

core::scoring::nmr::rdc::RDCMultiSet::RDCMultiSet ( utility::vector1< std::string > const &  filenames,
std::string const &  medium_label,
pose::Pose const &  pose,
Real const  weight,
std::string  computation_type = "SVD" 
)
core::scoring::nmr::rdc::RDCMultiSet::RDCMultiSet ( RDCMultiSet const &  other)

copy constructor

References deep_copy_rdc_single_set_vec(), and rdc_singleset_vec_.

core::scoring::nmr::rdc::RDCMultiSet::~RDCMultiSet ( )

destructor

core::scoring::nmr::rdc::RDCMultiSet::RDCMultiSet ( )
private

default constructor

Member Function Documentation

Real core::scoring::nmr::rdc::RDCMultiSet::basic_rdc_equation ( utility::fixedsizearray1< Real, 2 > const &  par,
SpinPairCoordinates const &  spin_coord,
Real const &  Dmax,
Matrix const &  rotM 
)
private

utility function that calculates one single RDC value given the input arguments Da, R, the spin coordinates, the maximal dipolar coupling constant and a rotation matrix

References correct_sign_, norm_type_, core::scoring::nmr::NORM_TYPE_CH, core::scoring::nmr::NORM_TYPE_NH, core::scoring::nmr::NORM_TYPE_NONE, core::scoring::rdc, core::scoring::nmr::rdc::rdc_D_max(), core::scoring::nmr::RDC_TYPE_CAHA, and core::scoring::nmr::RDC_TYPE_NH.

Referenced by frdc(), frdc_Da(), frdc_Da_R(), and frdc_R().

Real core::scoring::nmr::rdc::RDCMultiSet::compute_rdc_values_and_score_from_tensor ( RDCTensor const &  tensor)
Real core::scoring::nmr::rdc::RDCMultiSet::compute_rdc_values_and_score_from_tensor ( )

calculate RDC values and the RDC score from the dataset's current tensor

References tensor_.

void core::scoring::nmr::rdc::RDCMultiSet::convert_string_to_computation_type ( std::string const &  computation_type)
private

utility function to convert string to class computation type enum

References computation_type_, NLS, NLSDA, NLSDAR, NLSR, and SVD.

Referenced by RDCMultiSet(), and set_computation_type().

bool core::scoring::nmr::rdc::RDCMultiSet::correct_sign ( ) const
inline

References correct_sign_.

void core::scoring::nmr::rdc::RDCMultiSet::deep_copy_rdc_single_set_vec ( utility::vector1< RDCSingleSetOP > const &  other_vec)
private

References rdc_singleset_vec_.

Referenced by operator=(), and RDCMultiSet().

void core::scoring::nmr::rdc::RDCMultiSet::fill_matrix_A_row ( utility::fixedsizearray1< Real, 5 > &  A_row,
utility::vector1< SpinPairCoordinates > const &  spin_coord,
Real const &  Dmax 
)
private
void core::scoring::nmr::rdc::RDCMultiSet::fix_tensor ( )
inline

References fixed_tensor_.

Real core::scoring::nmr::rdc::RDCMultiSet::frdc ( Real const *  par,
utility::vector1< SpinPairCoordinates > const &  spin_coord,
Real const &  Dmax,
Matrix const &  rotM 
)
private

utility functions to calculate the RDC from different sets of input arguments arguments are a pointer to the parameters (Da, R), the coordinates of equivalent spins, the maximal dipolar coupling constant and a rotation matrix that must be previously constructed from the Euler angles. Fixed values of Da and R can be provided.

References ave_type_, basic_rdc_equation(), core::scoring::nmr::MEAN, and core::scoring::rdc.

Referenced by compute_rdc_values_and_score_from_tensor(), core::scoring::nmr::rdc::rdc_erf(), set_atom_derivatives(), and solve_tensor_and_compute_score_by_nls().

Real core::scoring::nmr::rdc::RDCMultiSet::frdc_Da ( Real const *  par,
Real const &  Da,
utility::vector1< SpinPairCoordinates > const &  spin_coord,
Real const &  Dmax,
Matrix const &  rotM 
)
private
Real core::scoring::nmr::rdc::RDCMultiSet::frdc_Da_R ( Real const &  Da,
Real const &  R,
utility::vector1< SpinPairCoordinates > const &  spin_coord,
Real const &  Dmax,
Matrix const &  rotM 
)
private
Real core::scoring::nmr::rdc::RDCMultiSet::frdc_R ( Real const *  par,
Real const &  R,
utility::vector1< SpinPairCoordinates > const &  spin_coord,
Real const &  Dmax,
Matrix const &  rotM 
)
private
std::string core::scoring::nmr::rdc::RDCMultiSet::get_alignment_medium_label ( ) const
inline

References alignment_medium_.

NMR_VALUE_AVERAGING_TYPE core::scoring::nmr::rdc::RDCMultiSet::get_averaging_type ( ) const
inline

References ave_type_.

COMPUTATION_TYPE core::scoring::nmr::rdc::RDCMultiSet::get_computation_type ( ) const
inline

References computation_type_.

ObjexxFCL::FArray2D<Real> const& core::scoring::nmr::rdc::RDCMultiSet::get_matrix_A ( ) const
inline

References matrix_A_.

RDC_NORM_TYPE core::scoring::nmr::rdc::RDCMultiSet::get_normalization_type ( ) const
inline

References norm_type_.

Size core::scoring::nmr::rdc::RDCMultiSet::get_number_experiments ( ) const
inline

References number_experiments_.

ObjexxFCL::FArray1D<Real> const& core::scoring::nmr::rdc::RDCMultiSet::get_rdc_single_weights ( ) const
inline

References rdc_single_weights_.

utility::vector1< RDCSingleSetOP >& core::scoring::nmr::rdc::RDCMultiSet::get_rdc_singleset_vec ( )
inline

References rdc_singleset_vec_.

utility::vector1< RDCSingleSetOP > const& core::scoring::nmr::rdc::RDCMultiSet::get_rdc_singleset_vec ( ) const
inline

References rdc_singleset_vec_.

ObjexxFCL::FArray1D<Real> const& core::scoring::nmr::rdc::RDCMultiSet::get_rdc_values ( ) const
inline

References rdc_values_.

utility::vector1< utility::vector1< RDCMultiSet::SpinPairCoordinates > > const& core::scoring::nmr::rdc::RDCMultiSet::get_spin_coordinates ( ) const
inline

References spin_coordinates_.

RDCTensorOP core::scoring::nmr::rdc::RDCMultiSet::get_tensor ( )
inline

References tensor_.

RDCTensorCOP core::scoring::nmr::rdc::RDCMultiSet::get_tensor_const ( ) const
inline

References tensor_.

Size core::scoring::nmr::rdc::RDCMultiSet::get_total_number_rdc ( ) const
inline

References total_number_rdc_.

Real core::scoring::nmr::rdc::RDCMultiSet::get_weight ( ) const
inline

References weight_.

void core::scoring::nmr::rdc::RDCMultiSet::init_from_cml ( )
private
void core::scoring::nmr::rdc::RDCMultiSet::init_from_rdc_filedata ( utility::vector1< std::string > const &  filenames,
pose::Pose const &  pose 
)
private
RDCMultiSet & core::scoring::nmr::rdc::RDCMultiSet::operator= ( RDCMultiSet const &  rhs)
void core::scoring::nmr::rdc::RDCMultiSet::register_options ( )
private

register options

Referenced by RDCMultiSet().

void core::scoring::nmr::rdc::RDCMultiSet::set_atom_derivatives ( pose::Pose const &  pose)
void core::scoring::nmr::rdc::RDCMultiSet::set_averaging_type ( std::string const &  type)
void core::scoring::nmr::rdc::RDCMultiSet::set_computation_type ( std::string const &  type)
void core::scoring::nmr::rdc::RDCMultiSet::set_tensor ( RDCTensorOP const &  tensor)
inline

References tensor_.

void core::scoring::nmr::rdc::RDCMultiSet::set_weight ( Real  weight)
inline

References weight_.

void core::scoring::nmr::rdc::RDCMultiSet::show ( std::ostream &  TR) const
Real core::scoring::nmr::rdc::RDCMultiSet::solve_tensor_and_compute_score_by_nls ( )
Real core::scoring::nmr::rdc::RDCMultiSet::solve_tensor_and_compute_score_by_svd ( )

solves the RDC tensor using SVD and returns the weighted RDC score according to the single RDC weighting scheme and the weights of the individual experiments

References alignment_medium_, matrix_A_, number_experiments_, rdc_single_weights_, rdc_singleset_vec_, rdc_values_, spin_coordinates_, svd_solver_, tensor_, total_number_rdc_, core::scoring::total_score, core::scoring::nmr::rdc::TR(), and update_matrix_A().

bool core::scoring::nmr::rdc::RDCMultiSet::symmetric_rdc_calc ( ) const
inline

References symmetric_rdc_calc_.

bool core::scoring::nmr::rdc::RDCMultiSet::tensor_fixed ( ) const
inline

References fixed_tensor_.

void core::scoring::nmr::rdc::RDCMultiSet::unfix_tensor ( )
inline

References fixed_tensor_.

void core::scoring::nmr::rdc::RDCMultiSet::update_matrix_A ( )
void core::scoring::nmr::rdc::RDCMultiSet::update_single_rdc_weighting ( )

updates the array holding the single RDC weights that are used during score calculation needs to be called e.g. when the weighting scheme of one of the RDCSingleSets was changed

References core::scoring::nmr::CONST, number_experiments_, core::scoring::nmr::OBSIG, rdc_single_weights_, rdc_singleset_vec_, rdc_values_, core::scoring::nmr::SIGMA, spin_coordinates_, and total_number_rdc_.

void core::scoring::nmr::rdc::RDCMultiSet::update_spin_coordinates ( pose::Pose const &  pose)

Friends And Related Function Documentation

void rdc_erf ( Real const *  par,
int  m_dat,
void const *  data,
Real fvec,
int *   
)
friend

rdc error function used in the lmmin function

  • par is an array of fit parameters [alpha, beta, gamma, (Da, R)]
  • data is a pointer to the the RDCMultiSet object i.e. to all data needed for RDC calculation and NLS fitting
  • fvc is an array holding the residuals of the fit calculation

Referenced by solve_tensor_and_compute_score_by_nls().

Member Data Documentation

std::string core::scoring::nmr::rdc::RDCMultiSet::alignment_medium_
private
NMR_VALUE_AVERAGING_TYPE core::scoring::nmr::rdc::RDCMultiSet::ave_type_
private
COMPUTATION_TYPE core::scoring::nmr::rdc::RDCMultiSet::computation_type_
private
bool core::scoring::nmr::rdc::RDCMultiSet::correct_sign_
private
bool core::scoring::nmr::rdc::RDCMultiSet::fixed_tensor_
private
ObjexxFCL::FArray2D<Real> core::scoring::nmr::rdc::RDCMultiSet::matrix_A_
private
Size core::scoring::nmr::rdc::RDCMultiSet::nls_repeats_
private
RDC_NORM_TYPE core::scoring::nmr::rdc::RDCMultiSet::norm_type_
private
Size core::scoring::nmr::rdc::RDCMultiSet::number_experiments_
private
ObjexxFCL::FArray1D<Real> core::scoring::nmr::rdc::RDCMultiSet::rdc_single_weights_
private
utility::vector1< RDCSingleSetOP > core::scoring::nmr::rdc::RDCMultiSet::rdc_singleset_vec_
private
ObjexxFCL::FArray1D<Real> core::scoring::nmr::rdc::RDCMultiSet::rdc_values_
private
utility::vector1< utility::vector1< SpinPairCoordinates > > core::scoring::nmr::rdc::RDCMultiSet::spin_coordinates_
private
basic::svd::SVD_SolverOP core::scoring::nmr::rdc::RDCMultiSet::svd_solver_
private
bool core::scoring::nmr::rdc::RDCMultiSet::symmetric_rdc_calc_
private
RDCTensorOP core::scoring::nmr::rdc::RDCMultiSet::tensor_
private
Size core::scoring::nmr::rdc::RDCMultiSet::total_number_rdc_
private
Real core::scoring::nmr::rdc::RDCMultiSet::weight_
private

Referenced by get_weight(), operator=(), and set_weight().


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