Hello David,

first of all thank you for your work on this great program. Attached is the 
drawing of how we think the mol files should look.

Best Rüdiger

Von: David Cosgrove <davidacosgrov...@gmail.com>
Gesendet: Montag, 5. September 2022 12:04
An: Rüdiger Lang <r.l...@abcr.com>
Cc: rdkit-discuss@lists.sourceforge.net
Betreff: Re: [Rdkit-discuss] Draw.MolToFile catch programm termination


Thanks, Rüdiger.  On my mac it crashes with a segmentation fault, due to it 
using a negative index into a vector.  That's also consistent with your 
exception, since it has taken an unsigned integer below zero which wraps round 
to a very large number.  Disappointingly, it is in my drawing code, so I will 
file it as a bug and attempt to fix it.  Do you have any representation of what 
the drawing is supposed to look like?

Dave

On Mon, Sep 5, 2022 at 8:29 AM Rüdiger Lang 
<r.l...@abcr.com<mailto:r.l...@abcr.com>> wrote:
Hello Dave,

Thanks! I use the version 2022.03.05 but you are of course right, I had 
attached the wrong mol-file. Sorry for that. But now two files where it 
actually does not work.

Best Rüdiger

Von: David Cosgrove 
<davidacosgrov...@gmail.com<mailto:davidacosgrov...@gmail.com>>
Gesendet: Samstag, 3. September 2022 09:12
An: Rüdiger Lang <r.l...@abcr.com<mailto:r.l...@abcr.com>>
Cc: 
rdkit-discuss@lists.sourceforge.net<mailto:rdkit-discuss@lists.sourceforge.net>
Betreff: Re: [Rdkit-discuss] Draw.MolToFile catch programm termination

Hi Rüdiger,
That file works fine for me using 2022.03.5.  What version are you using?

Also, I note that your script reads 191131.mol, but the one you have provided 
is 191133.mol.  Can you check that this is the file that is causing the problem.

Dave


On Fri, Sep 2, 2022 at 1:40 PM Rüdiger Lang 
<r.l...@abcr.com<mailto:r.l...@abcr.com>> wrote:
Hello everybody,

I am trying to convert a large amount of mol files to png. Some mol files cause 
the following error with "Draw.MolToFile":

<<
Could not convert io integer: 3221225477. Path 'exitCode'.
Der Wert für einen Int32 war zu groß oder klein.
(The value for an Int32 was too large or small.)
>>

I would like to catch this error to simply omit these files but despite "try" 
the program exits with the above error.
I have attached a problematic mol-file as an example.
The program code looks like this:

from rdkit import Chem
from rdkit.Chem import Draw
from try_parse.utils import ParseUtils

Testmol = Chem.MolFromMolFile('C:\\Struct\\191131.mol')

try:
   print('now we test: ')
   Draw.MolToFile(Testmol,'C:\\Struct\\Test191131.png')
   # i also tried this:
   
#test=ParseUtils.try_parse_int(Draw.MolToFile(Testmol,'C:\\Struct\\Test191131.png'))
   #print(test)
except:
    print('I never reach this except but the programm stopps')

Many thanks!

Rüdiger Lang



Freundliche Grüße / Kind regards

Rüdiger Lang
Data Analyst

abcr GmbH
Im Schlehert 10
76187 Karlsruhe
Germany

r.l...@abcr.com<mailto:r.l...@abcr.com>




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


--
David Cosgrove
Freelance computational chemistry and chemoinformatics developer
http://cozchemix.co.uk


--
David Cosgrove
Freelance computational chemistry and chemoinformatics developer
http://cozchemix.co.uk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to