Hi Milinda,
Here's an approach that finds all the atoms that have an isotope specified:
In [1]: from rdkit import Chem
In [2]: from rdkit.Chem import rdqueries
In [3]: q = rdqueries.IsotopeGreaterQueryAtom(1)
In [7]: list(x.GetIdx() for x in
Chem.MolFromSmiles('CC[13CH3]').GetAtomsMatchingQuery(q))
Out[7]: [2]
In [8]: list(x.GetIdx() for x in
Chem.MolFromSmiles('[12CH3]CC[13CH3]').GetAtomsMatchingQuery(q))
Out[8]: [0, 3]
Does that do what you want it to do?
-greg
On Wed, Jan 18, 2017 at 3:56 PM, Milinda Samaraweera <
milindaatw...@gmail.com> wrote:
> Dear Experts,
>
> I am trying to figure out a way to exclude entries which contain heavy
> atoms (13C, 2H, 3H, etc), from a SD file (which has close to two thousand
> entries) and write an updated file with the remaining entries.
>
> I do understand how to read/write SD files using rdkit.
>
> What I do understand is how to detect entries with heavy isotopes: Is
> there an efficient and correct way of achieving this using rdkit?
>
> thanks,
> --
> Milinda Samaraweera
>
> ------------------------------------------------------------
> ------------------
> 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
>
>
------------------------------------------------------------------------------
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