Builtins¶
This module provides several built-in models for incoherent neutron scattering data fitting.
These functions generate a Model class instance.
-
nPDyn.models.builtins.modelCalibratedD2O(q, name='$D_2O$', volFraction=1, temp=300, **kwargs)¶ A model for D2O background containing a single Lorentzian.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
-
nPDyn.models.builtins.modelD2OBackground(q, name='$D_2O$', **kwargs)¶ A model for D2O background containing a single Lorentzian.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
-
nPDyn.models.builtins.modelGaussBkgd(q, name='GaussBkgd', **kwargs)¶ A model containing a Gaussian with a background term.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
-
nPDyn.models.builtins.modelGeneralizedLorentzian(q, name='GeneralizedLorentzian', qWise=True, **kwargs)¶ A model containing a delta and a generalized lorentzian.
This model has been described elsewhere [1].
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
References
[1] https://doi.org/10.1063/1.5121703
-
nPDyn.models.builtins.modelLorentzianSum(q, name='LorentzianSum', nLor=2, qWise=True, **kwargs)¶ A model containing a delta and a sum of Lorentzians.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- nLor (2) – Number of Lorentzian to be used.
- qWise (bool) – If True, no q dependence is imposed on the parameters and the each spectrum is fitted independently.
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
-
nPDyn.models.builtins.modelPVoigt(q, name='PVoigt', **kwargs)¶ A model containing a pseudo-Voigt profile.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
-
nPDyn.models.builtins.modelPVoigtBkgd(q, name='PVoigtBkgd', **kwargs)¶ A model containing a pseudo-Voigt profile with a background term.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
-
nPDyn.models.builtins.modelProteinJumpDiff(q, name='proteinJumpDiff', qWise=False, **kwargs)¶ A model for protein in liquid state.
The model contains a Lorentzian of Fickian-type diffusion accounting for center-of-mass motions, a Lorentzian of width that obeys the jump diffusion model [2] accounting for internal dynamics.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- qWise (bool) – If True, no q dependence is imposed on the parameters and the each spectrum is fitted independently.
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
References
[2] https://doi.org/10.1103/PhysRev.119.863
-
nPDyn.models.builtins.modelTwoStatesSwitchDiff(q, name='TwoStatesSwitch', **kwargs)¶ A model for protein in liquid state.
This model implements the two states switching diffusion model for nPDyn [3].
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.
References
[3] https://doi.org/10.1103/PhysRev.119.863
-
nPDyn.models.builtins.modelWater(q, name='waterDynamics', **kwargs)¶ A model containing a delta, a Lorentzian for translational motions, a Lorentzian for rotational motions, and a background term.
Parameters: - q (np.ndarray) – Array of values for momentum transfer q.
- name (str) – Name for the model
- kwargs (dict) – Additional arguments to pass to Parameters. Can override default parameter attributes.