Closed wijnand1 closed 4 months ago
Thanks for the issue @wijnand1! We'll look into it.
Hi @wijnand1 ,
Thanks for reporting this.
Please be so kind as to send us a file called empty.mol
which you used for this test as I am getting the following message after processing a totally empty file with the same CLI options mentioned in your post:
InChI version 1, Software v. 1.07 (inchi-1 executable)
Windows 64-bit Build (MS VS 2017 or later) of Jun 27 2024 15:38:47
Opened log file 'empty.mol.log'
Opened input file 'empty.mol'
Opened output file 'empty.mol.txt'
Opened problem file 'empty.mol.prb'
Warning: specified timeout value was ignored due to invalid number format, using the default;
The command line used:
"\<path_to>\INCHI_EXE\bin2\Windows\x64\Release\inchi-1.exe empty.mol /AuxNone /Tabbed /WarnOnEmptyStructure"
Generating standard InChI
Input format: MOLfile
Output format: Plain text, tabbed
Aux. info suppressed
Timeout per structure: 60000 msec
Up to 1024 atoms per structure
End of file detected after structure #0.
Finished processing 0 structures: 0 errors, processing time 0:00:00.00
Elapsed walltime: 32 msec.
The output is the same on MS Windows
and Ubuntu Linux 22.04
using either MSVC
, GCC
or CLang
.
Thank you in advance,
Djordje
Well, it is just an empty molfile, but here you go (.txt so github accepts it)
Hi @wijnand1 ,
Thanks for sending the empty.mol
file.
I can confirm that Error 98
shows up for this empty.mol
file, and that the proposed fix works.
Obviously, similar fix could be also inserted into the section which manages all options starting with W
, but for legacy reasons and easier readability, it will be applied in InChI v.1.07-RC5
in the above mentioned way for both CLI
and API
versions.
Will keep you posted on InChI v.1.07-RC5
release which should be out very soon.
Kind regards,
Djordje
Hi @wijnand1 ,
Just wished to let you know that InChI v.1.07-RC5
has been uploaded.
Please be so kind as to test if this issue has now been fixed.
Kind regards,
Djordje
Issue is fixed, WarnOnEmptyStructure works again: returns an InChI for an empty molecule, instead of an error and nothing in the output
Thanks for the feedback @wijnand1.
Closed with c94cf24.
The WarnOnEmptyStructure option is broken since 1.06.
Looking at the logs, there is a message
Warning: specified timeout value was ignored due to invalid number format, using the default;
This indicates where the problem is: WarnOnEmptyStructure is being interpreted as -W option. Looking at the code, this is a bug caused by changing to code when adding the WM option in inichparm.cBug fix must be as simple as moving the WarnOnEmptyStructure check before the other options starting with W:
https://github.com/IUPAC-InChI/InChI/blob/77e7acdf385f2b784a4667d54ea380c2278ca199/INCHI-1-SRC/INCHI_BASE/src/ichiparm.c#L1385