Chemistry Education with the Academic Outreach Team [Part 2]

Recorded livestream (Part 2) from Wolfram’s Academic & Outreach team demonstrating how Wolfram notebooks and Wolfram|Alpha tools can be used to design chemistry teaching materials. Speakers (Noah Shartov, Jason Sonberg, John Mint Maui) show styled notebook templates, cloud publishing and sharing, WolframAlpha-backed calculations with step-by-step solutions, interactive manipulatives/demonstrations, and example activities (homework, course module, lab data analysis, spectroscopy). The material is practical: ready-made instructor/student notebooks, code snippets/‘wa’ helper, and cloud-hosted data/examples for reuse and modification.
Chapters
Hello, everyone. Welcome again to our academic and outreach live stream for Chemistry. This is our second one of those. We're once again joined by Jason today, who is. What is the terminology for your job? Lead chemistry.
Lead developer. Chemistry education.
Fantastic. Because that's exactly what we're going to be discussing today. Jason Sonberg is here with us. I'm Noah Shartov. My degree is in math education, of course. We're here with John Mint Maui as well. And Jason, without any further ado, we were hoping to see some materials today about people designing their own classroom materials, if I'm understanding correctly. Yeah, using some materials that they might have on tanned.
Exactly. All right, well, then let me share my screen and I think that'll make conversation a little bit easier. Oh, yes.
As Jason is pulling this up, this is a reminder. This is the second this series. So if you are curious about chemistry education, please do check out our previous stream on this topic. And then we have this more about developing curricula.
And as always, we will be uploading a link to these materials so you'll get to play around with them later on. Just coming back to this live stream. Excuse me if I mix up my syllables a little bit. I hearing myself a half second after I speak. And so if we move anything, if we move through anything quickly, just know you're going to be able to return to it and look at it in more detail on your own schedule later on.
All right, well, without, if there's nothing else, then I'll go ahead and start walking us through some of the things I put together. Okay, so one of the things we wanted to talk about are notebook templates, which folks might not be aware of. And so here, let's change, we'll do the zooming. Let's make things just a bit bigger for this. So if you have the Wolfram desktop or any of the other products, you can go file new, but we're using Wolfram desktop today. File new and then go to styled notebooks as I'll do. Let's see if we can file new styled notebooks. And you're going to get the window that is in the notebook there pop up. So there we go. So this is a collection of styled notebooks. And one thing to note is that so the icons are rather rectangular rather than being square. And that's because each one is a double button. So at the top you can click new to get a new version, a new notebook with that style sheet added, or you can apply that current style sheet to your notebook that you have Open. I'm not going to apply that because it would rearrange everything in my notebook. But there's. Let's see, there's. What is this? 12 different styles and for your use in chemistry, I think especially if you're working with the upper graduates in the undergraduate curriculum. So juniors and seniors as they might be working towards developing the skills to do a journal article or do a more formal write up of their laboratory work or even their pre laboratory work, the journal article template can be a handy place to start. So here I click new. What you see is it's pre populated with text and centered in not for example the ACS style for submitting to an American Chemical Society journal. But it's a general format and here they can just start typing into the particular text box. This is my. And continue on filling in the various bits and cutting and pasting to duplicate parts. There's pre built tables that are. That are laid out here and so the student can see how things can be put in. And if you're new to teaching as seasoned educator, it can be very, very helpful to have templates that the students put their doc their data into because then when you're grading everything looks very similar. You know where to look for everything. Rather than allowing things to be too creative, it can actually really slow down the processing and giving feedback. So I'm a big fan of templates myself and this is just one of many that are built into the desktop system. I'm not going to save this.
I'm loving this. I know how intimidating a blank page can be for someone trying to write up some materials. Especially if you have something already produced, it's nice to be able to fit them into this. You mentioned that if you had hit apply it would change things in your current document and I understand that it would change the format of everything. Would it also change any of the content like what you'd written or anything or would it just change?
No, no, it would just change. It would just do the styling. The styling.
Gotcha.
Yeah.
For people who are interested to sort of make your own style sheets, I am personally not really interested in doing lots of like really fine detail of, you know, how does this look and that look? However, it is very important that someone do that to make things that I make look nice. Right. And so this is what this pre built style sheets are for. But if you would like to make your own style sheet, this is also something which is totally possible.
Yeah, that's right. So if. And what's nice is that you could Start with an existing style sheet. So maybe you're working with first year students and you just would like them to be able to group their thoughts into a nice outline. But maybe you don't want it to have set up to go beyond say like, you know, C1, 2. You don't want it to go all the way down because that might be too much detail. So you want to, you know, curb the students enthusiasm. Potentially. You could define your own style sheet to, to either turn that off or get rid of it or add more if you needed for that matter.
So yeah, am I remembering correctly that the style sheet not only splits things up into visually distinct sections so that you can make it clear when one topic ends or another topic is related to the previous one, but it also splits it up functionally. Like you could select a bunch of code that is in each of these sections and run just that.
Yeah, I say. So for example, I mean, this is an outline, for example. But right, there's no here I've selected. Right, there's just text here. But now these particular cells, I could, if I hit shift return, I could evaluate them. Of course it doesn't do anything because they're just text. But like you said, as I'll show later on, when you have big groupings of things, you can evaluate just that. And that's important to point out that with the Wolfram notebooks you can't, you don't have to sequentially evaluate things. You could, you know, just reevaluate in the middle of your document and jump down and evaluate something else. You could have code that hasn't been evaluated hanging around mixed in with text and pictures and other things. You don't have to evaluate from the top of the notebook down. You can, you can do it as you need it. All right, so that's notebook templates using the styled notebooks and the style sheets that are the technology underneath that to make that all happen. And like I said, we have 12 of them defined. And just, just be careful. It's when I was first reminding myself how to use these this morning. Be careful when you're clicking because there's two buttons conveniently placed there. But if you're so groggy from the night before, you might click the wrong one.
Yeah, the worst is when you click Apply with a blank notebook because that will change the format of all of the text and all of the everything. And you won't know it's done any of that because you just see text, because it's applied it to the text. List document you already have, so.
Yeah, exactly. Exactly. And like I said, I suspect the outline in journal articles will be the style of notebooks that'll be most popular for the chemistry curriculum. But there are others.
So note for viewers, actually, if you're ever curious what the style sheet is for a particular notebook, this is an option that lives in the notebook. And so you can see what is the style sheet which is being applied by looking at the options of your evaluation notebook. That's not something that you would probably do unless you saw a style sheet that you really liked and then you were curious how did they do that?
And then you would know basically you want to. Speaking to the, to the new educator. You'd want to build your template that you're. Your styled notebook that you want to use for your particular classroom or assignment. Do it once and then never do it ever again. So that you don't. The idea of even though you have control at that very minute level of, of formatting and coloring and everything, it's. It's powerful when you need it. But try, you know, you don't need to dig into it every day. That's the beauty of having it all rolled away. So the next topic that I wanted to go on, moving from the. The student side, where you're maybe reigning in how they're giving information to you from their assignment or assessment or activity or just organizing their own thoughts and teaching, you know, good logical thinking and logical chemistry thinking is to see how our tools can enhance whatever textbook you're using. And even if you haven't been in, I know you weren't hanging around in the chemistry curriculum much. It's just like everybody else. We have an enormous amount of textbooks that are out there, ranging from middle school chemistry all the way up to graduate level chemistry and everything in between and without, you know, not to give.
Up the whole industry. Right. Not just our company.
That's correct. That's right. That's right. Yeah. I should say, I think we have a couple that, that have been published out of Wolfram, but I'm talking in the big sense of that. You know, what's available as. As if you were to go teach chemistry at any particular level. There's more than one option here. I've just quickly listed two that I happen to like and referenced a lot. This is Chemistry Adams 1st 2nd edition, which is funded by NSF funding, so it's freely available. And this other one, Chemistry Life and the Universe and Everything. That's a newer text by Cooper and Klimkowski. Excuse Me and these two sort of have a very forward look on how chemistry is going. And so that's why I wanted to highlight them here. But more importantly, I wanted to use those as examples of how our tools, regardless of what textbook you may be using, can complement the textbook in a variety of different ways.
Ah, very neat.
So let's see the. I've taken a snapshot right out of the early pages of the clue General Chemistry textbook. And as it says, it says, you know, we purposely don't cover some rudimentary topics which would presumably be covered in this case in high school, because this textbook is geared for your first year undergraduate. But it's conveniently said, hey, this is what you need to be strong on. And if you're not, then some extra work or prep would be needed to get, for example, up to snuff drawing lewis structures and feeling comfortable doing oxidation numbers, because they will build on that in the textbook. But they're not going to take two chapters to do each of these topics. So that's where they're jumping in. Well, as an example, I built a grid here and I'm going to shrink my text just a little bit to show how we, the tools that we have, particularly those of WolframAlpha, which are both available in the notebook by calling the WolframAlpha function, or if you were using the website, could use the WolframAlpha website to get these same things. But so in the same order, we've got stoichiometry, we've got full support for doing stoichiometric calculations here. We give the amount of silica dioxide and silicon tetrafluoride. So we give the amount of one reactant, the amount of one product and ask it for all the stoichiometric results of theoretical yield and percent yield. And we have step by step explaining all of that.
I can ask, do you have the prompt that you use to generate the materials in the book?
All right, brace yourselves. We're about to peek behind the curtain. So here's the code. So what I've done is I, we have, I made a simple little function called wa just because I was making the same WolframAlpha calls a lot to show only two of the output pods, because WolframAlpha will give you usually more than one output pod with information that may be to be relevant. And so in some cases I only just wanted the input and the results. And in other cases I wanted to make a specialized WolframAlpha call for that particular query. And so what I've. What's done here is I build a grid. And then you can see for stoichiometry, because that's the little label I use that becomes the left column of the grid. And then I have the individual Wolfram alpha calls. So you can go in. And here, for stoichiometry, I literally just said stoichiometry and then passed in how much of each bit that I had. Using their chemical formulas and a reaction arrow. Very cool.
This is another nice thing about using a notebook. So this was in there all the time, even though it didn't look like it, but you had hidden the input cell. And when you're using this to teach, you can do a similar thing, right? Because you don't necessarily want the inputs to be the thing that students are focusing on if the nicely formatted output is where you want their attention. And so, you know, unlike some other thing where you have to maybe have, okay, this is the code that then you run and their attention is all over the place. You can hide that in the format of the notebook so that you're only showing what you want to. But then when the student is really ready to go in and see, okay, how is this done? It's still there.
The other. So two things to build on that one. So if you're not. When I first started using Wolfram notebooks way back, I wasn't. I didn't realize that you could. When you have an input cell and an output cell, if you double click on the output cell, it then hides the. The one underneath it, and that gets to where we were before, you know, back to, you know, the details hidden away. The other thing that can be useful, particularly in a pedagogical sense, if you don't want the students to have access to the code for some reason, or, for example, maybe you're really needing them to be focused on just the graphic or whatever's there. You could cut and paste this output cell into a new notebook, and there wouldn't be anything behind it. It would just be the output there, still visually accessible and all that, but without the code behind it. So you have kind of a couple different layers. You can have the code completely not available, hidden under the graphical output or shown, you know, side by side, depending on what your needs are for the module that you're teaching.
Thanks for mentioning that. I'm very glad that it's here but hidden today so that everyone can see all the details. But I can definitely picture plenty of situations where you'd want to hide that from students or need To I also like hearing what you were saying, that each individual prompt to create these results are very simple, often just using natural language, just speaking in English about what sort of chemistry you want to do. But you've created a code that lets you do multiple ones very quickly in a grid, in a graphically interesting one. And that's where the complication in the code came in.
Exactly. It was just a matter of I didn't want to have to cut and paste the same thing multiple times. And when actually when I was first building this, I did what I was doing the cut and paste to, to set it up. But then I realized that I was making mistakes. And so I built a little function to reduce the amount of typing I was doing. And I think that's not just a computer science trend to be to do things to minimize typing. But chemists are also advocates of minimal typing. One thing before we go through the rest of the grid here, just for those that may not have seen our step by step features before, the stoichiometry does have that support. That's with this button here is saying the other thing is that our stoichiometry code will actually switch things to volumes. So right now we're working in mass. So you could click show volume and go to the volume rather than working in masses. But I wanted to show off the step by step. And so the result goes away. But then it's replaced by a step by step solution. The answer key that one would write to teach someone how to do this sort of calculation. Or if you're having a group of activities that you want the student to practice before they would use the Kluke textbook, you know, maybe as a, you know, first week or summer homework, if you will, then they could use our technology to see if they got it right and then use the step by steps to see how to do it. And so here it restates the problem. And that happens with all the step by steps. We restate what we're trying to do, just to be clear. And then the next thing is you have to write the balanced chemical equation, which, which we do. And if you notice the four in front of the hf, which is hydrogen fluoride, wasn't there initially in the input. It was computed on the fly. And then once you have the balanced chemical equation, it converts everything into moles because these problems require working in that particular unit. And then it starts building a table. And I think I'm just going to hit show all steps so that we. But you can see how the Student could step by step work through seeing the answer key as they're moving through it, or get everything at once as it does all the conversions to moles using the mole ratios and does the math and gets in this case, a percent yield.
Wow.
Even though the main thrust of this part is reminding people that there's functionality that goes along with all these very common textbooks like Clue, you mentioned doing summer homework and things like this. So it's also worth mentioning that there are question notebooks which you can even use to set up some activity that might be one of these summer homeworks or something. But I just wanted to insert that in there since it came up, even though it's not the main thrust of what we're showing at the moment.
That's right. And the other thing is, again, from the educator's point of view, for things that we have step by steps for classes of problems that we support with step by step, you don't have to build your own answer keys. You can let the computer just generate it for you. And that can be a huge time savings if you're doing a summer course or getting your students up to speed. But back to those topics that Clue wanted the students to be comfortable with. You know, energy, frequency and wavelength conversions. We have calculators for that. You can see how that you can fill in the values and change the values and hit compute so that you can use a calculator for that, so that your students could build on the skill doing, you know, focusing on the critical thinking, the chemical critical thinking, rather than doing necessarily all the bits of the math. Same with the mass and energy conversions. We have support for thermochemistry, delta H, the enthalpy of reaction, the Gibbs energy of reaction. And so then we also have support for equilibrium expressions building the. The expression going from the chemical reaction here to the expression that you'll need before you plug in numbers to get your final answer for working the problem. Same with the kinetics, building up the expressions. We have basic electron configurations for atoms and talking about the number of valence electrons, Lewis structures. And then lastly in that list from the Clue textbook was oxidation numbers. And we have both how to count and compute the oxidation numbers, but also showing which is reduced and what the oxidation number changes in a particular chemical reaction. So we have a wide berth of. Of support for nearly everything in the list that Clue provides. And I'll give you an insight. We're working on tackling the rest.
So wonderful.
Thank you for.
Oh, sorry. I was just seeing the oxidation numbers spelled out Right there is very nice because I remember this is an area that students I've worked with have sometimes struggled with.
Yeah. And one of the things we, we added not too long ago was a clarification of exactly which electronegativities we're using for those that are not thinking about electronegativities of the atoms every day there are a couple of different scales, some based on empirical values that were created or then some that were created from experimental data. So we clarified that we use a Pauling scale alpha at the moment, uses the Pauling scale electronegativities. And anytime you get an electronegativity, or excuse me, you get Oxidation states, the results always remind both you and the student what was being used in case your textbook may use a different system or a different system would be appropriate for your particular research project.
I remember that units were a big part of our previous chemistry livestream that we did together. So it's good to see that stuff coming in by default. I also want to thank you for all these examples. It's so nice to see that the step by step sort of materials can really drive home how a human would do this sort of calculation. And in addition to that, we're giving them all sorts of computational tools to say, here are our computer tools that could do this sort of calculation on its own.
Exactly. And one other fun thing that I'd like to point out is that we have full time developers on the chemistry team, but we also have student interns. And so some of the results I didn't show them here, they'll be rolling out for our new chemistry features for back to school in August are support for net ionic, total ionic and spectator ions in those type of reactions. And we have step by steps for that. And we also have step by steps for determining the disassociation reaction for a salt. So. And those four features were built by a student doing intern work with us before he goes off to graduate school. And. And so very, very real. Very. It's a very true statement to say that we are building. We have chemistry students building tools for other chemistry students to better understand the chemistry.
So that's a very powerful technique that's popular now for students to build the curriculum that they're going to be learning from.
Yeah, well, and the other thing is that for those of us that have been in the field for a while, some of this just becomes as common as, you know, tying our shoe or brushing your teeth. You don't really think about it anymore. But someone who's not as far along in their career chemically still will think about it differently. And it's important to have that representative voice in how the answers are written and things like that. So. So yeah, it's good all the way around. Okay. So I wanted to switch from how we could, you know, the tools that we have complementing the topics in the textbook to really getting to the nuts and bolts of what are you going to build, how would you use these templates, what is this going to look like? And things that you might use in your learning space, whether that's a digital learning space like this zoom meeting, or if it was, you know, in person, or if it was in a classroom scenario where you're not in a laboratory or if it's in a laboratory setting. So, not surprisingly, let's push this back up because there's more text now that we're past the alpha examples. So let's start with what a homework activity would look like. Okay. And so we have. There's this class of problems that you can do where you estimate the enthalpy, which is a measure of energy being released in a chemical reaction from the bond energies in the molecules involved in the reaction. And so what I have linked here. And again, the notebook will be available and you can get these links and open these up too. Is a the student version and instructor version for this activity. And I think I have. Yeah, here it is.
Now, are these activities pre written in some big repository or did you write them for this sort of presentation?
Actually, I wrote these for the first iteration of this presentation that we're giving today that I gave at a chemistry educators meeting at Purdue last summer. So this is a growing list, but I didn't have a new one here for today. The last couple of weeks ended up being a little busy on the development side, so. But yes, it is a small collection that is growing and fantastic.
So this is both an example of materials we have on hand and also an example of materials anyone could make for their own.
Correct, correct. And so this is just. I put the notebook in the cloud so that everyone can download it and use it in their classroom if they like or modify it to whatever their needs are. But again, it's sort of. I structured it as many activities that I had seen literature and was using in my own classroom when I was last teaching at the top, obviously the title. And then you have a section talking about the prerequisite concepts. Some communities like to have that in all their documents for both the educator and the student. Maybe if your community doesn't do that you can always just hit delete, but we're going to be thinking about bond energies and this reaction enthalpy. And then you have a learning objective. In this case only one. But depending on the activity, you might have many of those. If you are doing anything online or just, I would argue in general, based on my experiences in my classroom, it's always good to have an academic integrity statement and, you know, have the students, you know, acknowledge that they received it so that they're on the same page as you. Particularly with, you know, digital resources being so prevalent. You know, what they're allowed to do, what they're not allowed to do, who they're supposed to work with, that sort of thing. So this is just one of the blurbs that I used in my activities. Your. Most universities and many other educational institutions have their own version of this that you just cut and paste in. I put it here where it's a text cell that they would just. Well, this is the live version of the web. I'm not logged in. So this is just not editable at the moment. You'd have to download it, but you would type in your name here. I, Jason, read this, whatever, or make.
Your own copy, right?
Yes. So, yes, let me be very clear. So this is the cloud version. If you made your own copy, which will copy into my account now, I can go in and. And start deleting it.
Great.
So that, yeah, that's good to point out for people if you're not familiar with published notebooks. So you can make things locally on your computer if you want to, but then the question is, how are you going to share it? So, you know, the way of doing this in the past would be that you would send people files. Well, now you can also put things in a cloud notebook. And of course, this has been something which has been doable with Wolfram notebooks for a very long time. I would like to think that most people are familiar with hearing things on the cloud nowadays. But just in case this is something that your infrastructure hasn't supported you doing, this is a published notebook which just lives not on any particular local computer that you have. And then your students can access this. They can either download a local copy if you want to, or as Jason just showed, if you click that, make a copy, if you're signed into your account, it will make a copy to your cloud account.
Nicest thing about that being, although it is fantastic to be able to work collaboratively on something when you're dealing with code, the last thing you want is some Person deleting a single letter somewhere and then nobody's copy of it works. So everyone is editing their own individual copy. No edits that someone else does will, will affect the original.
And the nice thing about having it deployed in the cloud, that everybody can then just link to and either download their own copy or as I just did, copy it into their account. You keep your email server thinner because you don't have these, these notebook files being sent out to the students and then 30 of them being sent back and then you sending out 15 more for corrections. You, everybody can just publish it to the web and if you need to comment on it, you can. Or if you just need to visually grade it and then enter the results into some learning management system, you don't have to fill up your inbox, which can be handy. Very cool.
Well, I'm dying to see the actual examples.
And yeah, so the activity is that. Oh, this is the wrong one, sorry. Nope. Where'd it go? Too many windows. There's a fresh copy. So in this case, this is built in using a Wolfram alpha mode notebook. So it has the natural language input. But because at least of the activities that I had, this was going to be the first time they were going to be using certain queries to get information out. So I have an example at the top of, you know, if you want to get a bond enthalpy, here's how you get it. So here I have a carbon fluorine bond energy and it comes back with a value, but this is the syntax for the query. So here we're teaching the student how to use a tool that you want them to do something more complicated with later. And then just again showing some math in case again the student was new. That's what this activity was built for. Someone who had not used the technology before. And then here's what the activity would look like. The statement of what you want to do. And then I've pre populated again using that notion of a template so that they're not, they're kind of reigned in and have the, the scaffolding to keep them moving in the right direction. You know, they balance the equation, draw the Lewis structures and do the different steps. Now if this was an upper level, if I was working with a junior or senior class, I wouldn't necessarily have all these spots. I would have the prompt and maybe some boxes and maybe not have the gray text here to step them through the bits. But this activity was designed with a different student background in mind and you could obviously change it to as you.
Need and worth pointing out, you can hide not just code from input and output, but you could maybe have this as like, if you need hints, open this section, right? And then for those advanced students. So like there, there's the ability to have the introductory, advanced or anywhere in between based off of what you're hiding and showing.
Correct? Correct. So that's the student version. The instructor version, not surprisingly, is the same document but with all of the answers put in. And so, at least where I was teaching, you would sometimes be team teaching with other people. You may not be the only grader. Maybe you have TAs at your institution, but this allows you to have. You can have an answer key that can be graded and utilized. Or if your students are doing group work, they could check their work once they do it against this, which could also be in the cloud, and you wouldn't have to shuffle paperwork around from the group tables as they're working in the learning space. So. So that's an example of a homework. Now, a course module is a bigger topic. So here we're going to dive deeper into a particular topic. And this one is atomic electron representations. So how do we keep track of the electrons in an atom and the ways that we represent it? So again, this has a usual, shall we say, administrative things up top. This one, because it's a course module, connects back to requirements of education in the field of chemistry set out by the American Chemical Society and professional training. So if you're an accredited institution or your program is accredited, or you're building modules for accreditation, you often need to have these in there. So again, I listed that as an example for when folks are building these things. And then here we jump right into the activity because the assumption was the students have used the WolframAlpha Notebook Edition before, but here it's walking them through. Let's. Let's think about how we can. I've got a typo that I gotta get rid of that capital E. Let's see how we can think about the information that's in the periodic table. And they go up and look symbols, they look at the periodic table, do a prediction by checking their answer, and so on and so forth, working down through different ways that we communicate this information. And then here in the notebook, they have a manipulative which is from one of our demonstrations in the Wolfram Demonstrations project. And here's a nice example of how you can build an activity on top of those resources. Noah, you were going to say something?
Oh, I just always love seeing stuff from the Wolfram demonstrations project. Occasionally these are things that are made by people internal to Wolfram, but usually it's people in the community having created a tool that's been useful to them in their job or studies. And I just always love seeing what people are making for these sorts of purposes.
Yeah, it is pretty cool. So let me, let's go look at the actual instructor version because then we don't have to think about the answers. So at the top you just say I need periodic table. You get that. Then the student is going and looking up at the atomic symbol and the number of electrons and getting the answers back. And again the Wolfram alpha notebook mode then gives the, you know, the language input. And if you didn't want to show that, you could hide that. But I, I did want to show it. Then they were looking up where in the periodic table it is. And then they were looking at the electron configuration. So here's a text way of representing the electrons in the atom. And then we were looking at the full and short electron configuration. So two different text versions and then a pictorial version to see how this information is crammed down into a picture. And then asking them questions to think about that which would be useful, which would be better in different cases because in chemistry we have lots of different ways of representing the same information. And depending on what you're trying to do, you might, one might be more appropriate than the other. Here's another case where we have them do the, they pull up the step by steps to answer a question. And then here for some reason the, the bit of code from the demonstration didn't load for some reason. But here they would manipulate work within a manipulative, but for some reason it didn't load on the cloud anyways. So that's a bigger activity that might be set as you know, not just simply a homework thing. It might be an in class activity or group work activity. And you can see you just keep building it. In this case, five different steps that are non trivial as compared to maybe a few steps that are a little bit simpler as was in the homework. And lastly, the example that I'd like to show is for titration analysis of vinegar. So vinegar is an acid and titration is when you add a base to an acid to neutralize the solution. And so this is an example of what a notebook. Now I, for those of you that are regularly doing experiments with students in the laboratory, you would know that there's a whole lot of text input describing which glassware to get what solutions to make or go get from the front bench, things like that. I have omitted that from this document just to focus on how we would possibly view an example of how to do the data analysis. You could imagine that you would have two notebooks, one that has all the explanatory stuff and all the pictures and step by steps of doing the actual wet chemistry. And then a notebook that maybe would be returned to you with the data that they've collected in it. You wouldn't necessarily need to get all the instructions back because that would make the notebook file a bit bigger. And again back to trading files back and forth of her email.
And you can of course link them together if they're living on the cloud.
Exactly, exactly. So data collection here we're just putting in what the the base molarity for a particular solution that they used to do a dilution of. And here we're walking the students how to carry around significant digits using the set precision input. And then again we put in some other information from the different trials that they do, however many milliliters of the base solution that they use. And then this particular experiment we require using a long piece of glassware called a burette. And so you have the starting and final measurements. They put that in. And so now they've got all their data that they collected in the laboratory, but now they've got to analyze it. And here, since we've in the wolframalpham notebook mode, we've set variables, Buret initial, burette final. Now in the data analysis, they can just access those variables and do final minus initial and get the amount of base solution that they added to their, their vinegar that they were neutralizing. And again you could keep going on building up the calculations and notice that it's keeping the units around, so it's doing the quantitative calculus along the way for them and keeping track of the sig figs as well. Here the rest of the experiment, they, they calculate the acid molarity in their samples and then they do some averages and they used the density to figure out how many, what the mass percentage is. And that was what they, in this particular activity, they were trying to confirm the mass percent of acetic acid compared to the stock solution that they got or sample from off the shelf.
And for people who are curious, the set precision is something because that works how one would assume it would work with chemistry and significant figures that context, by default it's using something which is a little bit more familiar to computer science. Is there a clarification we can make There for people who are not familiar with the distinction between those two.
No, I'm glad you brought that up. Thank you for reminding me. So when you make a measurement in the laboratory, the number of digits that you can get in the measurement depends on either the machine or, or the markings on the glassware. So, for example, this density is only known to three digits. 8, 5 and 7, or 0.857. Well, the 0 is a placeholder and not important, but the three digits to the right are important. So when we do calculations with this particular density, we can't create more digits of accuracy on by simply multiplying this by say 20 or 30 or something. We, we have to maintain that it's only got three because the initial measurement was three. If you didn't set the precision, then this would be a machine precision number, which is a computer representation of a number, and it would carry out and compute the numbers beyond seven. It would, you know, it would count 4, 5, 6, 7, 10 decimals actually out to 16 to the right of the decimal, which numerically may exist, but physically don't have any meaning. And so that's where this tag of setting the precision says you may be able to compute the rest of them when you're doing them, when you're doing the math on the computer hardware. But in the end, we got to keep track of how many are actually physically meaningful. In this case, three here, this one is also three. If we scroll back up.
Small point of confusion here then since the significant number of digits that you're giving it is three, why does the answer it produced like 1.0053 have four digits after the decimal point?
Yes, that is the default for the display in the front end. So the notebook display, the front end of Wolfram Desktop is showing extra digits even though it knows that there's only three that are significant. Gotcha. Okay, other questions.
See if we have any in chat here. Remember that if you do have questions, feel free to put them in. Looks like no other questions at this particular topic at the moment.
Great. So that was an example of doing data analysis in a Wolfram alpha mode notebook here. If you're working with upper level students that may be working that may be comfortable doing actual coding without doing the natural language input in between them and the code you. I wanted to take a moment to show doing some data analysis in that situation. And so I've got data from a particular rotational vibrational spectrum experiment for hydrogen chloride and deuterium chloride. This is an experiment that's classically done In P Chem Lab, the proverbial hunk. If you've passed P Chem bumper stickers, if you've ever seen those, this is an activity that you would do in P Chem Lab. And so you measure the infrared spectrum of these two molecules in their gas phase. And from the data you can see that you can back out the rotational and vibrational transitions going on in the molecule, and that leads to a particular signature in the spectra. So I had data from Golly, back in 2011 when I ran this experiment and collected the IR spectrum for HCL and DCL. But I had it as an Excel file, just a pairs of numbers. And I had stored that up in a cloud object. So you guys can. Once you get the notebook, you can get access to the data. It's right here at this address.
But it is worth noting, if you have data that you're taking in the lab and you want to make it available as a cloud object, this is something that you can do in your classroom as well. So handy trick both for, you know, showing some, some old data that was taken and then can be reused, but also something that you might want to do when you're thinking about how to use tools like this in the classroom.
Well, what's even more fun is that, say, for example, you're in your instrument lab, doesn't have a particular instrument, and you possibly go over to the neighboring university or have a friend, you know, a couple states away run the experiment for you. You can then take the data, put it into a cloud object, and have your students work up the data, even though they didn't physically collect, collect data on that particular instrument that may not be at your institution. Or you could imagine if it's doing radiochemistry where there's radioactivity involved, you wouldn't necessarily want to take students into the lab at an undergraduate level to do that sort of experiment, but they can get all the experience of doing the data manipulations and extracting the chemical information out of it, even though they didn't walk up to the machine and stick the sample in.
And if you're in a place where you have the freedom to have like a very student driven curriculum, you can also use this as a great opportunity to have students plan how they're going to divide up different experiments and then share the data to learn some of those collaborative skills that are increasingly important in science, but are in many ways not part of the sort of textbook knowledge that you might think of from your classes. But you can incorporate that by having the Ability to share things and have someone who didn't take that data use that data to be able to have a combined research project.
There really is no reason to be carrying thumb drives anymore as long as you have an Internet connection in your laboratory. Now, there may be cases where you don't forget one reason or another, but as long as the Internet's there, you can push your data up and share it out without having to thumb drive it around to everybody's laptop.
What have you actually done with this data?
Okay, so what I did is I imported it. That's this bit that's highlighted. It came in as a nested list. So that's why I used first to grab the first thing in the list, which is the data that I wanted, and then rest chops off the first entry because it turned out the first entry was the label on the first row in Excel. Oh, right. And so this is easier to see if we paste this and say, Import this into a data set. And now you can see the, if you will, the Excel grid. And that first bit of data is this tag, which evidently I had put into that first cell saying data or the machine did when it exported it out from the native instrument software.
Gotcha.
Good question. I do that twice because I have one for hydrogen chloride and one for deuterium chloride. Then I have the data. Then the next thing you want to do is reproduce the spectrum so that you can then do the analysis. I use the function list line plot because I have two lists of data, XY data, and I want it to plot from 1800 wave numbers to 3200 wave numbers. And that's the, the range on the X. And then the Y values are allowed to be whatever they are. And then I added a little legend so I could keep track of which one is which. The first one was hcl and the second one was dcl. What we see, I'm going to drag this and make it bigger. The rotational vibrational bit that we're after is these individual little peaks that are very close together in sort of a bell shape, inverted bell shape. That's what we're measuring. Each of these different transitions corresponds to different rotational states inside a vibrational state of the molecule. And I'll stop there because to explain it more, it's a lot of spectroscopy. And we, we, we don't need to focus too much on that.
The other thing that might be worth pointing out, though, is that you just resized an image in your notebook. So something that I didn't realize when I was Starting when you resize an image like this and then you save your notebook, the notebook will remember how big you resized it to. So you don't necessarily have to get really down into the weeds of how many pixels do I want this image to be? Right, you can create the plot because you can get down into the weeds of how many image you want your, how many pixels you want your image to be. But that's not necessary. You can create it, make it the size that you want it to be. Save your notebook and it will stay that size.
Well, and the other thing that is very handy here, if you wanted. You notice that we have some of the peaks overlap between the two different spectra. And so if we wanted to move one of those, we can just very easily shift everything up by 100. Now they're separated apart, which might be easier to, to digest visually. And you can see how this center peak, the center dip has moved same. And then there's a whole set of peaks here that are missing in the HCL that exist in the dcl.
So I'm now really interested to see a feature space plot of like seven of these. So if you're building curricula, please let us know when you do seven different of these gases and then do feature space plot. What does that look like?
There you go.
Thank you so much for choosing this as an example, by the way, although a lot of the specific chemistry terms that you're using are ones that are Greek to me, I love how this data is something that's very quickly identifiable as something where something's going on, where the blue line and the orange line are sometimes very related and at lower values of this X value, very unrelated. And it just is the sort of data that immediately answers and asks questions on its own. And that's such a great thing for students to get their hands on to be able to explore the sort of properties that we're dealing with. So thank you for that.
You're welcome. You're welcome. The other thing that I like about it is that it was three lines of text. One, two, three. And I've got a publication level graphic that I'm ready to go. So it's much easier than other pieces of software that one could use to do this stuff. So.
And another thing that is also nice if you're wanting to restyle something for black and white publication, let's say there's a, I believe it's called monochrome as a, as a plot theme that you can use and that will, you know, take what would Be rendered in nice, you know, color graphics. If you're looking at it on a computer screen and turn it into, you know, instead of being blue and orange, it'll be dotted line compared to, you know, a slightly different pattern of line. And then you don't need the color display in order to be able to parse what's going on.
Yeah. So I don't know if my. Do these different boxes where my cursor is moving show up?
Yep. So monochrome.
So monochrome though. And then we just evaluate it. Now it's put in.
Because of it.
Being monochrome over each other.
I'd have trouble figuring out which is which.
In this particular example, it's because I gave a plot legend, so it needed to differentiate between the stars and the dots. So. But anyways, the notion of the coloring system is clearly laid out. If we only had one piece of data, it would be a slightly cleaner plot. Yeah.
And those themes are for someone who doesn't really want to get down into the weeds of setting those individual settings. But you could turn those off with the individual markers and do all sorts of extra options to make it look however you want. But yep. Just wanted to point out the themes is something that's.
I'm curious, can we see this new monochrome version without the plus 100?
Oh yeah. Oh well, that, that might be rather ugly. Let's see.
Right. I was thinking probably.
Yeah. It's not this. And this also sets itself up when you're. When new students are working with large data sets like this, it may not be intuitive to them that this is a really poor way of representing this. Yeah. And so having them do this exercise of show like okay, the. The author chose to do it this way. Is this the best representation what's wrong, what should be fixed? You can, you can again very quickly create an environment where you can dig deep into the good scientific practice. Not even just chemistry, but just data presentation period with very little effort. And then play around with the different plot themes or as John was saying, go in and actually start changing the colorings and what symbols are used for.
But you might be surprised by the answers you get to that. You might have some students in a class, and I'm saying this as a positive, who's saying, well, this method is much better than the original colored method. With that one you sometimes couldn't tell if the two shapes were exactly on top of each other, whether or not they were agreeing or just missing. And in this situation you can look close and see the filled in ovals. And the, and the empty triangles. And so this is a superior method for this. And I just love the conversations that can come up.
Yeah.
And I mean, I agree this is not the way I would.
Oh, sure, you're right. The conversations are what are more important. And getting, getting to those conversations can be difficult. If you're back in the days before quick plotting programs, long before mathematica, you know, 40 years ago, it, you know, you couldn't even have these conversations quickly because there's only one. You, you hit print on the printer next to the, the machine, you got your data and off you. That's what you had to deal with. Right. So. So you really can have come quite a long way and can have some really interesting conversations very quickly.
All right.
Before we run out of time. It's right. So manipulatives. I, I showed you that thing that I had cut and pasted from a demonstration that was up in the atomic electron configuration activity. I'd like to show some more of those and give a quick little tutorial on how one can build them because those can often become a real core component, as Noah was saying. And you know, commenting about, about your activity. You know, those collections of the demonstrations can really help students interrogate an activity. So one I'd like to show off also going along with a spectroscopy idea. This is a Beer's Law experiment and this was from the Compute to Learn team. But and I've the link here from the Lafayette College chemistry students will take you to the demonstrations page. So here's an example of where I cut and pasted the code or cut and paste to the output cell rather than the code. So this is what it looks like when you have a demonstration without any code. This was what we talked about when we started. But this is a, an activity where you can play with the different components of the measurement. So you have a concentration that you're working at and then you choose where to make your measurement. That's where this line is. For those that haven't done this experiment, you want to take measurements at the peak rather than the trough or somewhere along the side. And so you would adjust there. So now I'm at a peak here. And then this is the fit of the data from the different concentrations that you would get. But again, this is completely interactive and can be used to simulate data before they even come to the laboratory. So they could do a pre lab activity playing with this to get a feel for what they're doing without ever having to walk into the laboratory and get glassware. Dirty or have safety equipment and all that can really do some interesting pre work so that when they are in lab, it goes smoothly and quickly.
I like that. This answers the question of, oh, why does it matter where I measure in the peak of the trough before they actually go and go through the hassle of getting everything so that it needs to be cleaned.
Right. Another one that I threw together is exploring a potential energy surface. So this notion of when you have a bond between two atoms, there's an energy that corresponds to that. So if you smush the atoms together and make the, the bond shorter there, that's higher energy. And if you pull it apart, it gives lower energy and there's some magical bond length where the energy is balanced and you get what the, the ground state bond length. And so here we have a, an interactive where you can choose your diatomic. It's set to H2 by default. And I can change the step size. And what we're doing is we're actually doing a quantum calculation underneath to figure out the data points that are then being plotted. So if I wanted to see, you know, more data along, I could do the calculation multiple times and get all these data points. Or maybe I only need a few. If we change the molecule to say hydrogen iodide, now we haven't found the bottom yet, so then we need to change the max bond length value and scale. Our plot to see the minimum here is at, well, roughly maybe 1.75, whereas for H2 it was smaller. And so the student can interactively explore this quantum mechanical technique that has a directory result in the bond lengths that you can go measure in the laboratory.
Out of curiosity, I see that there's an input in that. Would this be one when you were teaching that you would leave in the notebook so that people can look at, or would you, if you're sending this to students, remove it? What do you think would be for this one?
If I, if I was working with the first years, I'd probably remove the code here. I left it so that folks at home can play with it. See what I did, you know, add, subtract, you know, use it as an example. But if I was working with first years, no, it would probably be code hidden away. And then at least in most curricula for college, you're not really getting into a lot of coding. Advanced excel work, sort of, you know, a big data analysis until you get to analytical chemistry, which is often sophomore year or junior year. So at least in the program that I was working in, this sort of stuff would be hidden away until at least your second year.
So different sort of presentations for different audiences.
Exactly. But the neat thing is that you're solving Schrodinger's equation, which is a concept that you need to see all, you know, as early as possibly high school. And here you can solve Schrodinger's equation without doing all the matrix algebra. And you just work on the visual output of it. So you can again, setting yourself up for really good conversations. And the last one, just to give some breadth of what these sort of interactive things could be. Spectroscopy to quantum chemistry to synthetic chemistry. Here's one where we're exploring the reaction of adding hydrohalogen across a double bond. So here we have a double bond between two carbon atoms. There's two of them in this particular molecule. And if you react it with hydrogen iodide, you can add hydrogen and iodine across the double bond, making a new molecule. And so with the interactive, we can show explicitly that we're reacting one molecule of hi in each of these reaction paths. And then we. We have four different products. If we do the reaction once, we can see what those things look like. But what's also nifty is that we can run the reaction a second time. And these structures are being computed on the fly. These are not like preloaded in some lookup table. This is actually running a calculation to generate these live. And now we can see the other products that are available too. If the reaction runs twice and reacts with all of the double bonds to make new molecules, I'm really excited to.
See how this one is done for the input parts. There's a lot of really cool stuff going on here.
Yeah, this one is. I'm not going to scare you one by showing the code. It's pretty hefty, but it, yeah, it's pretty powerful. And again, I left the code in here so you can see and cut and paste as much as you can. Don't try and start from scratch on that one. But the example that I have just to show, while that last one was pretty complex, it's pretty straightforward to get going with these. And so here, for the example, I wanted to show how we could have an interactive manipulate where you plot a molecule and then you talk about the functional groups, which are different chemical malaides that might be available in the molecule. And so we define a group of functional groups here. I chose hydroxyl, which is an OH bond bound to something else in the molecule, a carbonyl, which is a carbon, and a double bond to the Oxygen, and then that is somewhere else in the molecule. A thiol, an amino, a cot voxyl and a phosphate. These are different groups of atoms that form functional groups, small chunks of repeating units that can be in different molecules. And when you're learning about these things at the end of your first semester of chemistry and into organic chemistry, you need to be able to recognize them when you're looking at a new molecule.
A quick question. What are the numbers after the bond function?
Yeah, I'm glad you asked. Yeah. So a molecule pattern is just that, it's a pattern of a molecule. It's not a full molecule. It's like a chunk of a molecule or a fragment of a molecule. Okay. And so here, where if you were to define a molecule of water, you would have three atoms and then you would have the two bonds. Here we have a functional group which is just half of a water molecule, an OH bond. So we have atom one is this oxygen, atom two is this hydrogen. And then over here in the bond list, we say there's a bond between Atom 1 and 2. And it's implied that it's single otherwise. Or you could actually explicitly type it, but if you leave it off, it's just assumed to be single. So again, case where you can get to be a little lazy and not have to type everything.
Very cool.
And then in the next case, we've got again, two atoms, but this is a CO group, a carbonyl group. So there's a double bond. And here it's atoms one and two. And we're defining a double bond.
And one and two is just by the order they're mentioned in this piece of code.
Yeah, it's just the index in this list that precedes it. So.
What I think is neat about, like, this molecule functionality is that it's very similar in syntax to functionality that people use to work with graphs. So if you're a chemist who's interested in molecules, there's a lot of really interesting graph theory stuff that can be used when you're looking around these molecules and wanting to model them and stuff like that. So it's a fascinating little tidbit.
Exactly. And the other thing that we do is that the representation in the notebooks, once you evaluate these patterns is pictorial because this is much easier to see that you have a. Oh, and a hydrogen with just one bond between it, rather than looking and seeing, you know, thinking about that from just the code, the picture can be very helpful. So, and then the manipulate to create is just the manipulate function which is behind all the things that we saw up above, all of these are manipulates. And the first argument is what we're going to manipulate and that is the 3D plot of a molecule. Here I chose adenosine triphosphate and I put that in by. I can show here, just doing control equals to get the input cell and then ATP, which is an abbreviation for adenosine triphosphate that the system knows about. And I said the second argument to hit enter and I hit enter. Yes, that's correct, that's correct. And so if we want to highlight something in the molecule plot, you just pass a molecule pattern or a list of atoms. If you just want to highlight a particular atom as a second argument. So here we're, we've got our patterns stored in this association. So we, we define this variable selected group and we say selected group can be the keys which are the left hand sides of these rules from the functional groups association. And when we evaluate this we get what's shown below. We get the molecule that's rotatable, that's ATP and we get the selected groups. And then we get a drop down list that says the different groups that we defined to scroll up. We've got 1, 2, 3, 4, 5, 6 of them. And we have six of them down here. And then if you choose one, say phosphate, notice the highlighting changes in the molecule. So there's 1, 2, 3 phosphate groups that you can rotate and look at. And so this was, you know, just with a few lines of code we've now allowed the student to look for carboxyl groups which there aren't any but we can look for hydroxyl, the oh groups and there's quite a few of those. But again the manipulates inside of Wolfram language are really kind of straightforward and to get going and get this is a pretty powerful interface with just not much work.
Very cool. I love the geometric manipulates that you can do the things similar to what the previous example was. Showing data on a curve that you can change by the sliders that around those are fantastic. But it's really worth remembering that a manipulate is designed to be something where you can just have multiple different results based on simple graphical inputs of all sorts. Not just sliders but also click down lists. Lists defined in whatever chemical or physical terms you want to give to it. Like in this situation where the functional groups code was one you created for this example. I love how you can go as deep or as shallowly into this as you want.
Something I've learned from some of our colleagues at Wolfram you, which is a handy tip for people. So if you know how the syntax for a function like table works, because you want to make a list of things, then you already know how the syntax for manipulate works, essentially because it uses the same syntax. So that once you've learned one thing, you don't have to relearn everything, just use a different function.
Right.
Something I like about just the software in general. Like, it's always been annoying to me how so many different fields use the same notation to mean different things. You know, like, of course we're all going to have little specific things that we disagree in notation on. That's inevitable. But people using the same notation to mean wildly different things has always been a little frustrating for me because I'm having to unlearn and then relearn materials. And just knowing here, like John was just mentioning, that the syntax for bonds between individual elements is designed to be something that's easily usable. Whether we're talking about chemistry or graph theory or anything else. It's all designed with all the possible uses of it in mind. So there's finally notation that actually applies to all of the fields you could use it in. I just like that.
It's cool stuff. Well, that was all I had. At the bottom of the notebook, there's some links to go dig and explore more. Our chemistry core area website, our online dilution calculator, which is our growing collection, the first of our growing collection of chemistry solver websites. We have a book for chemistry students to get going so you don't have to. There is a book that you and your students can use to get up to speed of using the tools in the Wolfram language for chemistry. And then our broader chemical resources page, which is a curated list of all things chemistry by the chemistry team. So for chemical educators and researchers alike.
Thank you so much for all of this. We're almost 15 minutes over time, so thank you for going above and beyond. Just want to check and see if there were any last minute questions in coming in from viewers.
Well, Noah's checking. So when I see a nice data set like you have there for analysis, I'm immediately wondering like, oh, can I have students look for how would I fit multiple normal distributions to this to find where the peaks and things are? Can you just speak a little bit to the step that you would do after that in that particular lab? Since you only got to see the visualization part of it, what other would you do? Just at the level of words, since we're almost out of time.
For finding peaks. I think we have a fine peak function. Or you could numerically do it by looking at the differences between each of the data points. I think it's another quick way of doing it.
As long as those data differences keep being positive, you know, you haven't reached the peak yet and when they.
Correct, correct. But I have a sneaky suspicion that there's a function already for this in either the language or in the Wolfram function repository. I'm just blanking on the name.
There's one that I like for statistical things called Find distribution. So this would be a discrete version of that.
Gotcha. Well, we'll have to maybe explore that somewhere down the line.
Definitely. Definitely. Looking forward to the next points of exploration we can do. Jason, thank you so much for being with us today. Everyone who's viewing us now, thank you so much for viewing us live. Everyone who's viewing us later, thanks for visiting later and hope this has been useful. Looks like we don't have any other questions that we haven't answered coming in, so once again, to everyone involved, thank you for coming.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






