EMSL-Computing / CoreMS

CoreMS is a comprehensive mass spectrometry software framework
BSD 2-Clause "Simplified" License
51 stars 25 forks source link

Update Nitrogen Rule to Include all heteroatoms and covalences #17

Closed corilo closed 6 months ago

corilo commented 6 months ago

This PR solves the issue that only a few atoms were used to account for the number of hydrogen a molecule should have based on the type and covalence of atoms by expanding it into all atoms and choosing covalence.

Also added fix for Iron, Si and B, on constant module

corilo commented 6 months ago

With the current structure changes the covalence of an atom, the following setting needs to be modified:

MSParameters.molecular_search.used_atom_valences['B'] = 3 Otherwise, the first number from each atom at

corems.encapsulation.constant.Atoms.atoms_covalence is used.

The setting has to be entered before the database creation step, which occurs during the SearchMolecularFormula class execution.