Re: [Rdkit-discuss] Get the Exact Mass from a Molecular Formula field

2020-03-23 Thread Jason Biggs
You can get the most common isotope mass from the periodic table.  Here is
a small modification to the code you linked,
https://gist.github.com/jasondbiggs/cadc261ed00a08054ad5c4a85cccd9d4



Jason Biggs



On Mon, Mar 23, 2020 at 9:21 AM Pierre-Marie Allard <
pierre-marie.all...@unige.ch> wrote:

> Hi all !
>
>
> I would like to calculate the exact mass (monoisotopic mass) of a compound
> given it's molecular formula.
> I am aware of the Descriptors.ExactMolWt() function. However I have
> problematic SMILES and InChI and would like to calculate the exact mass
> directly form the molecular formula.
>
> This thread reported a custom function [
> https://bioinformatics.stackexchange.com/a/9273](
> https://bioinformatics.stackexchange.com/a/9273) to calculate it using
> RDKit. However the GetMass() function returns the molecular weight on the
> given atom (meaned by it's isotopes). Is there and equivalent
> GetExactMass() somewhere ?
>
>
> Many thanks,
>
> PM
>
>
> _
>
> Pierre-Marie Allard
> Research Assistant - Natural Products Chemistry
> EPGL - UniGe - Geneva
> pierre-marie.all...@unige.ch
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Get the Exact Mass from a Molecular Formula field

2020-03-23 Thread Pierre-Marie Allard
Hi all !


I would like to calculate the exact mass (monoisotopic mass) of a compound 
given it's molecular formula.
I am aware of the Descriptors.ExactMolWt() function. However I have problematic 
SMILES and InChI and would like to calculate the exact mass directly form the 
molecular formula.

This thread reported a custom function 
[https://bioinformatics.stackexchange.com/a/9273](https://bioinformatics.stackexchange.com/a/9273)
 to calculate it using RDKit. However the GetMass() function returns the 
molecular weight on the given atom (meaned by it's isotopes). Is there and 
equivalent GetExactMass() somewhere ?


Many thanks,

PM


_

Pierre-Marie Allard
Research Assistant - Natural Products Chemistry
EPGL - UniGe - Geneva
pierre-marie.all...@unige.ch

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss