Acylation / obsidian-chem

Chemistry support for Obsidian. Rendering SMILES strings into chemistry structures.
MIT License
74 stars 4 forks source link

Please add an option to choose whether to display hydrogen used for chirality #56

Closed Lo-Dyih-Yuaan closed 7 months ago

Lo-Dyih-Yuaan commented 7 months ago

What would you like to be added?

I want the plugin can add an option to choose whether to display hydrogen used for chirality. I think this can be achieved by controlling the explicitHydrogens option in JS.

Why is this needed?

In most cases, the hydrogen in SMILES does not need to be written and displayed, except for those used to indicate chirality. However, displaying these hydrogen separately is not necessary in most cases, and is inconsistent with the treatment of other hydrogen, and making structures appear cluttered.

Acylation commented 7 months ago

Yeah will add this in the next update. Thanks for proposing this!

Testcase here: N[C@@H](C)C(=O)O

Acylation commented 6 months ago

For the incoming rdkit core, I need find new ways to support this. The imlementations between theses cores are somewhat diffrent.

SmilesDrawer can process N[C@@H](C)C(=O)O RDKit-js will process C1C[C@@H]2C(C)CCCC2CC1

Oh seems like this is an expected behavior. See: https://github.com/rdkit/rdkit/discussions/7231