Then I guess Greg’s solution is the better suited one since you don’t have to 
specify a list of isotopes (assuming that your input compounds will not have 
things like 12C specified). Minor modification:

In [23]: q = rdqueries.IsotopeGreaterQueryAtom(1)

In [24]: atomNums = [1,6,7,8,15,16]

In [25]: [x.GetIdx() for x in 
Chem.MolFromSmiles('CCC[13CH3]').GetAtomsMatchingQuery(q) if x.GetAtomicNum() 
in atomNums]
Out[25]: [3]

In [26]: [x.GetIdx() for x in 
Chem.MolFromSmiles('CCC[19F]').GetAtomsMatchingQuery(q) if x.GetAtomicNum() in 
atomNums]
Out[26]: []





From: Milinda Samaraweera <milindaatw...@gmail.com>
Date: Wednesday 18 January 2017 at 23:01
To: Bob Funchess <bfunch...@kelaroo.com>
Cc: RDKit Discuss <rdkit-discuss@lists.sourceforge.net>, Greg Landrum 
<greg.land...@gmail.com>
Subject: Re: [Rdkit-discuss] Check for Heavy Isotopes using RdKit

Hi Bob,
I am trying to filter out any compound that does not have the most stable 
isotopic form;  (anything other than: 12C,1H,14N,16O, 31P, 32S) or to contain 
only MonoIsotopic compounds.
Thanks,
Milinda
​
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to