Open edwintse opened 7 years ago
This looks really cool - I'm wondering if we could easily mirror the master list on Github complete with these images being pulled in. I've had a quick look and I think we can as it's just requesting data from
https://cactus.nci.nih.gov/chemical/structure/O=C(/C(S/1)=C/C2=C(C)N(C(C)=C2)C3=CC=C(S(=O)(N)=O)C=C3)NC1=N/C4=CC=CC=C4/image?width=150&height=150&format=png
so we should be able to render this on Github if required.
You can also this script to import into Vortex http://www.macinchem.org/reviews/vortex/tut26/scripting_vortex26.php
Or this Jupyter notebook http://www.macinchem.org/reviews/osm/osmipython.php
@edwintse Any idea why some of the SMILES strings don't work. When I imported them into Vortex I thought they all rendered fine?
This is really nice, does it have to pull the images in everytime the page is accessed?
@drc007 I think this has to do with the CIR not being able to interpret and convert the SMILES strings to the relevant image in its structure drawing tool. Also may be a result of canonical SMILES. If all the images are retrieved using InChI or InChI Key, I think it's fine.
It has to run the script every time you open the page, but the load time doesn't seem that long considering how many items there are. Once the images are loaded, if you keep the tab open, it doesn't have to re-obtain the images which is nice.
I have recently come across a script that can be incorporated directly into Google Sheets which allows for automatic structure generation by converting strings to an image through the Chemical Identifier Resolver website. I have created a clone of the Master List to test how well this works. There is a ~30-45s load time to initialise the script, but once this is done, the structures render very quickly.
I have found that for some compounds, the structure won't generate if the SMILES are used, but will be fine if the InChI/InChI Key are used instead (limitation of the CIR).
The formula used is =image(getImageURL(CELL)) where CELL is the cell number of the SMILES/InChI/InChI Key.
This would be a nice feature to quickly see the associated compounds, but there is obviously no way to do substructure searching (for that, use the 2 other options below).
Please use the link above and see whether this would be a useful thing to incorporate and comment your thoughts below.