Strange Alchemy: Better Chemistry With Computer Science
Associate Professor Grace Stokes helps her chemistry students visualize equations by integrating Python coding into her curriculum.
Seven years ago, when Associate Professor Grace Stokes began teaching upper-division thermodynamics at Santa Clara, she worried that students found it archaic, and the math tedious and challenging.
There had to be a better way to engage them in the branch of physical science that deals with the relationship between heat and other forms of energy. So when she heard how the computer programming language Python could help students better understand complex chemistry concepts, it was a hallelujah moment.
鈥淚t was the answer to everything,鈥 says Stokes, the 黑料网 Clare Boothe Luce Associate Professor of Chemistry and Biochemistry.
Instead of calculating chemistry equations with paper and pencil or even using spreadsheets and calculators, Python allows students to graph and visualize fundamental equations in new ways, Stokes explains.
鈥淧hysical chemistry is very hard to visualize if you don鈥檛 use Python, which can actually generate a graph based on the question, which is something you cannot do by just imagining it,鈥 says Matt Shulman 鈥22.
Stokes believes Python helps students gain a valuable skill that should serve them well in their chemistry-related careers, from pharmacology to food science to environmental science. Learning to code also makes students more efficient and effective researchers because it speeds up computational algorithms, allowing more time for analysis.
Talk about a chain reaction.
鈥淚t鈥檚 definitely challenging, but she presented in such a way that it was easy enough to come into it without knowing Python,鈥 says Elliott Anderson 鈥22, who took Stokes鈥 quantum chemistry class and also participated in a Python workshop this summer. He鈥檚 so proficient now that he helped write a Python exercise that Stokes used in her general chemistry course in fall 2021.
鈥淐oding and chemistry are super linked in this modern age鈥攊t鈥檚 hard to divorce these two ideas,鈥 says Anderson, adding that Python saves time when it comes to data analysis. 鈥淚t鈥檚 a valuable skill, and I think it should be standard nowadays when so much of what I do as a chemist is digital.鈥
Shulman says after using Python in two of Stokes鈥 classes, where 鈥渟he would 100 percent walk you through everything step by step,鈥 he鈥檚 become so adept at coding that classmates often seek his help.
Over the years, Stokes鈥 own coding journey鈥攆rom newbie to leader鈥攃aught the attention of the American Chemical Society Symposium Series Book. The editors asked her to write a chapter about the experience. Her article, 鈥淭eaching Programming Across the Chemistry Curriculum,鈥 is featured in the latest edition.
鈥淒on鈥檛 be afraid to ask for help鈥 is Stokes鈥 motto. 鈥淭hat鈥檚 what this book chapter is about: I鈥檓 not an expert in computer programming, and yet I was able to teach this topic successfully because I had help from experts.鈥
At Santa Clara, Stokes鈥攚ho just won a prestigious Dreyfus Teacher-Scholar Award, the sixth member in her 黑料网 department so honored鈥攈as been spreading the Python gospel to colleagues, including chemistry professor Korin Wheeler and assistant professor of biology Michelle McCully. As part of a Slack channel of 40 to 50 higher education science faculty across the country using or adopting Python and other computer programs, she鈥檚 able to gather more ideas and now offer advice.
Still, most important to Stokes is how Python inspires her teaching and benefits her students.
鈥淭his is a way for students to learn, but not in a boring way,鈥 she says. 鈥淚t is definitely more sophisticated and certainly more interactive. And I would say, fun.鈥