You are so close!

>>> from rdkit import Chem

>>> m = Chem.MolFromSmiles("C1CC12CCC2")

>>> for atom in m.GetAtoms():

...   if atom.IsInRingSize(3) and atom.IsInRingSize(4): print atom.GetIdx()

...

2

>>>

Cheers,
 Brian

On Tue, Apr 11, 2017 at 1:38 PM, Jonathan Saboury <jsab...@gmail.com> wrote:

> Hello All,
>
> I'm trying to make a function to check if a mol has an atom that is part
> of two small rings (3 or 4 atoms). Using GetRingInfo()/NumAtomRings() I can
> find out how many ring systems each atom is in, but not the details of the
> rings. atom.IsInRingSize(size) returns a bool so I couldn't use that. I'm
> using the python api.
>
> Any suggestions? Thanks!
>
> - Jonathan
>
> ------------------------------------------------------------
> ------------------
> 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

Reply via email to