#1347 MassToFormulaTool MfRange violation

cdk-1.4.x
wont-fix
nobody
None
1
2014-12-31
2014-07-23
No

When adding an element rule (IRule) to the MassToFormulaTool, the element occurrence bounds (set via a MolecularFormulaRange that is passed as parameter to the element rule), are not fully observed by the MassToFormulaTool.

A calculation for mass 101.01 for elements C,H,N,O with a mass tolerance of 0.5 and element occurrence limits of 0-30 for all elements but Carbon, which is set to 6-7 instead, results in the sum formula C4H11N3, violating the Carbon lower bound.

Related

Bugs: #1347

Discussion

  • John May

    John May - 2014-07-23

    Hi Stephan,

    Do you have a code example so i can debug?

     
    • Anonymous - 2014-07-23

      Hi John,

      I do indeed. Please see attachment.

      I didn't change the tolerance value in the code example as it does not make
      a difference.

      Cheers,

      Stephan

      From: John May [mailto:jwmay@users.sf.net]
      Sent: 23 July 2014 14:58
      To: [cdk:bugs]
      Subject: [cdk:bugs] #1347 MassToFormulaTool MfRange violation

      Hi Stephan,

      Do you have a code example so i can debug?


      [bugs:#1347] http://sourceforge.net/p/cdk/bugs/1347 MassToFormulaTool
      MfRange violation

      Status: open
      Group: cdk-1.4.x
      Created: Wed Jul 23, 2014 09:22 AM UTC by SBeisken
      Last Updated: Wed Jul 23, 2014 09:22 AM UTC
      Owner: nobody

      When adding an element rule (IRule) to the MassToFormulaTool, the element
      occurrence bounds (set via a MolecularFormulaRange that is passed as
      parameter to the element rule), are not fully observed by the
      MassToFormulaTool.

      A calculation for mass 101.01 for elements C,H,N,O with a mass tolerance of
      0.5 and element occurrence limits of 0-30 for all elements but Carbon, which
      is set to 6-7 instead, results in the sum formula C4H11N3, violating the
      Carbon lower bound.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cdk/bugs/1347/
      https://sourceforge.net/p/cdk/bugs/1347

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions

       

      Related

      Bugs: #1347

  • Tomas Pluskal

    Tomas Pluskal - 2014-12-31

    MassToFormulaTool has been deprecated since CDK version 1.5.10.
    Please use the new MolecularFormulaGenerator class, which does not suffer from this bug.

     
  • John May

    John May - 2014-12-31
    • status: open --> wont-fix
     
  • Egon Willighagen

    John, I haven't updated these things recently, but this is basically what the @cdk.bug tag is for... to have the JavaDoc point to bug reports for open issues, which can include bugs that may never get fixed. That way, users can see what issues there are with some code.