![]() |
Rosetta
2020.11
|
#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... | |
PCSSingleSet & | operator= (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< PCSSingle > | pcs_single_vec_ |
Real | weight_ |
Real | scaling_factor_ |
Size | number_pcs_ |
ObjexxFCL::FArray2D< Real > | matrix_A_ |
ObjexxFCL::FArray1D< Real > | pcs_values_ |
ObjexxFCL::FArray1D< Real > | pcs_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... | |
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 |
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" |
||
) |
constructor with full argument list
References convert_string_to_computation_type(), core::scoring::nmr::convert_string_to_weighting_scheme(), init_from_cml(), init_from_pcs_filedata(), register_options(), and single_pcs_weighting_scheme_.
core::scoring::nmr::pcs::PCSSingleSet::PCSSingleSet | ( | PCSSingleSet const & | other | ) |
copy constructor
core::scoring::nmr::pcs::PCSSingleSet::~PCSSingleSet | ( | ) |
destructor
|
private |
default constructor
|
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 | ) |
calculate PCS values from a given tensor, set values in the PCSSingle vector and return the PCS score
calculate PCS values from a given tensor and set values in the PCSSingle vector
References fill_matrix_A_row(), fpcs(), core::scoring::nmr::NMRTensor::get_alpha(), core::scoring::nmr::NMRTensor::get_ax(), core::scoring::nmr::NMRTensor::get_beta(), core::scoring::nmr::NMRTensor::get_euler_convention(), core::scoring::nmr::NMRTensor::get_gamma(), core::scoring::nmr::pcs::PCSTensor::get_metal_center(), core::scoring::nmr::NMRTensor::get_rh(), core::scoring::nmr::NMRTensor::get_T_xx(), core::scoring::nmr::NMRTensor::get_T_xy(), core::scoring::nmr::NMRTensor::get_T_xz(), core::scoring::nmr::NMRTensor::get_T_yy(), core::scoring::nmr::NMRTensor::get_T_yz(), core::scoring::nmr::pcs::PCSTensor::is_pcs_tensor_in_arbitrary_frame(), core::scoring::nmr::pcs::PCSTensor::is_pcs_tensor_in_pas(), number_pcs_, pcs_single_vec_, pcs_single_weights_, pcs_values_, core::scoring::nmr::rotation_matrix_from_euler_angles(), scaling_factor_, protocols::hybridization::score, and spin_coordinates_.
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_.
|
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().
|
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().
|
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().
|
private |
References ave_type_, basic_pcs_equation(), core::scoring::nmr::MEAN, and core::scoring::pcs.
Referenced by core::scoring::nmr::pcs::pcs_erf().
|
private |
References ave_type_, basic_pcs_equation(), core::scoring::nmr::MEAN, and core::scoring::pcs.
Referenced by core::scoring::nmr::pcs::pcs_erf().
|
private |
References ave_type_, basic_pcs_equation(), core::scoring::nmr::MEAN, and core::scoring::pcs.
Referenced by core::scoring::nmr::pcs::pcs_erf().
|
inline |
References ave_type_.
|
inline |
References computation_type_.
|
inline |
References dataset_name_.
|
inline |
References matrix_A_.
|
inline |
References metal_coord_bounds_.
|
inline |
References metal_ion_label_.
|
inline |
References number_pcs_.
|
inline |
References pcs_single_weights_.
|
inline |
References pcs_values_.
|
inline |
References scaling_factor_.
|
inline |
References pcs_single_vec_.
|
inline |
References spin_coordinates_.
|
inline |
References tensor_.
|
inline |
References tensor_.
|
private |
References nls_repeats_, normalized_data_, and symmetric_pcs_calc_.
Referenced by PCSSingleSet().
|
private |
utility function used in constructor to initialize PCSSingelSet object from pcs data file and pose.
utility function used in constructor to initialize PCSSingelSet object from filedata and pose.
References core::scoring::nmr::CONST, dataset_name_, core::scoring::nmr::pcs::PCSSingle::get_protein_spins(), core::pose::symmetry::is_symmetric(), core::conformation::symmetry::is_symmetric(), matrix_A_, core::simple_metrics::metrics::mean, normalized_data_, number_pcs_, core::scoring::nmr::OBSIG, pcs_single_vec_, pcs_single_weights_, pcs_values_, core::io::nmr::read_pcs_datafile(), scaling_factor_, core::scoring::nmr::SIGMA, single_pcs_weighting_scheme_, spin_coordinates_, symmetric_pcs_calc_, core::pose::symmetry::symmetry_info(), and core::scoring::nmr::pcs::TR().
Referenced by PCSSingleSet().
|
inline |
References normalized_data_.
PCSSingleSet & core::scoring::nmr::pcs::PCSSingleSet::operator= | ( | PCSSingleSet const & | rhs | ) |
assignment operator
References ave_type_, computation_type_, dataset_name_, matrix_A_, metal_coord_bounds_, metal_ion_label_, nls_repeats_, normalized_data_, number_pcs_, pcs_single_vec_, pcs_single_weights_, pcs_values_, scaling_factor_, single_pcs_weighting_scheme_, spin_coordinates_, svd_solver_, symmetric_pcs_calc_, tensor_, and weight_.
|
private |
register options
Referenced by PCSSingleSet().
void core::scoring::nmr::pcs::PCSSingleSet::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
sets the xyz derivative of the PCS PCSTensor must be determined previously call solve_tensor_and_compute_score_by_svd() or solve_tensor_and_compute_score_by_nls() first
References core::scoring::nmr::apply_tensor_transformation(), core::scoring::nmr::apply_vector_transformation(), fpcs(), core::pose::symmetry::is_symmetric(), core::conformation::symmetry::is_symmetric(), matrix_A_, number_pcs_, pcs_single_vec_, pcs_single_weights_, pcs_values_, protocols::hybridization::r2, core::scoring::nmr::rotation_matrix_from_euler_angles(), scaling_factor_, spin_coordinates_, core::pose::symmetry::symmetry_info(), tensor_, and update_matrix_A().
void core::scoring::nmr::pcs::PCSSingleSet::set_averaging_type | ( | std::string const & | type | ) |
References ave_type_, and core::scoring::nmr::convert_string_to_averaging_type().
void core::scoring::nmr::pcs::PCSSingleSet::set_computation_type | ( | std::string const & | type | ) |
References convert_string_to_computation_type().
|
inline |
References metal_coord_bounds_.
|
inline |
References tensor_.
void core::scoring::nmr::pcs::PCSSingleSet::show | ( | std::ostream & | TR | ) | const |
References computation_type_, dataset_name_, number_pcs_, pcs_single_vec_, SVD, tensor_, and weight_.
Real core::scoring::nmr::pcs::PCSSingleSet::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
References computation_type_, dataset_name_, fpcs(), NLS, nls_repeats_, NLSAX, NLSAXRH, NLSRH, number_pcs_, pcs_erf, pcs_single_vec_, pcs_single_weights_, pcs_values_, core::scoring::nmr::rotation_matrix_from_euler_angles(), scaling_factor_, protocols::hybridization::score, spin_coordinates_, SVD, core::id::swap(), tensor_, and core::scoring::nmr::pcs::TR().
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().
|
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 | ) |
updates the spin coordinates every time the pose is changed make sure that this function is called before update_matrix_A() is called
References core::conformation::Residue::atom(), core::pose::symmetry::is_symmetric(), core::conformation::symmetry::is_symmetric(), number_pcs_, pcs_single_vec_, core::pose::Pose::residue(), spin_coordinates_, symmetric_pcs_calc_, core::pose::symmetry::symmetry_info(), and core::conformation::Atom::xyz().
pcs error function used in the lmmin function
Referenced by solve_tensor_and_compute_score_by_nls().
|
private |
Referenced by fill_matrix_A_row(), fpcs(), fpcs_Xax(), fpcs_Xax_Xrh(), fpcs_Xrh(), get_averaging_type(), operator=(), and set_averaging_type().
|
private |
|
private |
|
private |
|
private |
Referenced by get_metal_coord_bounds(), operator=(), core::scoring::nmr::pcs::pcs_erf(), and set_metal_coord_bounds().
|
private |
Referenced by get_metal_ion_label(), and operator=().
|
private |
Referenced by init_from_cml(), operator=(), and solve_tensor_and_compute_score_by_nls().
|
private |
Referenced by init_from_cml(), init_from_pcs_filedata(), normalized_data(), and operator=().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by init_from_pcs_filedata(), operator=(), and PCSSingleSet().
|
private |
|
private |
Referenced by operator=(), solve_tensor_and_compute_score_by_svd(), and update_matrix_A().
|
private |
Referenced by init_from_cml(), init_from_pcs_filedata(), operator=(), symmetric_pcs_calc(), and update_spin_coordinates().
|
private |
|
private |
Referenced by get_weight(), operator=(), set_weight(), and show().