paramagpy.fit.svd_fit_metal_from_rdc

paramagpy.fit.svd_fit_metal_from_rdc(initMetals, dataArrays, params=('ax', 'rh', 'a', 'b', 'g'), ensembleAverage=False, progress=None)[source]

Fit deltaChi tensor to RDC values using Single Value Decomposition. Note this is a weighted SVD calculation 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 RDC dataset by index in <dataArrays>.

  • dataArrays (list of PRE dataArray) – each RDC dataArray must correspond to an associated metal for fitting. each RDC dataArray has structure determined by paramagpy.protein.CustomStructure.parse().

  • params (list of str) – the parameters to be fit. NOTE: This is a dummy argument and does not influence the fitting. The default parameters (‘ax’,’rh’,’a’,’b’,’g’) are the only option.

  • 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.

  • 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.