Perspectives: Teaching chemists to code - C&EN Global Enterprise

Spreadsheets are a standard tool in chemistry for simple tasks such as data analysis and graphing. Chemistry students are often introduced to spreadsh...
2 downloads 10 Views 402KB Size
EDUCATION

Perspectives: Teaching chemists to code Providing undergraduate chemistry majors with computer programming skills can make them more efficient and effective scientists CHARLES J. WEISS, WABASH COLLEGE

S

30

C&EN | CEN.ACS.ORG | SEPTEMBER 4, 2017

ming ability ... and computer programming is not part of the standard training for chemists ... but it should be. Learning computer programming is an invaluable skill for chemists, as it empowers them to do more with collected data and, ultimately, to be more efficient and

Weiss uses Jupyter Notebooks, like these examples shown, in his scientific computing undergraduate chemistry course. effective scientists. A competitive edge today doesn’t necessarily go to the person who can collect the best data but to the person who can best process and analyze the data collected. This nuance involves automating repetitive and time-consuming tasks, mining large data sets that don’t fit well in spreadsheets, and extracting information and trends too subtle or complex for people to discern without computers. I recently chatted with a fellow chemist who had interviewed for a job at a

address the lack of programming training in traditional chemistry courses, last fall I taught the first iteration of a class called Scientific Computing for Chemists. During the course, chemistry students learned basic Python programming and how to use Jupyter Notebooks and SciPy stack—all free and open source—to solve chemical problems (J. Chem. Educ. 2017, DOI: 10.1021/acs.jchemed.7b00078). The importance and utility of the course content, which assumes no previous pro-

C R E D I T: CH A R LES WE I S S

preadsheets are a standard tool in chemistry for simple tasks such as data analysis and graphing. Chemistry students are often introduced to spreadsheets their first year of college, if not earlier, and those who continue on to do research will likely use them as a means of handling and visualizing data. Although spreadsheets have more capabilities than many people realize, they are still limited in comparison with science-specific data-analysis software applications. For example, spreadsheets are currently incapable of or not well suited for image analysis, automated data processing, high-dimensional data analysis, complex simulations, and machine learning that are needed in modern chemical research laboratories. While some educators in the chemistry community have embraced advanced data-analysis software, it’s surprising that its use isn’t more common. And going beyond that, it’s surprising that computer programming has not effectively permeated the training of undergraduate chemistry majors. The American Chemical Society’s guidelines for undergraduate training do not directly address educating students on using digital tools and programming for dealing with experimental data. In an age when chemistry classrooms have long been equipped with computers, and when research labs and companies where our students will go to work are experiencing a digital data deluge, it seems that we are leaving them ill prepared. Software better geared to those earning chemistry degrees or conducting research is readily available. Common examples include MATLAB, Python’s SciPy stack, and GNU Octave. The last two are free, opensource packages. So why haven’t these become standard tools taught to all undergraduate chemistry majors? A key barrier to their adoption is that each of these packages requires some level of program-

company. The interviewer asked whether this chemist knew how to program. The company maintains an extensive database of its research results obtained over the years, and research managers want their team members to have computer programming skills so that they can access this data and use it in their ongoing research. The interviewer also pointed out that computer programming is a skill that, unfortunately, most chemists joining the company do not have. I have seen firsthand how students light up when data analysis and computing resources are made available to them. To

Incorporating more data analysis into gramming experience, is underscored by the undergraduate curriculum takes time. the postcourse survey, which revealed that Chemistry departments have increasing three-quarters of the students had applied requirements placed on them for granting what they were learning to their independent research projects or other courses be- undergraduate degrees and, further, have limits on the number of courses they can fore the computing course had concluded. require or offer for a major. The survey also shows that the This situation can make it difstudents believed they learned ficult to include a topic such as to perform valuable data analcomputer programming that yses that they didn’t previously educators may not view as cenknow were possible and that tral to chemical science. the course provided them betShare your But that is an outdated view ter understanding of and conexperiences with of chemical science. Scientific fidence in working with digital undergraduate data. I am teaching the course chemistry computer computing can be introduced to students in a course as deagain this fall. programming scribed above or through a at cenm.ag/ My chemistry colleagues course from a computer science programming. have noticed a difference bedepartment. It can also be incause of the course, stopping fused into other existing chemistry courses. me in the hallway to comment on how Last spring, I replaced an outdated excited the scientific computing students piece of software for an intermediate-level were for taking it and reporting how chemistry course lab activity with Python student coding carried over into other and Jupyter Notebooks. Our general courses. For example, one professor notchemistry radioactivity lab this fall will ed that the students taking the advanced include students running precoded, stoanalytical chemistry course in the spring chastic simulations of radioactive decay approached many of the problems using to examine how randomness influences Python and Jupyter Notebooks. Instead experimental outcomes. The students of performing the calculations by hand or are being asked to modify values used in using spreadsheets, students immediately the code, but they do not need to know went for the more advanced tools.

CR E DI T: CO U RT ESY O F CH AR L ES W E I S S

More online

programming for the activity. This exercise will provide our first-year chemistry students with an early exposure to using more sophisticated tools for running simulations and visualizations. No matter how this new knowledge is incorporated into the curriculum, we should work to equip our students entering the field of chemistry with the digital skills to be efficient and effective scientists. This includes the ability to process, analyze, and visualize data using at least one programming language and to be comfortable writing scripts to automate research tasks. While it will take time and effort to implement, emphasizing programming skills will empower students and better prepare them for their careers.

Charles J. Weiss teaches chemistry and scientific computing at Wabash College and conducts research in organometallic catalysis and bioinformatics. He taught himself to program in Python to support his teaching and research.

®

American Chemical Society

An Employee-Owned Company

GET BACK TO CLASS Learn the essentials you need to master your job with an ACS Professional Education course, taught by experienced industry experts. Visit www.acs.org/class to get started.

• Metal Catalysts • Ligands • Buchwald Ligands & Precatalysts • Screening Kits

iPr iPr iPr PCy2 H2N Pd Cl

• Biocatalysts Brought to you by the ACS Career Navigator™ www.acs.org/CareerNavigator ©2016 American Chemical Society. CN1613

www.strem.com

[email protected]

SEPTEMBER 4, 2017 | CEN.ACS.ORG | C&EN

31