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] Inchi which flavour??

2019-10-09 Thread Mike Mazanetz
Hello Paolo, Many thanks for the support – I think this would be very useful for anyone trying to catch messages generated in this fashion. Really nice work. Thanks, mike From: Paolo Tosco Sent: 09 October 2019 23:34 To: Mike Mazanetz Cc: 'RDKit Discuss' Subject: Re:

Re: [Rdkit-discuss] Inchi which flavour??

2019-10-09 Thread Paolo Tosco
Hi Mike, please find here a solution which I have just tested and works well on both Unix and Windows. You need to redirect the C++ stderr stream with ctypes around the call whose output you wish to grab. This can be done defining a context manager that uses ctypes: import os import sys

Re: [Rdkit-discuss] Inchi which flavour??

2019-10-09 Thread Paolo Tosco
Hi Mike, as I promised I'll put together something for you to capture warnings; I'll try to get it done tonight. p. On 10/09/19 18:10, Mike Mazanetz wrote: Hi, Many thanks this, it is very helpful to see some code. Yes, as it stands, I am yet to get warnings which are seen in stdout

Re: [Rdkit-discuss] Inchi which flavour??

2019-10-09 Thread Mike Mazanetz
Hi, Many thanks this, it is very helpful to see some code. Yes, as it stands, I am yet to get warnings which are seen in stdout being sent to a file, only errors seem to find their way to my files. Usually Warnings about stereochemistry don’t get captured. Anyone see this, I’m guessing

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] Inchi which flavour??

2019-10-09 Thread Scalfani, Vincent
Hi Macjek and Mike, If I understand your question correctly, you can specify InChI option parameters when calculating InChIs. Here is an example: m = Chem.MolFromSmiles('CCC1=CN=C(NC1=O)NC') Chem.MolToInchi(m) 'InChI=1S/C7H11N3O/c1-3-5-4-9-7(8-2)10-6(5)11/h4H,3H2,1-2H3,(H2,8,9,10,11)' Now, try

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):

Re: [Rdkit-discuss] Inchi which flavour??

2019-10-09 Thread Maciek Wójcikowski
Mike, On top of what Greg said what might be particularly useful is an options parameter where you can pass some non default params to InChI call. śr., 9 paź 2019, 07:22 użytkownik Greg Landrum napisał: > Hi Mike, > > The InChI API itself is not exposed. The contents of the module are in the >