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::pcs::PCSSingleSet Class Reference

#include <PCSSingleSet.hh>

Public Types

enum  COMPUTATION_TYPE {
  SVD = 1, NLS = 2, NLSAX = 3, NLSRH = 4,
  NLSAXRH = 5
}
 type of tensor and score calculation SVD = singular value decomposition (coupled with grid search) NLS = non-linear least squares fitting NLSAX = non-linear least squares fitting with fixed axial tensor component NLSRH = non-linear least squares fitting with fixed rhombic tensor component NLSAXRH = non-linear least squares fitting with fixed axial and rhombic tensor component More...
 

Public Member Functions

 PCSSingleSet (std::string const &filename, std::string const &metal_ion_label, pose::Pose const &pose)
 construct from pcs datafile set default values for PCSSingleSet weight, single_pcs_weighting_scheme and computation type More...
 
 PCSSingleSet (std::string const &filename, std::string const &metal_ion_label, pose::Pose const &pose, Real const weight, std::string single_pcs_weigting="CONST", std::string computation_type="SVD")
 constructor with full argument list More...
 
 PCSSingleSet (PCSSingleSet const &other)
 copy constructor More...
 
PCSSingleSetoperator= (PCSSingleSet const &rhs)
 assignment operator More...
 
 ~PCSSingleSet ()
 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 (Vector const &metal_coord)
 updates matrix_A using the metal coordinates it gets from the grid search of the PCSMultiSet object hands matrix_A over to the SVD solver too More...
 
Real solve_tensor_and_compute_score_by_svd (Vector const &metal_coord)
 solves the PCS tensor using SVD and returns the weighted PCS score according to the single PCS weighting scheme More...
 
Real solve_tensor_and_compute_score_by_nls (Vector const &metal_coord)
 solves the PCS tensor using NLS and returns the weighted PCS score according to the single PCS weighting scheme More...
 
Real compute_pcs_values_and_score_from_tensor (PCSTensor const &tensor)
 calculate PCS values from a given tensor, set values in the PCSSingle vector and return the PCS score More...
 
Real compute_pcs_values_and_score_from_tensor ()
 calculate PCS values and the PCS score from the dataset's current tensor More...
 
void set_atom_derivatives (pose::Pose &pose)
 sets the xyz derivative of the PCS PCSTensor 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
 
Real get_scaling_factor () const
 
Size get_number_pcs () const
 
std::string get_dataset_name () const
 
std::string get_metal_ion_label () const
 
utility::vector1< PCSSingle >
const & 
get_single_pcs_vec () const
 
ObjexxFCL::FArray2D< Real > const & get_matrix_A () const
 
ObjexxFCL::FArray1D< Real > const & get_pcs_values () const
 
ObjexxFCL::FArray1D< Real > const & get_pcs_single_weights () const
 
PCSTensorCOP get_tensor_const () const
 
PCSTensorOP get_tensor ()
 
COMPUTATION_TYPE get_computation_type () const
 
NMR_VALUE_AVERAGING_TYPE get_averaging_type () const
 
utility::vector1
< utility::vector1
< utility::vector1< Vector >
> > const & 
get_spin_coordinates () const
 
utility::fixedsizearray1< Real, 6 >
const & 
get_metal_coord_bounds () const
 
bool normalized_data () const
 
bool symmetric_pcs_calc () const
 
void set_weight (Real weight)
 
void set_tensor (PCSTensorOP const &tensor)
 
void set_metal_coord_bounds (utility::fixedsizearray1< Real, 6 > const &metal_coord_bounds)
 
void set_computation_type (std::string const &type)
 
void set_averaging_type (std::string const &type)
 
void show (std::ostream &TR) const
 

Private Member Functions

 PCSSingleSet ()
 default constructor More...
 
void init_from_pcs_filedata (std::string const &filename, pose::Pose const &pose)
 utility function used in constructor to initialize PCSSingelSet object from pcs data file and pose. More...
 
void register_options ()
 register options More...
 
void init_from_cml ()
 
