cdk / depict

SMILES Depiction Generator
GNU Lesser General Public License v2.1
54 stars 14 forks source link

explicit constraint about .sdf (V2000) #55

Closed nbehrnd closed 1 year ago

nbehrnd commented 1 year ago

Structures to process may be provided as SMILES (preferred), or .sdf (as fall back). Because there are two formats of the later, it is better to explicitly indicate the user if s/he opts for the later, then only V2000 is an acceptable input.[1]

[1] https://github.com/cdk/depict/issues/53

johnmay commented 1 year ago

Sorry you were preemptive, I've added V300 support

nbehrnd commented 1 year ago

To some extent, preparations for my PR run in parallel to your work. There was no intent to be «preemptive» (I had to check in a dictionary for a translation, destroy your enemy's weapons before they can strike you), only to state early V2000 is/was a good fit for the project and known to work reliably.

What prevents me to drop the PR is the observation that a .sdf (v2000) written by DataWarrior is processed well; the one written in v3000 not this well. Perhaps the server for https://www.simolecule.com/cdkdepict/depict.html was not yet updated, perhaps the v3000 format is more complex as anticipated. -- Though you thankfully document how to set up a local instance, I lack the resources to check this on my own.

2022-10-26_cdkdepict_DW_sdfV3_a

and

2022-10-26_cdkdepict_DW_sdfV3_b

johnmay commented 1 year ago

Force refresh the browser, it has cached the JavaScript

johnmay commented 1 year ago

Try:

Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)

nbehrnd commented 1 year ago

Affirmative, because now both .sdf (v2000) .and. .sdf (v3000) work well, I drop this PR. Thank you!.