paramagpy.fit.nlr_fit_metal_from_ccr

paramagpy.fit.nlr_fit_metal_from_ccr(initMetals, dataArrays, params=('x', 'y', 'z'), ensembleAverage=False, progress=None)[source]

Fit Chi tensor to CCR values using non-linear regression. This algorithm applies to CSA/Curie spin cross-correlated relaxation for R2 differential line broadening.

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 PRE dataset by index in <dataArrays, but all are fitted to a common position.

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

  • params (list of str) – the parameters to be fit. For example [‘x’,’y’,’z’,’ax’,’rh’,’a’,’b’,’g’]

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