Closed uli-f closed 1 year ago
OK, I will check these
These test cases are now in PR #18.
@uli-f , I suppose that a possible reason for failures is that RAuxInfo with the coordinates is not given. The stereo information is treated fully only on level 2D or 3D. From the original RInChI examples there are some double conversion tests with stereo info which do not fail, but they have RAuxInfo (e.g. testExample_Inverted_stereochemistry()
).
BTW: I do not like this at all, but this is the approach implemented in native code - stereo handling is linked with MDL 2D/3D coordinates.
Okay, thank you for clarifying.
If there is a clearly defined reason why a test case fails, I see two ways to resolve this:
@Ignore
annotation in the code and give a brief explanation why the test is ignored within the @Ignore
annotation: @Ignore("test is ignored as it fails due to ....")
.Any thoughts on your end?
In order to get these tests running, somehow the RAuxInfo should be generated. Some manual work would be needed, perhaps. For example: (1) draw the molecules and generate the 2D coordinates; (2) Store the molecules as MDL files; (3) Make a RXN file with 2D coordinates for the reaction components; (4) Convert the RXN to a couple: (RInChI, RAuxInfo) and then finally and hopefully the tests should run.
Thank you for listing the necessary steps.
I'll have a look on Friday and see if I can do this for one or two of them. If this fixes the issue we might just drop the other few test cases.
Few additional tips that might be useful in a practical aspect (I applied these for preparing some of the extra test units)
Also, we could use OpenBabel to convert separate InChIs (from the RInChI) to SMILES and eventually to add manually stereo in the SMILES if it is lost during the conversion
If you need some assistance in this regards I could help.
Okay, I did this for a single test and it clearly shows that the addition of the Rauxinfo with 2D coordinates solves the issue. Would you mind merging PR #20.
I would consider this important information for the user of the RInChI functionality in CDK. The best I came up with where to put this was the package.html
in the package org.openscience.cdk.rinchi
.
I left you a TODO there with regard to the potential loss of stereochemical information. I'd appreciate it if you could amend any documentation there that might be useful in this context.
PR #20 is merged.
I added some documentation for this to the package.html, PR #23.
I'd appreciate it if you could carry out any corrections of the documentation in package.html re the stereochemical information and add if there is something missing (tetrahedral stereochemical information?).
Once this is done we can close this issue.
Meanwhile, I have also added some html documentation :-). It will be needed to resolve some conflicts and then merge your commit from PR #23.
Meanwhile, I have also added some html documentation :-). It will be needed to resolve some conflicts and then merge your commit from PR #23.
I am sorry, I was on a documentation-writing-roll yesterday! 🏃🏼
I hope it is not too much work to get this merged. There can never be too much documentation! 😄
Given the merge of PR #23 I am happy to close this one.
I added @Ignore annotation to some of the test cases that fail in PR #15.
@ntk73 Once PR #15 is merged, I would appreciate it if you could have a look. Seems to have something to do with stereochemistry.