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 
Out[26]: []

From: Milinda Samaraweera <>
Date: Wednesday 18 January 2017 at 23:01
To: Bob Funchess <>
Cc: RDKit Discuss <>, Greg Landrum 
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.
Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Rdkit-discuss mailing list

Reply via email to