Okay, so we have an operating prototype: https://web.avogadro.cc/
What features would you most want to see?
Okay, so we have an operating prototype: https://web.avogadro.cc/
What features would you most want to see?
Frequently, the property box of small molecule structures in the English Wikipedia equally mentions a SMILES string. For instance about alanine both D C[C@H](C(=O)O)N and L isomer, C[C@@H](C(=O)O)N. Thus, reading / import and writing / export of this notation were a nice addition.
I’m hoping for some support for SMILES by fetching structures from PubChem. Otherwise, it’s a bit tricky since the web version doesn’t integrate Open Babel or RDKit, which could generate 3D coordinates.
Could ChemSpider of the RSC an alternative here (only 100 million molecules (ref), yet larger than ACS’ 500k public records of common chemistry)? Chemspider’s SMILES are among the structure identifiers (example L-tartaric acid), the database’s .mol however are 2D in V2000 syntax which the web-Avogadro2 version could optimize after loading the file by either UFF or Lenard-Jones – just as already anticipated by the GUI/web instance of Avogadro2.
PubChem has a lot of 3D geometries. I don’t know their exact number, but I suspect it’s more than ChemSpider.
Optimizing the 2D versions to 3D can work in a pinch, but PubChem has done MMFF94 conformer searching for anything they have coordinates for.
I think the best approach might be to have separate WASM builds for the external tools. This way, the browser’s javascript runtime could start an openbabel or RDKit web worker to provide the requested results. This would replace the subprocess calls in the original Avogadro application.
I think my only question is on file size for the various WASM builds. For example, if someone doesn’t need openbabel.wasm can it be loaded only when needed.
Certainly, it would be great to have MMFF94 and GAFF in the web version (and all the electrostatic models).
I think my broader question is “what are the best initial use cases?”
For me, this leads to a few features…
This can also connect with the proposed tutorial mode
Might also be nice to have “open in desktop Avogadro” and image export features too..
Regarding your first question: yes, on demand loading of additional .wasm modules is possible.
I already implemented this here: Integrate Open Babel as an optional web worker by timvdm · Pull Request #19 · OpenChemistry/avogadro-web · GitHub
The avogadro-web.wasm file is 6.74 MB compressed (.gz). The openbabel-web.wasm file I currently use is 1.23 MB compressed (.gz).