Skip to content

calculateMass: clarify or enhance behaviour for charged formulas #59

Description

@meowcat

Currently calculateMass("[C6H12]+") == calculateMass("C6H12")
Strictly, this should be calculateMass("[C6H12]+") == calculateMass("C6H12") - .emass where .emass == 0.0005485799
Questions:

  • is calculateMass("[C6H12]+") out-of-scope for this function, and should this throw a warning or error?
  • otherwise, should it give the correct result?
  • or, should there be an argument calculateMass(x, charge)?

Note: the rcdk equivalent is get.formula(formula, charge)@mass . Notably, get.formula("[C6H6]+") also does not account for the charge (but creates the neutral formula). However here the user can specify the charge manually.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions