InformaticsMatters / squonk

Squonk platform and computational notebook
Apache License 2.0
8 stars 3 forks source link

CDK export issue #22

Open tdudgeon opened 5 years ago

tdudgeon commented 5 years ago

When exporting the output of CxnReactor cell (using molfile format) to SDF CDK complains as follows:

chemservices_1        | Caused by: org.openscience.cdk.exception.CDKException: Exception while writing MDL file: Bond at idx 37 was an unspecific aromatic bond which should only be used for querie in Molfiles. These can be written if desired by enabling the option 'WriteAromaticBondTypes'.
chemservices_1        |     at org.openscience.cdk.io.MDLV2000Writer.write(MDLV2000Writer.java:313)
chemservices_1        |     at org.openscience.cdk.io.SDFWriter.writeMolecule(SDFWriter.java:267)
chemservices_1        |     at org.openscience.cdk.io.SDFWriter.write(SDFWriter.java:222)
chemservices_1        |     ... 14 more

If you enumerate with smiles output it works OK. Investigate whether the WriteAromaticBondTypes should be enabled.

tdudgeon commented 5 years ago

That exception also breaks the export. We should tolerate the error and move on to the next structure.

tdudgeon commented 5 years ago

The WriteAromaticBondTypes property is now applied correctly. This commit was involved as well as the one listed above.: https://github.com/InformaticsMatters/squonk/commit/ba52f891743f1c5f174810693b0d5909e0b55882

The SDF export already has a mechanism for tolerating errors but it looks like the HaltOnError header is not being set in the HTTP request. This still needs to be done.