A few weeks ago I described our use of Google Apps Scripts, developed by Rich Apodaca and Andrew Lang, as an intuitive interface to information related to a chemistry laboratory notebook. Since then we have been using these tools to actively plan and record experiments (e.g. UC-EXP269) and we have learned their strengths and weaknesses.
The most problematic aspect of Google Apps Scripts running within Google Spreadsheets turns out to be the way caching and refreshing operate. There does not appear to be an obvious way to refresh a single cell. So if a script times out or fails, Google stores that failed output on their servers and will not run it again until some time has elapsed (which seems to be on the order of about an hour). Typing in a new input for that cell will cause the script to run again but entering a previously entered input will only retrieve the cached output, even a failed output. For example, if you have a cell calculating the MW from "benzene" entered in another cell and the script fails for any reason, typing in "ethanol" will get it to run again for the new input, but going back to "benzene" will just pull up the cached output of "Failed".
Nevertheless, I did come across some tricks to force a refresh indirectly. If you insert a row or column then re-enter the desired scripts in the new cells, they will run again. You simply need to then delete the old column with failed outputs. This is fine for simple sheets but it can be a headache for sheets that have several calculation dependencies between cells.
To avoid these complications, simply refresh the entire sheet by duplicating it, deleting the old sheet and then renaming the new one to the original name. The problem now is that it will refresh all the cells, not just those that had failed outputs. And if there are a large number of scripts on that sheet the odds are good that at least one will fail on that particular attempt, especially if several are hitting the same web server.
As a result of all these problems, I would not recommend using these services as I had initially hoped, where a researcher would enter data into a template sheet loaded with scripts to automatically generate a series of calculated outputs. There is a way to achieve this end but it requires thinking about the scripts in a slightly different way.
As I mentioned above, there are tricks for refreshing an entire sheet or a column or row. In order to avoid re-running the scripts that already returned desired outputs, we need to lock them in. This can be done by highlighting the completed cells, copying them (either control-c or Edit->Copy) then pasting them as values (from the Edit menu). Now refreshing will only be done on the cells with failed outputs and these can be locked in as well as soon as they complete.
The downside of this approach is that you lose the information about which script was run to generate the output values. And to change an input requires re-selecting the desired script. But in practice it is so convenient to hit a dropdown menu and hit getMW (for example) that this downside is quite minimal, especially when contrasted with the upside of knowing that others will see your information reliably, independent of how the services are running at a particular time.
Over the past few weeks we have found that some services fail more often than others and it would be advantageous to have some redundancies. This has been particularly problematic for the cactus services recently, which we often use for resolving common names. By using ChemSpiderIDs (CSIDs), the cactus services can be bypassed for several of the gONS services. So a good practice for any application is to generate and lock in SMILES and CSIDs right away from the common name. CAS numbers can be used too but the gChem service that Rich has created sometimes yields multiple CAS numbers and these will fail as input for a subsequent script.
We now have a chemistry Google Apps Scripts spreadsheet to keep track of which inputs are allowed for all the available services, along with information about the output, creator and description. We also keep track of requests and plans for new scripts, marked as "pending" under the status field.
Surprisingly, pasting images "as values" within a Google Spreadsheet cell does not ensure that they will appear consistently - often the cells are just blank upon loading. This makes the idea of using an embedded sheet to display reaction schemes within a wiki lab notebook page not practical. However, using the scripts and a template to generate the scheme by just typing the name, SMILES or CSID for the reactants and product is a very efficient way to generate a consistent look for schemes within a notebook. It only requires a final step of taking the image of the screen and cropping using Paint. For example, here is a scheme thus generated for UC-EXP269.
Taking into account all of these factors, the reaction template sheet we provide does not have by default any scripts running within cells (except for the images). However, it is set up to quickly adapt to other reactions for planning amounts of reactants (by weight or volume), calculating concentrations, yields, melting points (experimental and predicted), solubilities, links to ChemSpider, 2D rendering of structures (including full schemes) and links to interactive NMR spectra using ChemDoodle. It simply requires users to hit one of the 3 drop-down menus (gChem, gCDK or gONS) and select the appropriate script for a particular cell.
Even if the user does not want to use this particular reaction template it still makes sense to make a copy of the template sheet because it is an easy way to copy all of the necessary Google Script without opening the editor.
- ONS t-shirts from Zazzle [Last Updated On: August 17th, 2024] [Originally Added On: April 6th, 2010]
- Scientists Embrace Openness Article in Science Careers [Last Updated On: August 17th, 2024] [Originally Added On: April 12th, 2010]
- ONS Books Wiki [Last Updated On: August 17th, 2024] [Originally Added On: April 20th, 2010]
- Reaction Attempts Book Edition 1 and UsefulChem Archive [Last Updated On: August 17th, 2024] [Originally Added On: April 28th, 2010]
- NMR integration web service expanded [Last Updated On: August 17th, 2024] [Originally Added On: May 1st, 2010]
- The Synaptic Leap Experiments on Reaction Attempts [Last Updated On: August 17th, 2024] [Originally Added On: May 3rd, 2010]
- ChemSpider SyntheticPages [Last Updated On: August 17th, 2024] [Originally Added On: May 4th, 2010]
- The Scientist Article on Electronic Lab Notebooks [Last Updated On: August 17th, 2024] [Originally Added On: May 7th, 2010]
- OpenSciNY Open Notebook Science Talk [Last Updated On: August 17th, 2024] [Originally Added On: May 17th, 2010]
- Setac Europe 2010: ‘It’ll all come out in the wash’ [Last Updated On: August 17th, 2024] [Originally Added On: June 3rd, 2010]
- ASMS: Forget Vioxx, eat chocolate? [Last Updated On: August 17th, 2024] [Originally Added On: June 3rd, 2010]
- Smoking could be good for you – if you get the message [Last Updated On: August 17th, 2024] [Originally Added On: June 3rd, 2010]
- Chemistry World's round-up of money and molecules [Last Updated On: August 17th, 2024] [Originally Added On: June 3rd, 2010]
- ASMS: Anthrax attacks [Last Updated On: August 17th, 2024] [Originally Added On: June 3rd, 2010]
- This week on Chemistry World… [Last Updated On: August 17th, 2024] [Originally Added On: June 3rd, 2010]
- Use of ONS to protect Open Research: the case of the Ugi approach to Praziquantel [Last Updated On: August 17th, 2024] [Originally Added On: June 3rd, 2010]
- IGERT NSF panel on Digital Science [Last Updated On: August 17th, 2024] [Originally Added On: June 8th, 2010]
- Reaction Attempts Explorer [Last Updated On: August 17th, 2024] [Originally Added On: June 25th, 2010]
- Methanol Solubility Prediction Model 4 for Ugi reactions in the literature [Last Updated On: August 17th, 2024] [Originally Added On: July 8th, 2010]
- Secrecy in Astronomy and the Open Science Ratchet [Last Updated On: August 17th, 2024] [Originally Added On: July 12th, 2010]
- Resveratrol Thesis on Reaction Attempts [Last Updated On: August 17th, 2024] [Originally Added On: July 22nd, 2010]
- General Transparent Solubility Prediction using Abraham Descriptors [Last Updated On: August 17th, 2024] [Originally Added On: July 25th, 2010]
- Berkeley Open Science Summit 2010 Notes [Last Updated On: August 17th, 2024] [Originally Added On: August 2nd, 2010]
- The Reaction Attempts Solvent Selector [Last Updated On: August 17th, 2024] [Originally Added On: August 8th, 2010]
- Green Solvent Metric on Solvent Predictor [Last Updated On: August 17th, 2024] [Originally Added On: August 17th, 2010]
- ChemTaverna Workflows of ONS Web Services now on MyExperiment [Last Updated On: August 17th, 2024] [Originally Added On: October 11th, 2010]
- Open Notebook Science in Drug Discovery at Opal Event [Last Updated On: August 17th, 2024] [Originally Added On: October 11th, 2010]
- Cheminfo Retrieval Classes 1 and 2 in 2010 [Last Updated On: August 17th, 2024] [Originally Added On: October 11th, 2010]
- The Meaning of Data panel at a class on the Rhetoric of Science [Last Updated On: August 17th, 2024] [Originally Added On: October 11th, 2010]
- Dynamic links to private tagged Mendeley collections [Last Updated On: August 17th, 2024] [Originally Added On: October 16th, 2010]
- Elizabeth Brown's guest lecture for ChemInfo Retrieval [Last Updated On: August 17th, 2024] [Originally Added On: November 7th, 2010]
- Nanoinformatics 2010 Conference Report [Last Updated On: August 17th, 2024] [Originally Added On: November 7th, 2010]
- Dana Vanderwall on Cheminformatics at Drexel [Last Updated On: August 17th, 2024] [Originally Added On: December 11th, 2010]
- Mirza PhD defense on the Ugi reaction for anti-malarial screening [Last Updated On: August 17th, 2024] [Originally Added On: December 13th, 2010]
- Visualizing Social Networks in Open Notebooks [Last Updated On: August 17th, 2024] [Originally Added On: December 20th, 2010]
- Chemical Information Validation Results from Fall 2010 [Last Updated On: August 17th, 2024] [Originally Added On: January 12th, 2011]
- Science Online 2011 Thoughts [Last Updated On: August 17th, 2024] [Originally Added On: January 22nd, 2011]
- The Spectral Game with ChemDoodle [Last Updated On: August 17th, 2024] [Originally Added On: February 14th, 2011]
- Predicting temperature-dependent solubility for solvent selection [Last Updated On: August 17th, 2024] [Originally Added On: February 14th, 2011]
- Alfa Aesar melting point data now openly available [Last Updated On: August 17th, 2024] [Originally Added On: February 22nd, 2011]
- ONS Solubility Challenge Book cited in a Langmuir nanotechnology paper [Last Updated On: August 17th, 2024] [Originally Added On: February 27th, 2011]
- Validating Melting Point Data from Alfa Aesar, EPI and MDPI [Last Updated On: August 17th, 2024] [Originally Added On: March 6th, 2011]
- Open modeling of melting point data [Last Updated On: August 17th, 2024] [Originally Added On: March 23rd, 2011]
- Towards the automated discovery of useful solubility applications [Last Updated On: August 17th, 2024] [Originally Added On: March 29th, 2011]
- ACS and ACRL presentations on web services and trust in science [Last Updated On: August 17th, 2024] [Originally Added On: April 10th, 2011]
- Collaboration using Open Notebook Science in Academia book chapter [Last Updated On: August 17th, 2024] [Originally Added On: May 8th, 2011]
- Evan Curtin is the May 2011 RSC ONS Challenge Winner [Last Updated On: August 17th, 2024] [Originally Added On: May 8th, 2011]
- Breast Cancer Coalition talk on ONS and Taxol solubility [Last Updated On: August 17th, 2024] [Originally Added On: May 15th, 2011]
- La Science par Cahier de Laboratoire Ouvert à l'Acfas [Last Updated On: August 17th, 2024] [Originally Added On: May 15th, 2011]
- More Open Melting Points from EPI and other sources: on the path to ultimate curation [Last Updated On: August 17th, 2024] [Originally Added On: May 29th, 2011]
- More on 4-benzyltoluene and the impact of melting point data curation and transparency [Last Updated On: August 17th, 2024] [Originally Added On: June 12th, 2011]
- The quest to determine the melting point of 4-benzyltoluene [Last Updated On: August 17th, 2024] [Originally Added On: June 12th, 2011]
- Open Melting Points on iPhone via MMDS [Last Updated On: August 17th, 2024] [Originally Added On: June 12th, 2011]
- My talk at SLA on Trust in Science and Open Melting Point Collections [Last Updated On: August 17th, 2024] [Originally Added On: June 19th, 2011]
- Live Tweeting Haumea: the Open Science Ratchet at work? [Last Updated On: August 17th, 2024] [Originally Added On: June 19th, 2011]
- Google Apps Scripts for an intuitive interface to organic chemistry Open Notebooks [Last Updated On: August 17th, 2024] [Originally Added On: June 19th, 2011]
- The 4-benzyltoluene melting point twist [Last Updated On: August 17th, 2024] [Originally Added On: June 26th, 2011]
- Open Notebook Science Talk at HUBbub 2011 [Last Updated On: August 17th, 2024] [Originally Added On: July 3rd, 2011]
- Burberry Acoustic - 'Chemistry' by One Night Only for Vogue Fashion Night Out [Last Updated On: August 17th, 2024] [Originally Added On: July 23rd, 2011]
- Rapid analysis of melting point trends and models using Google Apps Scripts [Last Updated On: August 17th, 2024] [Originally Added On: July 24th, 2011]
- Open Melting Point Collection Book Edition 1 [Last Updated On: August 17th, 2024] [Originally Added On: August 14th, 2011]
- Google Apps Scripts Workshop at Drexel University [Last Updated On: August 17th, 2024] [Originally Added On: August 21st, 2011]
- Patrick Ndungu talk at Drexel on Nanotechnology [Last Updated On: August 17th, 2024] [Originally Added On: August 21st, 2011]
- MiniSymposium Bradley Lab 2011 [Last Updated On: August 17th, 2024] [Originally Added On: October 9th, 2011]
- Chemistry [Last Updated On: August 17th, 2024] [Originally Added On: October 10th, 2011]
- Interpol - Rest My Chemistry [Last Updated On: August 17th, 2024] [Originally Added On: October 10th, 2011]
- Queens Of The Stone Age - Better Living Through Chemistry [Last Updated On: August 17th, 2024] [Originally Added On: October 12th, 2011]
- Greatest Chemistry Discoveries - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 13th, 2011]
- Butterfingers - The Chemistry - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 13th, 2011]
- Lec 1 Introduction to Chemistry [Last Updated On: August 17th, 2024] [Originally Added On: October 14th, 2011]
- KATNISS AND PEETA: Chemistry Screen Test using the cave scene from The Hunger Games - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 15th, 2011]
- The Smiths - Live on Data Run c. 1984, a British TV Program - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 15th, 2011]
- Organic Chemistry reactions - 7 clues from Obi Wan - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 15th, 2011]
- CHEMISTRY Period Live Fullmetal Alchemist Brotherhood 4 OP - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 16th, 2011]
- Rush - Chemistry - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 16th, 2011]
- The Office: Jim and Pam - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 17th, 2011]
- Chemistry 1A - Lecture 3 - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 19th, 2011]
- Chemical Party - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 19th, 2011]
- Shiny Toy Guns-Chemistry of a Car Crash (with lyrics) - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 21st, 2011]
- Balancing Chemical Equations - Video [Last Updated On: August 17th, 2024] [Originally Added On: October 22nd, 2011]