Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion corems/molecular_formula/factory/MolecularFormulaFactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ def __init__(
self._mspeak_parent._ms_parent.mspeaks_settings.kendrick_base
)
else:
kendrick_dict_base = {"C": 1, "H": 2}
from corems.encapsulation.factory.parameters import MSParameters

kendrick_dict_base = MSParameters.ms_peak.kendrick_base
self._kmd, self._kendrick_mass, self._nominal_km = self._calc_kmd(
kendrick_dict_base
)
Expand Down
4 changes: 4 additions & 0 deletions corems/ms_peak/factory/MSPeakClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def change_kendrick_base(self, kendrick_dict_base):
kendrick_dict_base
)

# Also update all associated molecular formulas
for mf in self.molecular_formulas:
mf._kmd, mf._kendrick_mass, mf._nominal_km = mf._calc_kmd(kendrick_dict_base)

def add_molecular_formula(self, molecular_formula_obj):
"""Adds a molecular formula to the peak.
Expand Down