paramagpy.fit.nlr_fit_metal_from_pre

paramagpy.fit.nlr_fit_metal_from_pre(initMetals, dataArrays, rtypes, params=('x', 'y', 'z'), usesbm=True, usegsbm=False, usedsa=True, usecsa=False, ensembleAverage=False, progress=None)[source]

Fit Chi tensor to PRE values using non-linear regression.

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().

  • rtypes (list of str, optional) – the relaxtion type, either ‘r1’ or ‘r2’. A list must be provided with each element corresponding to an associated dataset. Defaults to ‘r2’ for all datasets of None is specified.

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

  • usesbm (bool, optional) – include Solomon-Bloemenbergen-Morgan (Dipole-dipole) relaxation theory. default is True

  • usegsbm (bool, optional) – include anisotropic dipolar relaxation theory. note that the g-tensor must be set for this default is False

  • usedsa (bool, optional) – include Dipolar-Shielding-Anisotropy (Curie Spin) relaxation theory. default is True

  • usecsa (bool, optional) – include Chemical-Shift-Anisotropy cross-correlated realxation theory. default is False

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