Re: [Rdkit-discuss] Atoms with strange positions/bonds when drawer makes PNG
Hi Greg, I tried to investigate this further with github rdkit but I am as yet unable to configure/cmake it yet on this Mac (something related to boost python has changed) :-/ :-) - will keep poking at it and/or abstracting it... Thanks, Paul. On 19/02/2016 09:19, Greg Landrum wrote: > > > That is indeed very strange behavior and I can't think of what would > cause it. I'm not able to reproduce it with either the current github > master, the 2015_09_2, or the 2015_03_1 release. Can you please send > me a small test program that reproduces the problem? > > -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Atoms with strange positions/bonds when drawer makes PNG
Hi Paul, That is indeed very strange behavior and I can't think of what would cause it. I'm not able to reproduce it with either the current github master, the 2015_09_2, or the 2015_03_1 release. Can you please send me a small test program that reproduces the problem? -greg On Wed, Feb 17, 2016 at 1:10 AM, Paul Emsleywrote: > > Dear RDKitters, > > I have the following test code: > >std::string smiles="Clc1c1"; >RDKit::ROMol *m_local = RDKit::SmilesToMol(smiles); >RDDepict::compute2DCoords(*m_local); >RDKit::Conformer conf = m_local->getConformer(); >WedgeMolBonds(*m_local, ); >bool includeStereo = true; >bool kekulize = false; >std::string mol_file_name = "testmol.mol"; >RDKit::MolToMolFile(*m_local, mol_file_name, includeStereo, confId, > kekulize); >std::string png_file_name = "image-test.png"; >{ > RDKit::MolDraw2DCairo drawer(200, 200); > drawer.drawMolecule(*m_local); > drawer.finishDrawing(); > drawer.writeDrawingText(png_file_name.c_str()); >} > > The mol file seems sane (attached) but the png has strangely positioned > atoms (the Cl in this case) (attached). > > What am I doing wrong? > > (Using RDKit-2015-03-01) > > Thanks, > > Paul. > > > > -- > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Suppress stdout and stderr in rdkit
Hi Paolo, Thanks a lot for your prompt reply. I ended up coding this: from rdkit import Chem from rdkit import RDLogger smart = '[#6]1(:[#6]:[#6]:[#6]2:[#6](:[#6]:1):[#6]:[#6]:[#6]:[#6]:2)-[#8,#6]' mol = Chem.MolFromSmarts(smart) lg = RDLogger.logger() lg.setLevel(RDLogger.CRITICAL) try: Chem.SanitizeMol(mol) except: print 'OK' Ciao, Gaetano On 02/18/2016 01:09 AM, Paolo Tosco wrote: > Dear Gaetano, > > you may try the following: > > from rdkit import rdBase > rdBase.DisableLog('rdApp.error') > > You may check the logging levels you wish to disable/enable in > rdkit/RDLogger.py, or use a wildcard such as 'rdApp.*' to affect all > levels at once. > > Best, > Paolo > > On 17/02/2016 23:54, Gaetano Calabro wrote: >> from rdkit import Chem >> >> smart = >> '[#6]1(:[#6]:[#6]:[#6]2:[#6](:[#6]:1):[#6]:[#6]:[#6]:[#6]:2)-[#8,#6]' >> >> mol = Chem.MolFromSmarts(smart) >> >> Chem.SanitizeMol(mol) > -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Suppress stdout and stderr in rdkit
Dear Gaetano, you may try the following: from rdkit import rdBase rdBase.DisableLog('rdApp.error') You may check the logging levels you wish to disable/enable in rdkit/RDLogger.py, or use a wildcard such as 'rdApp.*' to affect all levels at once. Best, Paolo On 17/02/2016 23:54, Gaetano Calabro wrote: > from rdkit import Chem > > smart = '[#6]1(:[#6]:[#6]:[#6]2:[#6](:[#6]:1):[#6]:[#6]:[#6]:[#6]:2)-[#8,#6]' > > mol = Chem.MolFromSmarts(smart) > > Chem.SanitizeMol(mol) -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss