Although we have not been explicit so far in the decomposition discussion, we have used an elution model called EGH – Exponential-Gaussian hybrid – to express each component elution. The EGH model was introduced to enable asymmetric peak fitting. It is used as the default model because it is “mathematically simple and numerically stable.” However, it is so flexible that there is a risk it can fit unrealistic decompositions. To cope with this issue, advanced models are introduced.
Preliminary Decomposition¶
As an example, let us examine the best result using the default EGH model from the previous chapter. Note that the proportins [3, 1.86, 1] used below attained the minimum objective function value.
from molass import get_version
assert get_version() >= '0.6.0', "This tutorial requires molass version 0.6.0 or higher."
from molass_data import SAMPLE4
from molass.DataObjects import SecSaxsData as SSD
ssd = SSD(SAMPLE4)
trimmed_ssd = ssd.trimmed_copy()
corrected_ssd = trimmed_ssd.corrected_copy()
decomposition = corrected_ssd.quick_decomposition(proportions=[3., 1.85714286, 1.])
decomposition.plot_components(title="EGH decomposition of sample4 with proportions [3, 1.86, 1]");
Stochastic Dispersive Model¶
One of the advanced models is SDM - Stochastic Dispersive Model. To use this model do as follows. Details of SDM will be described in Molass Essence.
sdm_decomposition = decomposition.optimize_with_model('SDM')
sdm_decomposition.plot_components(title="SDM decomposition of sample4 from EGH result");C:\Users\takahashi\AppData\Local\Temp\ipykernel_24664\3350010379.py:1: DeprecationWarning: optimize_with_model is deprecated; use upgrade() instead.
sdm_decomposition = decomposition.optimize_with_model('SDM')
C:\Users\takahashi\GitHub\molass-library\molass\SEC\Models\SdmOptimizer.py:364: OptimizeWarning: Initial guess is not within the specified bounds
r = minimize(objective_function, start, bounds=bounds, method=method,
Adjusted poresize from 109.998 to 112.015

Equilibrium Dispersive Model¶
Another advanced models is EDM - Equilibrium Dispersive Model. To use this model do as follows. Details of SDM will be described in Molass Essence.
edm_decomposition = decomposition.optimize_with_model('EDM')
edm_decomposition.plot_components(title="EDM decomposition of sample4 from EGH result");C:\Users\takahashi\AppData\Local\Temp\ipykernel_24664\1951352210.py:1: DeprecationWarning: optimize_with_model is deprecated; use upgrade() instead.
edm_decomposition = decomposition.optimize_with_model('EDM')
C:\Users\takahashi\GitHub\molass-legacy\molass_legacy\SecTheory\Edm.py:186: RuntimeWarning: overflow encountered in exp
numer = U*(expB - 1)*np.exp(-V)
guess_init_params: M2= 67.63656710574234
area ratio= 0.3604985162978555
guess_init_params: M2= 93.16188659924399
area ratio= 0.35523668020940713
guess_init_params: M2= 137.63219802754892
area ratio= 0.3521426147302077
C:\Users\takahashi\GitHub\molass-legacy\molass_legacy\SecTheory\Edm.py:159: RuntimeWarning: overflow encountered in exp
ret_y = cinj * _tau_inj * np.exp(-_V) / (2*_W)
C:\Users\takahashi\GitHub\molass-legacy\molass_legacy\SecTheory\Edm.py:178: RuntimeWarning: divide by zero encountered in scalar divide
U = 2/(lam*Pe)
