dan2097 / jna-inchi

Wrapper to access InChI from Java
GNU Lesser General Public License v2.1
7 stars 6 forks source link

Question: JniInchiWrapper had a few checkInchi methods. Your version too? #16

Closed egonw closed 2 years ago

egonw commented 2 years ago

Hi @dan2097, awesome work!

Got one question, following updating Bioclipse/Bacting to use jna-inchi: I cannot immediately find the JavaDoc and was wondering if you also have checkInchi() methods, like the JniInchiWrapper had?

dan2097 commented 2 years ago

In this project the class JnaInchi is analogous to JniInchiWrapper, and has functions like this https://github.com/dan2097/jna-inchi/blob/9ef5dc47ca318b8fb065287276436385ea51547f/jna-inchi-api/src/main/java/io/github/dan2097/jnainchi/JnaInchi.java#L411

BTW when unit testing this I came across what may be a bug in checkInchi, specifically when strict is set to true and it's given a standard InChI the status always came came back as FAIL_I2I. I checked in JNI-InChI and it also had the same behaviour, so presuming it's an InChI library bug it's a long standing one. Removing the S to make the InChI non-standard gave the expected result (VALID_NON_STANDARD).

dan2097 commented 2 years ago

I've added a link to the Javadoc through a badge on the project page. Users should typically only need to use the classes from io.github.dan2097.jnainchi, but the entire low-level InChI public API is in principle accesible via the classes in io.github.dan2097.jnainchi.inchi (with the exception of a couple of methods introduced in the latest InChI version, that are commented out, as due to a mistake in the InChI build scripts they were only exposed in the Windows binaries)