void fill_matrix_A_row (utility::fixedsizearray1< Real, 5 > &A_row, utility::vector1< Vector > const &spin_coords, Vector const &metal_coord, Real const &scal=1.0)
 utility function to fill matrix_A that is used for SVD in PCSSingleSet We average the PCS here over the number of equivalent spins (e.g. methyl protons). More...
 
void convert_string_to_computation_type (std::string const &computation_type)
 utility functions to convert string to class specific enums More...
 
Real basic_pcs_equation (utility::fixedsizearray1< Real, 5 > const &par, Vector const &spin_coord, Matrix const &rotM, Real const &scal=1.0)
 utility function that calculates one single PCS value given the input arguments xM, yM, zM, Xax, Xrh, the spin coordinates, a rotation matrix and a scaling factor More...
 
Real fpcs (Real const *par, utility::vector1< Vector > const &spin_coord, Matrix const &rotM, Real const &scal=1.0)
 utility functions to calculate the PCS from different sets of input arguments arguments are a pointer to the parameters (xM, yM, zM, Xax, Xrh), the coordinates of equivalent spins, a rotation matrix that must be previously constructed from the Euler angles and a scaling factor. Fixed values of Xax and Xrh can be provided. More...
 
Real fpcs_Xax (Real const *par, Real const &Xax, utility::vector1< Vector > const &spin_coord, Matrix const &rotM, Real const &scal=1.0)
 
Real fpcs_Xrh (Real const *par, Real const &Xrh, utility::vector1< Vector > const &spin_coord, Matrix const &rotM, Real const &scal=1.0)
 
Real fpcs_Xax_Xrh (Real const *par, Real const &Xax, Real const &Xrh, utility::vector1< Vector > const &spin_coord, Matrix const &rotM, Real const &scal=1.0)
 

Private Attributes

std::string dataset_name_
 
std::string metal_ion_label_
 
utility::vector1< PCSSinglepcs_single_vec_
 
Real weight_
 
Real scaling_factor_
 
Size number_pcs_
 
ObjexxFCL::FArray2D< Realmatrix_A_
 
ObjexxFCL::FArray1D< Realpcs_values_
 
ObjexxFCL::FArray1D< Realpcs_single_weights_
 
PCSTensorOP tensor_
 
basic::svd::SVD_SolverOP svd_solver_
 
SINGLE_NMR_VALUE_WEIGHTING single_pcs_weighting_scheme_
 
COMPUTATION_TYPE computation_type_
 
utility::vector1
< utility::vector1
< utility::vector1< Vector > > > 
spin_coordinates_
 
utility::fixedsizearray1< Real, 6 > metal_coord_bounds_
 
bool normalized_data_
 
bool symmetric_pcs_calc_
 
NMR_VALUE_AVERAGING_TYPE ave_type_
 
Size nls_repeats_
 

Friends

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

Member Enumeration Documentation

type of tensor and score calculation SVD = singular value decomposition (coupled with grid search) NLS = non-linear least squares fitting NLSAX = non-linear least squares fitting with fixed axial tensor component NLSRH = non-linear least squares fitting with fixed rhombic tensor component NLSAXRH = non-linear least squares fitting with fixed axial and rhombic tensor component

Enumerator
SVD 
NLS 
NLSAX 
NLSRH 
NLSAXRH 

Constructor & Destructor Documentation

core::scoring::nmr::pcs::PCSSingleSet::PCSSingleSet ( std::string const &  filename,
std::string const &  metal_ion_label,
pose::Pose const &  pose 
)

construct from pcs datafile set default values for PCSSingleSet weight, single_pcs_weighting_scheme and computation type

constructor with arguments set default values for PCSSingleSet weight, single_pcs_weighting_scheme and computation type

References computation_type_, core::scoring::nmr::CONST, init_from_cml(), init_from_pcs_filedata(), register_options(), single_pcs_weighting_scheme_, and SVD.

core::scoring::nmr::pcs::PCSSingleSet::PCSSingleSet ( std::string const &  filename,
std::string const &  metal_ion_label,
pose::Pose const &  pose,
Real const  weight,
std::string  single_pcs_weigting = "CONST",
std::string  computation_type = "SVD" 
)
core::scoring::nmr::pcs::PCSSingleSet::PCSSingleSet ( PCSSingleSet const &  other)

