IUPAC-InChI / RInChI

Repository of the IUPAC - RInChI group
5 stars 3 forks source link

Missing InChI logs #23

Open fbaensch-beilstein opened 4 weeks ago

fbaensch-beilstein commented 4 weeks ago

Is there a reason why messages, logs, warnings etc. that originate from the InChI generation are not forwarded?

For example, the following rxn file contains an empty ct block and a structure that causes an error during InChI generation, but no message is forwarded.

nostruct_reactant_nostruct_product $RXN ISIS 012320160130 1 1 $MOL -ISIS- 01231601302D 0 0 0 0 0 0 0 0 0 0999 V2000 M END $MOL -ISIS- 01231601302D 1 0 0 0 0 0 0 0 0 0999 V2000 8.5292 -2.7458 0.0000 A 0 0 0 0 0 0 0 0 0 0 0 0 M END
janholstjensen commented 4 weeks ago

Currently, only errors are propagated and warnings are ignored. I agree that could be improved.

Can you attach the RXN example as a text file ? The rendered version of the file on the Github page is missing significant whitespace and so cannot be reliably parsed.

fbaensch-beilstein commented 4 weeks ago

Thanks for clarification!

Please find the file attached, I've masked it with a .txt extension cause of GitHubs restrictions: nostruct_reactant_nostruct_product.rxn.txt

janholstjensen commented 3 weeks ago

"nostruct_reactant_nostruct_product.rxn.txt"

Both input structures are perceived as No-Structure-s. The first structure is an explicit No-Structure and the second one is converted to a No-Structure by the RInChI molfile reader.

This explains why you see no InChI warnings or errors for the second structure, as InChI never processed the second structure (No-Structure-s are not sent to InChI).

The RInChI molfile reader considers any input structure with a single special atom (an 'A', 'X', R-group atom, or star-atom '*') as equivalent to a No-Structure. Let me check if we have that behavior documented.

fbaensch-beilstein commented 3 weeks ago

That is good to know. Thank you for the explanation!

janholstjensen commented 1 week ago

Re-assigning this as the bug as the issue name and original comment describes the bug covered by the example files in issue #24.