Each molecule has the _Name I gave it.
Thank you for suggesting to interleave molecule indexes (or names)
with warning messages redirected to unbuffered stderr. It works.
I will use the trick together with Lukas (Thanks!) idea of redirecting stderr
for in-script processing.

All the best,

Jean-Marc

Le 21/01/2019 à 21:04, Dimitri Maziuk via Rdkit-discuss a écrit :
On 1/21/19 1:42 PM, Jean-Marc Nuzillard wrote:

             sys.stderr.write("Bad: %s\n" % (mol.GetProp("_Name"),))
I know which bond has a problem but I still do not know in which molecule.
Are you sure they all have _Name's? I'd just print the count outside of
the try/catch block and ignore ones not followed by the warning message.
(And run with #!/usr/bin/python -u and/or flush sys.stdout/stderr on
every iteration for good measure.)



_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS

Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to