- Open Access
The Spectral Game: leveraging Open Data and crowdsourcing for education
Journal of Cheminformatics volume 1, Article number: 9 (2009)
We report on the implementation of the Spectral Game, a web-based game where players try to match molecules to various forms of interactive spectra including 1D/2D NMR, Mass Spectrometry and Infrared spectra. Each correct selection earns the player one point and play continues until the player supplies an incorrect answer. The game is usually played using a web browser interface, although a version has been developed in the virtual 3D environment of Second Life. Spectra uploaded as Open Data to ChemSpider in JCAMP-DX format are used for the problem sets together with structures extracted from the website. The spectra are displayed using JSpecView, an Open Source spectrum viewing applet which affords zooming and integration. The application of the game to the teaching of proton NMR spectroscopy in an undergraduate organic chemistry class and a 2D Spectrum Viewer are also presented.
Technology has made up to date information readily available to students through open course materials, recorded lectures, e-books, blogs, etc., and is offering additional options to distributing information directly to students other than through traditional lectures and textbooks. As a consequence, an increasingly important role for educators is one where they become guides to knowledge and understanding; teaching skills and techniques, which now include information literacy skills – showing students how to locate, evaluate, and effectively use knowledge – and then to reinforce skills, knowledge and understanding through practice.
Traditional ways to reinforce skills, knowledge, and understanding through practice include homework, quizzes and labs. These traditional techniques can be enhanced with the use of freely available technologies, and in a world where the gaming market is beginning to outperform both music and films, some instructors are using technology and new freely available data to create games that catalyze learning and aid in the teaching of chemistry. Word puzzles have been devised to teach first year general chemistry, named organic reactions and basic chemistry concepts. Popular game shows such as Taboo, Jeopardy! [7, 8] and Who Wants to be a Millionaire? have been adapted for general chemistry review. Card games have been devised to teach carbohydrate chemistry, element symbols, functional groups and organic reactions. An adaptation of BINGO has been used to teach nomenclature. A version of the Name Game facilitates student interaction while reviewing chemistry concepts. There is even an organic chemistry game that can be played on a cell phone.
For spectroscopy, atomic absorption spectra can be practiced by moving virtual samples into a flame. Infrared spectra interpretation has been turned into a game by a modification of checkers or as a quiz. Other board games used to teach general chemistry include Concentration, CHeMoVEr to learn about balancing chemical equations. In addition to teaching applications, games can be used to solve chemistry problems. For example, Foldit has been used to leverage crowdsourcing to solve cases of protein folding. Russell has extensively reviewed older chemistry games. In this report we describe an additional game that can be played to help learn organic chemistry – a game that was not possible just a few years ago – The Spectral Game.
The spectral game
The interpretation of spectra has always been an essential skill for mastering organic chemistry and many students struggle to grasp the nuances of various spectroscopy techniques. One of the problems is that traditional textbook assignments are pre-selected to provide simple examples that rarely deviate from what was learned in class. We believe this can be a disservice to students in that it does not prepare them for real-world structure elucidation challenges. With these limitations in mind we took advantage of the availability of the present perfect storm of internet technologies, online databases of Open structure and spectral data and flexible and intuitive tools for the viewing of spectral data to design a spectral game to assist in the teaching of spectroscopy in an entertaining yet educational manner.
Implementation: The spectral game website
The Spectral Game was created by bringing together Open Source spectral data, a spectrum viewing tool and appropriate work flows for delivering these in a gaming fashion. The Open Source spectral data identifiers and the properties and identifiers of the chemical structures which they represent are drawn from the ChemSpider database using freely available web services provided by ChemSpider. These data are parsed and stored on the Spectral Game server. The game uses these data to display a series of spectra selected randomly one at a time, together with a number of chemical structure images. The challenge for the player is to select the chemical structure that matches the displayed spectrum. Both the spectrum and chemical structure images are pulled dynamically from the ChemSpider database using an embed functionality described below.
The applet used to display the spectra (JSpecView) was developed at UWI and is now the primary Open Source spectrum viewing applet for displaying interactive spectra on the internet. It allows zooming, highlighting of regions within the spectrum, spectrum reversal and display of multiple spectra. Some changes were needed to the viewer code to allow for the suppression of sample details during the display so that users could not cheat by simply looking up the details of the material under study via the JCAMP-DX header. The first line of the header in a JCAMP-DX file is ##TITLE = and often contains the name of the sample. JSpecView has a menu option to display the header values and this would obviously make it very easy to answer the quiz. A new parameter was introduced (OBSCURE) that activates a routine to replace the value of the Title field with "unknown" so that any attempt to display the header lines would not give any advantage.
A brief introduction to the simplest JCAMP-DX protocol follows:
JCAMP-DX files consist of plain text that can be read and edited by simple text viewers. The simplest type is divided into two sections; the Header and the Data. The Header defines the type of spectrum, the source of the data, the instrument type and parameters as well as the dataset that follows in terms of start and end positions of the X values and deltaX. Many instruments make use of fixed separations of the X values and this is used in the method of compression for JCAMP-DX files. As mentioned above, the first line generally gives a description of the sample and looks like ##TITLE=, the second line is generally ##JCAMP-DX = with a version number. IR spectra are often found as version 4.14 while NMR need to be 5.01 since this corrected for problems of Shift References/Offsets not handled in earlier versions. JCAMP-DX version 6 that would cover 2D NMR was published as a draft for comment, but has not yet been finalised.
The Data section generally begins with ##DATAXY = (X++(Y..Y)) which is a shorthand notation for the idea that with fixed changes in the X values it is possible to put an X value at the start of the line and then provide a number of Y values with the understanding that these correspond to the next set of X values. The start of the next line begins again with an X value so that checks can be made to ensure that no line is missing or duplicated. A simple example from an IR file would be;
##XYDATA = (X++(Y..Y))
673 215867052 213571948 211374384 209305312 207332720 205205968 203152088
680 201167848 199108304 197021336 195063332 193056836 191013384 189185540
687 187358300 185164740 182889624 182557368 192119980 208444664 200564276
DeltaX was 1.0 and the Y values here have a ##YFACTOR = defined in the Header of ##YFACTOR = 9.313225746e-10 so that the actual values corresponding to X values of 673, 674, 675, 676 1/cm are calculated by multiplying by the YFACTOR to give:
0.198904 0.196858 0.194931 0.193094
A range of compression types exist to cram more Y values onto each line that make use of substituting the first digit by a letter etc.
The end of the file is indentified by ##END=
At the beginning of the game two structures, one correct and one incorrect are shown below the spectrum, see Figure 2, and the user is asked to click on that structure that is the best match for the spectrum displayed.
The structures are extracted from ChemSpider using similar embedding functionality for chemical structures as used for spectra. If the user selects the correct structure then they proceed to the next set of spectrum and structures and the process is repeated. The player needs to examine the spectrum to compare various features to confirm or reject each of the structures. These include chemical shifts, multiplicities, peak intensity, functional groups and so on. In NMR users should be able to quickly distinguish aromatic protons from alkyl protons, aldehydic resonances from exchangeable carboxylic acid protons and methoxy singlets from methylene groups within a chain. In infrared spectra the user would be looking for specific functional group vibrations such as carbonyl groups. These simple filters can be enough to distinguish spectra-structure associations early in the game but complexity changes as the player progresses. The game becomes increasingly difficult with the number of associated structures increasing, to a maximum of five per spectrum. As the number of structures increase they also become more structurally similar. When a player reaches a score of forty, rounds also become timed, see Figure 3, and the player must select an answer before the countdown expires. The amount of time a player gets decreases as rounds progress to a minimum of ten seconds. So, even spectroscopy experts will find the game challenging.
Complexity also increases dramatically for the C-13 spectra where the number of carbon atoms in all of the structures is made equivalent to the number of carbon atoms present in the correct structure. This can be confusing until the player takes issues other than chemical shift into account: symmetry, peak intensity related to nature of carbon nucleus and so on.
The game continues until the player gets a spectrum validation wrong. At that point the player is given their performance relative to the list of both recent and top players. The game also allows players to associate with groups which allows for direct score comparison amongst members of the same group.
There may be a number of reasons that the player may get the spectrum assignment wrong. The user may simply not have the skills to perform the validation correctly and we have provided a wiki of spectroscopy resources for players to brush up on their spectroscopy skills. Alternatively, the spectrum uploaded to ChemSpider itself may be wrong and incorrectly associated with a structure. One of the side benefits of the Spectral Game is the examination of the data and reporting of potential issues to the hosts of the game. As players progress through the game they can flag spectra initially displayed in reverse and leave comments associated with each of the spectra and curators on ChemSpider can review the data and take the appropriate actions. The percentage of time that a spectrum is matched correctly is also recorded giving a measure of how "difficult" the spectrum is to interpret. Website analytics show that within the last two months 3,434 unique visitors from 68 countries have combined to examine the spectra over 55,000 times as they played the game. Such crowdsourced curation efforts have resulted in the deletion or re-association of certain spectra from the database, have allowed the curators to re-reference the spectra or remove solvent peaks which were dominating the spectra to the point that compound resonances were not visible and have allowed the curators to add annotations to the spectra regarding the presence of impurities. An interface has been provided to ChemSpider curators to quickly review comments on individual spectra and link-through to ChemSpider to review, edit as appropriate and then remove the flags from the Spectral Game, see Figure 4. As a result of the Spectral Game, the quality of spectral data on ChemSpider has improved significantly with 3 spectra being removed from the database and over a dozen being processed to re-reference and remove solvent peaks. An additional side benefit is that the game has encouraged additional deposition of spectral data to the ChemSpider database thereby benefiting the chemistry community as a whole, not just the players of the Spectral Game.
The spectral game in second life
The Spectral Game was adapted to the multi-user virtual environment of Second Life by bringing together three tools. First, we used the Orac molecule rezzer, a Second Life molecule building tool that takes SMILES, InChIs or InChiKeys and converts them to conformationally reasonable 3D structures. Second, we scripted a JCAMP spectrum viewer that allows interactive zooming and integration of desired regions via chat in Second Life. Finally, we used Open Data spectra from ChemSpider. The game begins by clicking on the spectrum display board. A spectrum then appears with several molecules in the surrounding area, see Figure 5. The player can zoom into any area of the spectrum by typing a command such as "zoom 1.2–2.5", which specifies the desired ppm range, in the chat box. By clicking on the correct molecule the player scores 2 points and gets another spectrum to analyze. Clicking on an incorrect molecule will cause the player to lose one point. When all spectra have been processed (a typical number is 5) the player is given their performance status in a list of top players. The game can also be terminated at any time by typing "quit."
In class assessment
The Spectral Game was evaluated in one of the author's (JCB) undergraduate Organic Chemistry classes (CHEM242 at Drexel University) during the winter 2009 term. Both the web and Second Life versions were used in different ways.
Workshops where the instructor led the class discussion while projecting the web version of the game were useful for a larger number of students, especially when students had just started learning to analyze spectra. Some IR and C NMR spectra were analyzed this way but the majority were H NMR. A class discussion would evolve about the key differences between the expected spectra of the molecules on display and then the instructor could zoom into relevant regions to explore those details. In this way, without any planning, all of the key concepts in the course relating to NMR were repeatedly reviewed. When the opportunities arose, simple coupling patterns, peak shifts, symmetry and diastereotopic groups were highlighted.
A main advantage of the Spectral Game compared to textbook problems is that real-world spectra were made available. Large solvent peaks (such as HOD at 4.8 ppm), peak distortions, overlapping peaks in complex coupling patterns and impurities were pointed out and the students were shown how to address this. Since the spectra are random, the instructor does not know ahead of time which spectra and molecules will be presented. This means that, on occasion, the instructor may not be able to solve the problems based on simple heuristics taught in class. This tended to happen more with carbohydrate derivatives. This was an opportunity to discuss other techniques that a working chemist might use in practice. We believe that such discussion is essential to help train students for real world research.
The game was also used individually by students. During class workshop time the instructor could circulate to assist students sequentially. Students were also encouraged to play the game from home by offering a prize for the top score during competition periods lasting about a week each. Two molecular model kits and a textbook were given out over the course of the term. Players can specify a group when logging in to play and this makes it easy to view the high scores within the class or compared to all the people from around the world playing. As noted by others, competition can be highly motivating for some students.
Because it requires more time to set up and demonstrate, the Second Life version was not used as much as the web version during the course. The ability to view molecules in 3D in Second Life is an advantage, especially for bridged cyclic structures. However, the main advantage of Second Life is the ability of students to interact with others in avatar form, whether it be other students in the class, the instructor or people from around the world. This type of networking is not yet possible with the current web version of the game.
2D spectral game
Obtaining high quality 2D NMR open data sets is not as easy as finding 1D data. Fortunately, one of the authors (AJW) had been involved previously in a study involving automated versus human validation of 1D and 2D NMR data sets. The paper describes a method for structure validation based on the simultaneous analysis of a 1D H NMR and 2D 1H-13C single-bond correlation spectrum such as HSQC or HMQC. When compared with the validation of a structure by a 1D HNMR spectrum alone, the advantage of including a 2DHSQC spectrum in structure validation is that it adds not only the information of 13C shifts, but also which proton shifts they are directly coupled to, and an indication of which methylene protons are diastereotopic. Using multiple real-life data sets of chemical structures and the corresponding 1D and 2D data, it was possible to unambiguously identify at least 90% of the correct structures in an automated fashion. ACD/Labs provided us with the 30 sets of 1D and 2D spectra presented in the publication together with the pairs of correct and incorrect structures. We used these data in a 2D NMR Spectral Game for users to start to learn how to use the combined information available from both 1D H1 and 2D HSQC data for identifying the correct structure. The development of this game has required the development of a new tool for visualizing 2D NMR spectra on the web (described below) and requires the player to use the H1 NMR spectrum in the standard JSpecView applet together with the 2D data display to interrogate the data and decide on the most appropriate match.
Interactive 2D spectrum viewer
The data displayed in the 2D Spectrum Viewer is extracted from images of 2D spectral data using GD, a php graphics library. A php script downloads an image from a web server, in our case from ChemSpider, extracts the data pixel by pixel and exports the data in a format that can be read by the 2D Spectrum Viewer. The php code can be integrated with the viewer creating a dynamic 2D spectrum viewer that can be deployed in web pages, see Figure 7.
New technology has great potential to benefit education. From this example, it should be clear how important Open Data can be for stimulating rapid re-mixing for educational examples. As more data become available, the usefulness of the Spectral Game and similar initiatives will become even greater.
Availability and requirements
Project name: Spectral Game
Project home page: http://spectralgame.com
Operating system: Web Based – Platform independent
Other requirements: Java 1.5
All files and related documentation are available from the project website http://spectralgame.com.
Project name: 2D Spectrum Viewer
Project home page: http://spectralgame.com/2d/2dviewer/
Operating system: Web Based – Platform independent
Other requirements: GD, flot
License: GNU Lesser General Public License.
Bradley JC: Teaching Organic Chemistry with Blogs and Wikis. presented at the American Chemical Society meeting March 25. 2007, [http://drexel-coas-talks-mp3-podcast.blogspot.com/2007/03/teaching-organic-chemistry-with-blogs.html]
Game Dramatically Outsells Singles, Albums, Films – Games Now Most Popular Entertainment Medium in UK March 19, 2009. [http://www.sourcewire.com/releases/rel_display.php?relid=46398]
Boyd SL: Puzzling through General Chemistry: A Light-Hearted Approach to Engaging Students with Chemistry Content. J Chem Ed. 2007, 84 (4): 619-
Erdik E: Spiral Puzzle for Organic Chemistry Students. J Chem Ed. 2003, 80 (4): 428-
Helser TL: Terminology: Four Puzzles from One Wordsearch. J Chem Ed. 2003, 80 (4): 414-
Capps K: Chemistry Taboo: An Active Learning Game for the General Chemistry Classroom. J Chem Ed. 2008, 85 (4): 518-
Grabowski JJ, Price ML: Simple HTML Templates for Creating Science Oriented Jeopardy! Games for Active Learning. J Chem Ed. 2003, 80 (8): 967-
Keck MV: A Final Exam Review Activity Based on the Jeopardy Format. J Chem Ed. 2000, 77 (4): 483-
Campbell S, Muzyka J: Chemistry Game Shows. J Chem Ed. 2002, 79 (2): 458-
Costa MJ: CARBOHYDECK: A Card Game To Teach the Stereochemistry of Carbohydrates. J Chem Ed. 2007, 84 (6): 977-
Granath PL, Russell JV: Using Games To Teach Chemistry 1. The Old Prof Card Game. J Chem Ed. 1999, 80 (4): 428-
Welsh MJ: Organic Functional Group Playing Card Deck. J Chem Ed. 2003, 80 (4): 426-
Sandler B: Organic Chemistry Game. 1995, [http://userwww.sfsu.edu/~cberkman/organic_chem_game.pdf]
Crute TD: Classroom Nomenclature Games – BINGO. J Chem Ed. 2000, 77 (4): 481-
Koether M: The Name Game: Learning the Connectivity between the Concepts. J Chem Ed. 2003, 80 (4): 421-
White B: Cell phone organic chemistry game. [http://intro.bio.umb.edu/OrgoGame/]
Whyville Spectroscopy Game. [http://g.whyville.net/smmk/spectrum/spectrometerMatch2]
Pendarvis R: Infrared-Spectroscopy Checkers. The Chemical Educator. 1998, 3 (4): 1-5. 10.1007/s00897980234a.
Funtrivia Infrared Spectroscopy Quiz. [http://www.funtrivia.com/trivia-quiz/SciTech/Infrared-Spectroscopy-295974.html]
Nowosielski DA: Use of a Concentration Game for Environmental Chemistry Class Review. J Chem Ed. 2007, 84 (2): 239-
Russell JV: Using Games To Teach Chemistry. 2. CHeMoVEr Board Game. J Chem Ed. 1999, 76 (4): 487-
Bohannon J: Gamers unravel the secret life of proteins. Wired. 2009, 17.05: [http://www.wired.com/medtech/genetics/magazine/17-05/ff_protein?currentPage=all]
Russell JV: Using Games To Teach Chemistry: An Annotated Bibliography. J Chem Ed. 1999, 76 (4): 481-
The Spectral Game website. [http://spectralgame.com]
ChemSpider database. [http://www.chemspider.com]
Williams AJ: Uploading Spectra onto ChemSpider. [http://www.chemspider.com/docs/Uploading_Spectra_onto_ChemSpider.htm]
Pacific Lutheran FTNMR FID Archive. [http://rainier.chem.plu.edu/fid_archive.html]
ACDLabs website. [http://acdlabs.com]
NIST Chemistry WebBook. [http://webbook.nist.gov/chemistry/]
Williams AJ: Why are spectra like YouTube videos?. [http://www.chemspider.com/blog/why-are-spectra-like-youtube-videos.html]
JSpecView SourceForge webpage. [http://sourceforge.net/projects/jspecview/]
Lancashire RJ: The JSpecView project: an Open Source Java viewer and converter for JCAMP-DX, and XML spectral data files. Chem Central J. 2007, 1: 31-10.1186/1752-153X-1-31.
The Spectral Game Wiki. [http://spectralgame.wikispaces.com/]
Bradley JC: NMR game on Second Life. [http://usefulchem.blogspot.com/2009/02/nmr-game-on-second-life.html]
Lang ASID: The ORAC rezzer. [http://www.youtube.com/watch?v=tOfhuoRbnCg]
Bradley JC: Winter 09 term post-mortem: SpectralGame implementation. [http://drexel-coas-elearning.blogspot.com/2009/03/winter-09-term-post-mortem-spectralgame.html]
Bradley JC: FriendFeed and Second Life chemistry networking assignment. [http://drexel-coas-elearning.blogspot.com/2009/04/friendfeed-and-second-life-chemistry.html]
Golotvin SS, Vodopianov E, Pol R, Lefebvre BA, Williams AJ, Rutkowske RD, Spitzer TD: Automated structure verification based on a combination of 1D 1H NMR and 2D 1H-13C HSQC spectra. Magn Reson Chem. 2007, 45: 803-813. 10.1002/mrc.2034.
Flot website. [http://code.google.com/p/flot/]
GD website. [http://us.php.net/gd]
The spectral data on ChemSpider have been deposited by multiple users and we acknowledge specific ChemSpider users for their depositions: Dr Chris Singleton and Heinz Kolshorn. Data were also sourced from the websites of Pacific Lutheran University, the NIST Webbook and software providers and provided by ACD/Labs.
The authors declare that they have no competing interests.
The Spectral Game was conceived by JCB and ASIDL. ASIDL wrote the code. AJW contributed spectra and structure images from ChemSpider and curates content. RJL modified JSpecView to remove title information from being viewable. JCB tested the game in an undergraduate organic chemistry class and provided prizes for contests involving gameplay. The 2D Spectral Game and 2D Spectrum Viewer was conceived by AJW and ASIDL. ASIDL wrote the code. AJW contributed 1D and 2D spectral sets and structure images from ChemSpider.
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
About this article
Cite this article
Bradley, JC., Lancashire, R.J., Lang, A.S. et al. The Spectral Game: leveraging Open Data and crowdsourcing for education. J Cheminform 1, 9 (2009). https://doi.org/10.1186/1758-2946-1-9
- Correct Structure
- Carbohydrate Derivative
- Lesser General Public License
- Interactive Spectrum
- Life Version