Skip to main content

Coding for Chemists: Saving Time and Solving Problems with Python

Christopher J. Johnson Butler University
Benjamin J. Lear The Pennyslvnia State University


Coding for Chemists introduces coding in Python as a tool for solving real-world problems commonly encountered by experimental chemists. It will be of interest to anyone who wants to increase their research sophistication or streamline their workflows.

Book Purchase Options
Forthcoming title
For Instructors
Request Evaluation Copy


Johnson and Lear’s Coding for Chemists is targeted to experimental chemists who are curious how coding might improve their research. Assuming no prior knowledge of coding and quickly introducing concepts and workflows that will be applicable to nearly all practicing experimental chemists, this book is written to function as the framework for a 1-quarter or 1-semester course on programming at either the undergraduate or graduate level. It can also be used for individual study or to support the introduction of coding into chemical laboratory courses.

Using a narrative structure that frames coding concepts in terms of tasks common to chemical research, the reader will learn to plan experiments, automate the generation of publication-quality figures, fit experimental data to any desired model, and process data using advanced data anlysis techniques. The goal is to bring the reader from any prior knowledge regarding coding to the point that they are able to extend the capabilities of their research, while also saving a great deal of time. The book includes examples, detailed comments on code, and numerous problems. It is supported by online resources.

Table of Contents


Christopher J. Johnson Butler University

Christopher J. Johnson received his B.S. in Physics from Butler University in 2005 and his Ph.D. in Physics from University of California, San Diego in 2011 under the supervision of Prof. Robert Continetti. In 2011, he received an NSF American Competitiveness in Chemistry fellowship for postdoctoral work under Prof. Mark Johnson at Yale University. He joined the faculty of the Department of Chemistry at Stony Brook University in the fall of 2014, where he built a research program with two main thrusts: to understand the mechanisms by which particles form out of thin air in Earth’s atmosphere and to understand and control the fundamental properties of small metal nanoclusters. These efforts required the development of home-built instruments to determine the structures and fundamental properties of nanoscale objects and accompanying custom data acquisition and analysis software. For his independent work, he has been recognized with an Air Force Young Investigator Award and a Department of Energy Early Career Award as well as the Flygare Award at the International Symposium on Molecular Spectroscopy and the JPCA and PHYS Division Lectureship Award from the American Chemical Society. As an educator at Stony Brook, he developed a course introducing problem solving for chemistry students using computer programming that serves as a partial basis for this book. He enjoys cooking and boating around Long Island.

View Profile

Benjamin J. Lear The Pennyslvnia State University

Benjamin J. Lear earned his Bachelor’s Degree in Biochemistry from the University of California, Davis. He earned his M.S. and Ph.D. in Chemistry from the University of California, San Diego, under the mentorship of Prof. Clifford Kubiak. He performed postdoctoral studies at The Ohio State University, under the mentorship of Prof. Malcolm Chisholm. From there, he joined the chemistry faculty at The Pennyslvnia State University, where he runs a physical-inorganic research group that currently focuses on the interaction between inorganic materials and their near-chemical environment. He has taughted both graduate and undergraduate chemistry courses and has also developed and teaches a course on the design of data visualizations. Outside of work, Prof. Lear enjoys reading, cooking, eating, travel, biking, hiking, hanging out with friends, and games of all sorts. He particularly enjoys frisbee, golf, squash, baduk, and the current renaissance of 2D metroidvanias.

View Profile