#757 consider implicit hydrogen in isotope / mass calcs

Accepted
closed
nobody
None
master
1
2014-04-06
2014-04-04
John May
No

see 1338

I'm sure there are load more of these where the hydrogens are simply ignored - this patch updates three methods in the AtomContainerManipulator. Also the weight calc isn't great as it doesn't consider specific isotopes, the MolecularFormula one is much better but I don't have to time to patch this one correctly now.

1 Attachments

Related

Patches: #757

Discussion

  • John May

    John May - 2014-04-04
     
  • John May

    John May - 2014-04-04
     
  • Egon Willighagen

    "Also the weight calc isn't great as it doesn't consider specific isotopes"

    -> but it calculates not the monoisotopic mass, but the molecular weight, not? That is based on average weights for elements, not isotopes?

     
    • Egon Willighagen

      (But your code seems to do the right thing, here!)

       
      • John May

        John May - 2014-04-06

        Okay,

        I was going off Andrew Dalke’s CTR, http://ctr.wikia.com/wiki/Report_how_many_SD_file_records_are_within_a_certain_molecular_weight_range.

        He uses the OpenEye function (http://www.eyesopen.com/docs/toolkits/current/html/OEChem_TK-python/OEChemFunctions.html)

        double OECalculateMolecularWeight(const OEMolBase &mol, bool isotopic=false)
        Calculates the molecular weight of the given molecule. By default, all atoms are assumed their average atomic weight, as returned by the OEGetAverageWeight function. If the ‘isotopic’ parameter is true, and atom of the molecule that has a specified (non-zero) isotopic mass, as returned by OEAtomBase.GetIsotope, instead uses the isotopic weight as returned by the OEGetIsotopicWeight function.

        This seems correct to me for checked mass but I didn’t want to modify the existing functionality. The MolecularFormulaManipulator create elements for the major isotopes and so gives the wrong number of the CTR expect output. This method now gives the same answer as the Wiki but I don’t believe the dataset used has any specified isotopes.

        Thought it was something worth considering, might good to consult on people in mass spec to see what they really want / need for a result.

        J

        On 6 Apr 2014, at 13:44, Egon Willighagen egonw@users.sf.net wrote:

        (But your code seems to do the right thing, here!)

        [patches:#757] consider implicit hydrogen in isotope / mass calcs

        Status: open
        Group: Needs_Review
        Created: Fri Apr 04, 2014 11:06 AM UTC by John May
        Last Updated: Sun Apr 06, 2014 12:43 PM UTC
        Owner: nobody

        see 1338

        I'm sure there are load more of these where the hydrogens are simply ignored - this patch updates three methods in the AtomContainerManipulator. Also the weight calc isn't great as it doesn't consider specific isotopes, the MolecularFormula one is much better but I don't have to time to patch this one correctly now.

        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdk/patches/757/

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

         

        Related

        Patches: #757

  • Egon Willighagen

    • status: open --> closed
    • Group: Needs_Review --> Accepted
     
  • Egon Willighagen

    Applied and pushed.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks