[Rdkit-discuss] Using Chem.WrapLogs()

2017-09-08 Thread Noel O'Boyle
Hi all, I'd like to capture error messages during SMILES parsing, but am having trouble getting this to work. The following code raises an AssertionError, for example. Is there something here I'm missing? I'm using this from a Windows 7 conda environment, Python 2.7 64-bit, RDKit 2017.03.3, but

[Rdkit-discuss] GetConformerRMS() vs GetBestRMS()

2017-09-08 Thread Udvarhelyi, Aniko
Dear All, I would like to compute RMS values between conformers of the same molecule that are not aligned. Unfortunately, I can´t get along very well with the GetConformerRMS() function, it gives far too high RMS values even for conformers that are clearly (near-)identical as judged by visual

Re: [Rdkit-discuss] GetConformerRMS() vs GetBestRMS()

2017-09-08 Thread Greg Landrum
Hi Anikó, Both functions do an alignment. The big difference here is coming because GetBestRMS() looks at all 2D-identical alignments of the molecules to each other while GetConformerRMS() only does the alignment once: using the atom numbers. Practically speaking what does that mean for your

Re: [Rdkit-discuss] Using Chem.WrapLogs()

2017-09-08 Thread Maciek Wójcikowski
Hi Noel, sio.seek(0) before assert or sio.getvalue() instead read(). Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl 2017-09-08 15:51 GMT+02:00 Noel O'Boyle : > Hi all, > > I'd like to capture error messages during SMILES parsing, but am having

Re: [Rdkit-discuss] Using Chem.WrapLogs()

2017-09-08 Thread Andrew Dalke
On Sep 8, 2017, at 15:51, Noel O'Boyle wrote: > > Hi all, > > I'd like to capture error messages during SMILES parsing, but am having > trouble getting this to work. ... > assert sio.read() != "" That should be a sio.getvalue(). The read() starts from the current file

Re: [Rdkit-discuss] Using Chem.WrapLogs()

2017-09-08 Thread Noel O'Boyle
Thanks Maciek, Both of those solutions works on Linux, which is fine for my purposes. Neither works on Windows (let me know if you want me to file a bug). Regards, - Noel On 8 September 2017 at 15:05, Maciek Wójcikowski wrote: > Hi Noel, > > sio.seek(0) before assert or

Re: [Rdkit-discuss] Debian Stretch Python3 Does Not Find RDKit

2017-09-08 Thread Greg Landrum
apologies for the slow reply; I'm still getting caught up from my vacation. If you start the system python from the command line, can that find the rdkit? You can test this as follows: python -c 'from rdkit import Chem' if that works, you know that the installation worked and that the problem is

[Rdkit-discuss] SMARTS pattern matching of canonical forms of aromatic molecules

2017-09-08 Thread James T. Metz via Rdkit-discuss
Hello, Suppose I read in the SMILES of an aromatic molecule e.g., for benzene c1c1 I then want to convert the molecule to a Kekule representation and then perform various SMARTS pattern recognition e.g. [C]=[C]-[C] I have tried various Kekule commands in

Re: [Rdkit-discuss] SMARTS pattern matching of canonical forms of aromatic molecules

2017-09-08 Thread Peter S. Shenkin
Hi, In SMARTS, 'a' matches an aromatic atom. So you would match your molecule with the pattern 'aaa', or if you wanted to restrict yourself to carbons, 'ccc'. This would match whether you created the molecule from a Kekulized or an aromatic SMILES. Remember that it's the molecular recognition

Re: [Rdkit-discuss] SMARTS pattern matching of canonical forms of aromatic molecules

2017-09-08 Thread Jason Biggs
Start with your benzene molecule m = Chem.MolFromSmiles('c1c1') make a pattern using Peter's example, with three aromatic atoms connected by three aromatic bonds patt = Chem.MolFromSmarts('a:a:a') and it's a match: m.HasSubstructMatch(patt) >True Kekulize your mol, and the pattern