copy constructor

core::scoring::nmr::pcs::PCSSingleSet::~PCSSingleSet ( )

destructor

core::scoring::nmr::pcs::PCSSingleSet::PCSSingleSet ( )
private

default constructor

Member Function Documentation

Real core::scoring::nmr::pcs::PCSSingleSet::basic_pcs_equation ( utility::fixedsizearray1< Real, 5 > const &  par,
Vector const &  spin_coord,
Matrix const &  rotM,
Real const &  scal = 1.0 
)
private

utility function that calculates one single PCS value given the input arguments xM, yM, zM, Xax, Xrh, the spin coordinates, a rotation matrix and a scaling factor

References core::scoring::pcs, and protocols::hybridization::r2.

Referenced by fpcs(), fpcs_Xax(), fpcs_Xax_Xrh(), and fpcs_Xrh().

Real core::scoring::nmr::pcs::PCSSingleSet::compute_pcs_values_and_score_from_tensor ( PCSTensor const &  tensor)
Real core::scoring::nmr::pcs::PCSSingleSet::compute_pcs_values_and_score_from_tensor ( )

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

References tensor_.

void core::scoring::nmr::pcs::PCSSingleSet::convert_string_to_computation_type ( std::string const &  computation_type)
private

utility functions to convert string to class specific enums

References computation_type_, NLS, NLSAX, NLSAXRH, NLSRH, protocols::kinmatch::str(), and SVD.

Referenced by PCSSingleSet(), and set_computation_type().

void core::scoring::nmr::pcs::PCSSingleSet::fill_matrix_A_row ( utility::fixedsizearray1< Real, 5 > &  A_row,
utility::vector1< Vector > const &  spin_coords,
Vector const &  metal_coord,
Real const &  scal = 1.0 
)
private

utility function to fill matrix_A that is used for SVD in PCSSingleSet We average the PCS here over the number of equivalent spins (e.g. methyl protons).

References ave_type_, core::scoring::nmr::MEAN, and protocols::hybridization::r2.

Referenced by compute_pcs_values_and_score_from_tensor(), and update_matrix_A().

Real core::scoring::nmr::pcs::PCSSingleSet::fpcs ( Real const *  par,
utility::vector1< Vector > const &  spin_coord,
Matrix const &  rotM,
Real const &  scal = 1.0 
)
private

utility functions to calculate the PCS from different sets of input arguments arguments are a pointer to the parameters (xM, yM, zM, Xax, Xrh), the coordinates of equivalent spins, a rotation matrix that must be previously constructed from the Euler angles and a scaling factor. Fixed values of Xax and Xrh can be provided.

utility functions to calculate the PCS from different sets of input arguments arguments are a pointer to the parameters (xM, yM, zM, Xax, Xrh), the coordinates of equivalent spins, a rotation matrix that must be previously constructed from the Euler angles and a scaling factor. Fixed values of Xax and Xrh can be provided. We average the PCS here over the number of equivalent spins (e.g. methyl protons).

References ave_type_, basic_pcs_equation(), core::scoring::nmr::MEAN, and core::scoring::pcs.

Referenced by compute_pcs_values_and_score_from_tensor(), core::scoring::nmr::pcs::pcs_erf(), set_atom_derivatives(), and solve_tensor_and_compute_score_by_nls().

Real core::scoring::nmr::pcs::PCSSingleSet::fpcs_Xax ( Real const *  par,
Real const &  Xax,
utility::vector1< Vector > const &  spin_coord,
Matrix const &  rotM,
Real const &  scal = 1.0 
)
private
Real core::scoring::nmr::pcs::PCSSingleSet::fpcs_Xax_Xrh ( Real const *  par,
Real const &  Xax,
Real const &  Xrh,
utility::vector1< Vector > const &  spin_coord,
Matrix const &  rotM,
Real const &  scal = 1.0 
)
private
Real core::scoring::nmr::pcs::PCSSingleSet::fpcs_Xrh ( Real const *  par,
Real const &  Xrh,
utility::vector1< Vector > const &  spin_coord,
Matrix const &  rotM,
Real const &  scal = 1.0 
)
private
NMR_VALUE_AVERAGING_TYPE core::scoring::nmr::pcs::PCSSingleSet::get_averaging_type ( ) const
inline

