+ 1
Usage of JS Tools to display structural formulae
A little question for all chemists among you: Let's keep it short: I need to display chemical structure formulae on of my projects. What tool or library would you recommend for easily rendering them using SMILES, InChI, jmol applet, LaTeX or a similar notation that integrates well with JavaScript and HTML? I would ask on stackoverflow, if I didn't knew that they would handle any tipps as 'offtopic'. Don't ask me why it is offtopic, but to keep quality, I understand that at least a little. Thanks in advance.
3 Answers
+ 3
Konan Did a quick websearch for "how to display chemical structure in webpage".
ChemDoodle Web Components (or Jmol) is popular Javascript library for displaying chemical structures in a web page. ChemDoodle looks pretty easy to use.
1- Load the JS library source using <script> in <head>
2- Create <div> container with #id where you want to display the structure
3- Add <script> at end of <body> that creates instance of chem library viewer, describes the chemical, and renders it
3a- JS code can either be internal in <script> or in JS file loaded by <script>. JS file probably better if displaying multiple chemical structures or the HTML page is already long enough.
3b- both libraries mentioned support several chemical data formats (SMILES, MOL, InChl, etc)
+ 1
I'm not a chemist, but I've created a tool that display chemical structures of organic compounds and other covalently bonded substances, including the condensed structural formula, skeleton formula and 3d representation of molecular arrangement.
It uses opengl3 and you might be interested in seeing the implementation
+ 1
RuntimeTerror Yes, for sure I do, thank you âď¸â¨ď¸
Shardis Wolfe I also used these tools (and did much more than a 'quick websearch'), but the problem was, that none of them were really able to display the structural formulae in an (even nearly) correct way.
In fact it was displayed very wrong and I didn't even wanted to display huge proteins or something like that, just some quiet basic stuff...