[FIX] simplified EmpiricalFormula

Removed some methods takings String arguments that blew up the interface.
I guess this discussion exceeds the current pull request, if there are some
things that EmpiricalFormula cannot due than we should open an issue for
that.



On 14 September 2014 14:18, Timo Sachsenberg <notifications@github.com>
wrote:

> In src/openms/source/CHEMISTRY/ResidueModification.cpp:
>
> > @@ -508,7 +508,7 @@ namespace OpenMS
> >
> >    bool ResidueModification::hasNeutralLoss() const
> >    {
> > -    return neutral_loss_diff_formula_ != "";
> > +    return neutral_loss_diff_formula_.toString() != "";
>
> In principle: yes - except one wants to model e.g. a single electron
> charge.
> I think it would be a good idea to enforce this invariant.
> The problem that I see in general with this class is that it is highly
> targeted to proteomics / proton charges. It doesn't fit well with our
> metabolomics integration and I think I remember some places where some
> strange calculations are done to e.g. subtract an electron mass. Maybe
> @aiche <https://github.com/aiche> and @cbielow
> <https://github.com/cbielow> have a better understanding of it. Would it
> make sense to generalize this class to support arbitrary charges (e.g. from
> adducts)?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/OpenMS/OpenMS/pull/988/files#r17519133>.
>