References ave_type_.

COMPUTATION_TYPE core::scoring::nmr::pcs::PCSSingleSet::get_computation_type ( ) const
inline

References computation_type_.

std::string core::scoring::nmr::pcs::PCSSingleSet::get_dataset_name ( ) const
inline

References dataset_name_.

ObjexxFCL::FArray2D<Real> const& core::scoring::nmr::pcs::PCSSingleSet::get_matrix_A ( ) const
inline

References matrix_A_.

utility::fixedsizearray1<Real,6> const& core::scoring::nmr::pcs::PCSSingleSet::get_metal_coord_bounds ( ) const
inline

References metal_coord_bounds_.

std::string core::scoring::nmr::pcs::PCSSingleSet::get_metal_ion_label ( ) const
inline

References metal_ion_label_.

Size core::scoring::nmr::pcs::PCSSingleSet::get_number_pcs ( ) const
inline

References number_pcs_.

ObjexxFCL::FArray1D<Real> const& core::scoring::nmr::pcs::PCSSingleSet::get_pcs_single_weights ( ) const
inline

References pcs_single_weights_.

ObjexxFCL::FArray1D<Real> const& core::scoring::nmr::pcs::PCSSingleSet::get_pcs_values ( ) const
inline

References pcs_values_.

Real core::scoring::nmr::pcs::PCSSingleSet::get_scaling_factor ( ) const
inline

References scaling_factor_.

utility::vector1<PCSSingle> const& core::scoring::nmr::pcs::PCSSingleSet::get_single_pcs_vec ( ) const
inline

References pcs_single_vec_.

utility::vector1< utility::vector1< utility::vector1< Vector > > > const& core::scoring::nmr::pcs::PCSSingleSet::get_spin_coordinates ( ) const
inline

References spin_coordinates_.

PCSTensorOP core::scoring::nmr::pcs::PCSSingleSet::get_tensor ( )
inline

References tensor_.

PCSTensorCOP core::scoring::nmr::pcs::PCSSingleSet::get_tensor_const ( ) const
inline

References tensor_.

Real core::scoring::nmr::pcs::PCSSingleSet::get_weight ( ) const
inline

References weight_.

void core::scoring::nmr::pcs::PCSSingleSet::init_from_cml ( )
private
void core::scoring::nmr::pcs::PCSSingleSet::init_from_pcs_filedata ( std::string const &  filename,
pose::Pose const &  pose 
)
private
bool core::scoring::nmr::pcs::PCSSingleSet::normalized_data ( ) const
inline

References normalized_data_.

PCSSingleSet & core::scoring::nmr::pcs::PCSSingleSet::operator= ( PCSSingleSet const &  rhs)
void core::scoring::nmr::pcs::PCSSingleSet::register_options ( )
private

register options

Referenced by PCSSingleSet().

void core::scoring::nmr::pcs::PCSSingleSet::set_atom_derivatives ( pose::Pose pose)
void core::scoring::nmr::pcs::PCSSingleSet::set_averaging_type ( std::string const &  type)
void core::scoring::nmr::pcs::PCSSingleSet::set_computation_type ( std::string const &  type)
void core::scoring::nmr::pcs::PCSSingleSet::set_metal_coord_bounds ( utility::fixedsizearray1< Real, 6 > const &  metal_coord_bounds)
inline

References metal_coord_bounds_.

void core::scoring::nmr::pcs::PCSSingleSet::set_tensor ( PCSTensorOP const &  tensor)
inline

References tensor_.

void core::scoring::nmr::pcs::PCSSingleSet::set_weight ( Real  weight)
inline

References weight_.

void core::scoring::nmr::pcs::PCSSingleSet::show ( std::ostream &  TR) const
Real core::scoring::nmr::pcs::PCSSingleSet::solve_tensor_and_compute_score_by_nls ( Vector const &  metal_coord)
Real core::scoring::nmr::pcs::PCSSingleSet::solve_tensor_and_compute_score_by_svd ( Vector const &  metal_coord)

