paramagpy.fit.svd_gridsearch_fit_metal_from_pcs¶
- paramagpy.fit.svd_gridsearch_fit_metal_from_pcs(initMetals, dataArrays, ensembleAverage=False, origin=None, radius=20.0, points=16, offsetShift=False, progress=None)[source]¶
Fit deltaChi tensor to PCS values using Single Value Decomposition over a grid of points in a sphere. Note this uses a weighted SVD fit which takes into account experimental errors
- Parameters
initMetals (list of Metal objects) – a list of metals used as starting points for fitting. a list must always be provided, but may also contain only one element. If multiple metals are provided, each metal is fitted to their respective PCS dataset by index in <dataArrays, but all are fitted to a common position.
dataArrays (list of PCS dataArray) – each PCS dataArray must correspond to an associated metal for fitting. each PCS dataArray has structure determined by
paramagpy.protein.CustomStructure.parse()
.ensembleAverage (bool, optional) – when False, each model of the structure is fit independently. The parameters for each fitted tensor are then averaged before returning the final averaged tensor. When True, the structure models are treated as an ensemble and ensemble averaging of calculated PCS/PRE/RDC/CCR values is conducted at all stages of fitting to fit a single tensor to all models simultaneously. The ‘idx’ column of the dataArray determines the ensemble averaging behaviour with common indices for atoms between models resulting in their summation.
origin (float, optional) – the centre of the gridsearch of positions in Angstroms. If None, the position of the first metal is used
radius (float, optional) – the radius of the gridsearch in Angstroms.
points (int, optional) – the number of points per radius in the gridsearch
offsetShift (bool, optional) – if True, an offset value added to all PCS values is included in the SVD fitting. This may arise due to a referencing error between diamagnetic and paramagnetic PCS datasets and may be used when many data points are available. Default False, no offset is included in the fitting.
progress (object, optional) – to keep track of the calculation, progress.set(x) is called each iteration and varies from 0.0 -> 1.0 when the calculation is complete.
- Returns
fitMetals (list of metals) – a list of the fitted tensors.
dataArrays (list of dataArray) – each dataArray is copy of the original dataArray with the ‘cal’ column populated with back-calculated values from the fitted tensor.