Re: [Rdkit-discuss] distinguishing macrocyclic molecules

2019-10-09 Thread Greg Landrum
Ivan's solution, using the SMARTS extension [r{12-}], is what I would use for this. I would suggest using the permanent documentation link though: http://rdkit.org/docs/RDKit_Book.html#smarts-support-and-extensions That's the one that I keep up to date. A note to Dave's point about anthracene:

Re: [Rdkit-discuss] distinguishing macrocyclic molecules

2019-10-09 Thread Ivan Tubert-Brohman
Hi David, Thanks for the tip! I just found it in the documentation; the syntax is [r{12-20}]. See http://rdkit.org/docs_temp/RDKit_Book.html#smarts-support-and-extensions Note that this doesn't suffer from the hard-coded limitation I mentioned, and you can even specify open ranges such as

Re: [Rdkit-discuss] distinguishing macrocyclic molecules

2019-10-09 Thread David Cosgrove
Hi Ivan, There is an RDKit extension to SMARTS that allows something like [r12-20]. I can’t check the exact syntax at the moment. You might want to check that atoms are not in smaller rings as well, so as not to pull up things like anthracene which might not be something you’d want to class as a

Re: [Rdkit-discuss] distinguishing macrocyclic molecules

2019-10-09 Thread Omar H94
Dear Thomas, I'm not aware of any RDKit function that distinguishes macrocycles . However, based on the definition of 12 or more membered rings, you may use the following function to get molecules that have rings with 12 or more atoms from a list of molecules: def GetMacrocycles(mols):