solves the PCS tensor using SVD and returns the weighted PCS score according to the single PCS weighting scheme

solves the PCS tensor using SVD and returns the weighted PCS score according to the single PCS weighting scheme matrix A and spin coordinates must have been updated before calling this function for the first time

References dataset_name_, matrix_A_, number_pcs_, pcs_single_vec_, pcs_single_weights_, pcs_values_, protocols::hybridization::score, svd_solver_, tensor_, core::scoring::nmr::pcs::TR(), and update_matrix_A().

bool core::scoring::nmr::pcs::PCSSingleSet::symmetric_pcs_calc ( ) const
inline

References symmetric_pcs_calc_.

void core::scoring::nmr::pcs::PCSSingleSet::update_matrix_A ( Vector const &  metal_coord)

updates matrix_A using the metal coordinates it gets from the grid search of the PCSMultiSet object hands matrix_A over to the SVD solver too

References fill_matrix_A_row(), matrix_A_, number_pcs_, pcs_values_, scaling_factor_, spin_coordinates_, and svd_solver_.

Referenced by set_atom_derivatives(), and solve_tensor_and_compute_score_by_svd().

void core::scoring::nmr::pcs::PCSSingleSet::update_spin_coordinates ( pose::Pose const &  pose)

Friends And Related Function Documentation

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

pcs error function used in the lmmin function

  • par is an array of fit parameters [alpha, beta, gamma, xM, yM, zM, scal, (Xax, Xrh)]
  • data is a pointer to the the PCSSingleSet object i.e. to all data needed for PCS calculation and NLS fitting
  • fvc is an array holding the residuals of the fit calculation
  • par is an array of fit parameters [alpha, beta, gamma, xM, yM, zM, (Xax, Xrh)]
  • data is a pointer to the the PCSSingleSet object i.e. to all data needed for PCS 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

NMR_VALUE_AVERAGING_TYPE core::scoring::nmr::pcs::PCSSingleSet::ave_type_
private
COMPUTATION_TYPE core::scoring::nmr::pcs::PCSSingleSet::computation_type_
private
std::string core::scoring::nmr::pcs::PCSSingleSet::dataset_name_
private
ObjexxFCL::FArray2D<Real> core::scoring::nmr::pcs::PCSSingleSet::matrix_A_
private
utility::fixedsizearray1<Real,6> core::scoring::nmr::pcs::PCSSingleSet::metal_coord_bounds_
private
std::string core::scoring::nmr::pcs::PCSSingleSet::metal_ion_label_
private

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

Size core::scoring::nmr::pcs::PCSSingleSet::nls_repeats_
private
bool core::scoring::nmr::pcs::PCSSingleSet::normalized_data_
private
Size core::scoring::nmr::pcs::PCSSingleSet::number_pcs_
private
utility::vector1<PCSSingle> core::scoring::nmr::pcs::PCSSingleSet::pcs_single_vec_
private
ObjexxFCL::FArray1D<Real> core::scoring::nmr::pcs::PCSSingleSet::pcs_single_weights_
private
ObjexxFCL::FArray1D<Real> core::scoring::nmr::pcs::PCSSingleSet::pcs_values_
private
Real core::scoring::nmr::pcs::PCSSingleSet::scaling_factor_
private
SINGLE_NMR_VALUE_WEIGHTING core::scoring::nmr::pcs::PCSSingleSet::single_pcs_weighting_scheme_
private
utility::vector1< utility::vector1< utility::vector1< Vector > > > core::scoring::nmr::pcs::PCSSingleSet::spin_coordinates_
private
basic::svd::SVD_SolverOP core::scoring::nmr::pcs::PCSSingleSet::svd_solver_
private
bool core::scoring::nmr::pcs::PCSSingleSet::symmetric_pcs_calc_
private
PCSTensorOP core::scoring::nmr::pcs::PCSSingleSet::tensor_
private
Real core::scoring::nmr::pcs::PCSSingleSet::weight_
private

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