Chemistry Education with the Academic Outreach Team

Livestream demonstration (Mar 27, 2023) led by Jason Sonnenberg showing WolframAlpha Notebook Edition features for chemistry education. Coverage includes 2D and 3D molecule visualization (MoleculePlot, MoleculePlot3D, entity images, Lewis structures), interactive molecule drawing and recognition (MoleculeDraw, MoleculeRecognize, MoleculeName), unit and chemical conversions with uncertainty propagation (UnitConvert, ChemicalConvert, Around), reaction balancing (including molecular and ionic/net ionic forms) and pedagogical uses (step-by-step, plan step, plot themes, teaching activities). The transcript notes ~44,000 curated molecules in the Wolfram knowledge base and mentions resources and example notebooks for chemistry curricular topics.
Questions this video answers
March 27, 2023
Jason Sonnenberg
Roughly 44,000 molecules
Chapters
Hello, everyone. Welcome to another outreach livestream. We are joined today by Jason Sonnenberg, who is our lead chemistry developer for chemistry education, and he's going to tell you about some things that we can do related to chemistry in WolframAlpha mode notebooks. This is a topic which is really great if you're an educator, if you're a student looking for some ways to supplement the usual channels that you're intaking and engaging with chemistry, these are going to be some great tools that you can use to either learn, teach, or some hybrid of the two. So, Jason, welcome.
Thanks. Glad to be here. So, let's talk a little bit about chemistry in WolframAlpha Notebook. I thought we would start today by focusing on visualization. So this is the classic chemistry hurdle. Regardless of where you get started in the curriculum, whether it's grade school, all the way up to graduate school, visualizing molecules is tricky because they're so small. So we've got tools in the language and in the notebooks to do that. So let me show you a few examples. We'll start with the two dimensional, if you will, flat input. And here I'm going to use the example of allicin. It's a molecule contained in garlic. You might have heard of it before. And so I was curious, you know, what was the structure of allicin? So I ran that, and as you can see, what we get back is the Wolfram language version of that. So in the Wolfram language, we have a molecule family of functions. So here's the molecule plot function, which gives us 2D pictures. And. And then Allison is a entity in our entity system. And so we have a molecule plot and we get the two dimensional structure of the molecule. And just a little bit of an overview for those that might not have taken chemistry in a while or haven't looked at these in a while. Each of the atomic elements in a 2D plot is shown by its atomic symbol. And with carbon being an exception. So carbons are shown as these vertices of the edges in the plot. And the carbon isn't written because they're implied. And the. That's an organic chemistry standard. But. But we follow it here. And then we also indicate double bonds by two bars rather than just one. This would be a single bond between the sulfur and carbon. And here's a double bond between oxygen and sulfur. So just a quick refresher for those that. That might not have been doing chemistry for a while or haven't looked at these sort of structures.
Thank you for that.
Anytime.
Okay. So another thing that I'm curious about that we might get into later is some of the 3D visualization capabilities. But I don't want to break your flow, so.
Yeah, that's fine.
Yeah. So let's say that I wanted to get a 3D image of Allison right there. How would we do that?
So you would just type 3D image or of Allison, and that should do it.
Actually. That's really cool.
So here it's pulling the 3D image from the entity system and it's got it. So we can set them side by side. I was just gonna say we can set them side by side. And it's really rather nifty. The other thing. So this is a static picture. It's not rotatable. We can go in here and if I can spell. Adjust the input cell a bit and use the full Wolfram language function and then we get the rotatable version.
Oh, that's a nice trick. I didn't realize that myself. So. Yeah. So, audience members, if you're curious about the distinction there, if you use the function molecule plot 3D, the output output is rotatable. But if you ask for the entity property of a chemical, that, if I'm understanding correctly, it's just going to be a still image.
Correct.
Okay, I didn't. Okay, so I didn't realize the distinction between that. So that's good to know.
Yeah, just a little bit of history. The entity, chemical entity system has been around longer and so when they were stored and built, it was static images. And then the molecule plot 3D and it's brethren molecule plot allow more flexibility because they're full fledged graphic objects.
I see. Good to know. And so I love this as like a teaching aid because you can actually see in the difference between these plots, the implicit hydrogens. That's the convention in organic chemistry compared to the actual atoms that are gonna be part of this molecule. So that. That's really fantastic. Yeah.
And you can also have that conversation if we. Let's do this. Now you can have the conversation of when you're putting together representations of molecules for like, you know, a PowerPoint presentation or scientific presentation or a poster or something. You know, is this the right orientation or should this, you know, whoever put it together, should they have rotated it and maybe have the molecule look like that, where we're hiding the oxygen or whatnot. So you can also have nice conversations about presentation and scientific communication just here with, you know, the 2D pictures.
That's a great point.
There's certainly love the combination.
I personally Love the combination of them.
You get all the labels, you get the.
That you get all the label. Simple information of the 2D plot, but then with the 3D, various colors mean. Because of the 2D information. Very cool. Oh, for all of the people who are viewing, if we ever go through a prompt especially quickly, just too quickly for you to type along, know that this, This notebook is going to be uploaded after we're done with this. So you will get a chance to view everything.
Yeah, definitely.
At your own pace.
So the, the other fun thing is that we have Lewis dot structures. Now, this doesn't go through the molecule plot function. These are stored in the entity system. But you can just ask for the Lewis dot structure of. Of your molecule in this case, Allison. And then we get the. The classic structure. Now, notice the difference between what we had if I scroll back up here versus the Lewis dot structure. It's a lot of the same information, but now we have these pairs of dots indicating the lone pairs on the sulfur, which is additional information that wasn't in. That's traditionally not kept in the 2D plot of a molecule. And that's not just a Wolfram convention, that's just a chemistry convention. The other thing that's pretty nifty is you'll notice we have the step by step solution button.
Those are electron pairs.
Those are electron pairs. That's correct. And so if we click on that, it opens up a new input cell. And then we can go through the step by re. Excuse me, the step by step results for building this Lewis structure for the molecule of allosine. And so you could go one step at a time, but in the interest, I'm going to have it show all of us, all of them. And so we start off with a restatement of the problem, in this case, drawing the Lewis dot structure. And then we draw out the skeleton structure. And notice again here we've just connected all of the atoms with a single bond. And then we work through the math here of counting the total valence electrons. And we're kind of explicit using, you know, these number of electrons. And then we figure out how much we need to fill the octets. And then we do the math and start figuring out where to place the electrons. And then we get down to the final structure. I won't read this to you because you guys can read it as well as I could narrate it.
So I have a question about this. So I really like to use the show steps as a way for students to see how much they can Remember before needing the next step and then using that sort of metacognitive check to say, wait, what was the next part? And then they can sort of go back and forth with themselves and see. Did you have any particular tips and tricks that you like to use as an experienced educator when you were having students use these sorts of computational tools to aid their learning?
No, I would actually, I would use the same tools that you did of having them go step by step to. I think we should be able to get start over, you know, go through the exercise of okay, I know I need to do this. What do I think is the first thing I should do? Maybe say that out loud in a classroom environment or working in pairs or teams or you know, if it's just themselves before the, you know, reviewing and then see if that's, you know, if their plan of attack actually followed the plan of attack that we've implemented here. And just a side note, when we implement the step by steps, in many cases you could do the Lewis stat structure from a couple different building up methods, right? If you look at different textbooks, you'll see different ways of teaching the steps, right? And there's no hardcore this is the best way. But what we've always taken when we implement this is we try and take the method which is the most concise, leading to the least number of steps. So what you might use in your classroom if you're an educator, or what you might have been taught if you're a student may differ a little bit. But our metric for which way should we code up has usually been the one that generates the least amount of steps. And that's not to say that it's the perfect way to go. It's just the one that has the least amount of steps because then that's less to have stuck in your head for how to do it.
It can also be an interesting exercise for students to understand that there's multiple algorithms to achieve the same outcome and think about in a given context which one is actually the most efficient for.
Yeah, absolutely. As, as we'll get to see in the some of the other examples I have, Chemistry does have a lot of algebra in it. And any math instructor would tell you that that algebra, there's lots of paths from start to finish. And it doesn't make one of the paths better or worse than the other. It just means that you do you have different routes to solution. And again we try and choose the most the, the one that, that generates the least amount of steps. But that's just because we chose that metric of how to design the stuff. It doesn't mean that it's the only way to do it.
Well, that's great. Thank you for diverting with me into the pedagogical applications real quick. But. Oh no, of course, 3D seems really exciting here. So let. Let's maybe get into 3D. Yeah.
So 3D, like I said. So I did just 3D image. You can see that we have a variety of different ways of saying it here. I said display the 3D molecule plot and you know, the, the system knows that. Again, we wanted a 3D plot. And as I said, it's fully rotatable, which is particularly useful. I know historically 3D structure like this would be taught especially in an organic chemistry class. You might use Molly Mod molecule sets or ball and stick sets or Styrofoam and the whole. Anything that you can to. To build this in 3D. If you don't have those tools available to you or you know, as we were in the pandemic, can't send them home with your. Your students. Here's a nice way for also getting at that. That 3D interactivity with. Without having to send Molly Mod kits home. So.
I don't know as much about the chemistry inventions as I might. So these color cod, Sulfur and carbon being dark grit, something that people familiar with these things would rec.
It is actually.
Or is that our own convention?
No, no, no. We, we. We try and follow the, the standard, the historic standards. In this case, unfortunately, IUPAC hasn't, which is the International Union of Pure and Applied Chemistry. They haven't made a ruling for colors for depiction cases, but historically there's. I believe it's the. Oh, bother, I don't remember the name. But anyways, certain, certain atoms, or I should say specific elements have been colored in a traditional way. So carbon often gets gray or black. Hydrogens are white. Sulfurs are almost always yellow. Oxygen is always red. Nitrogen tends to be blue. So there are some commonalities there. You. Doesn't take you much work to search the web or pick up different textbooks to see some variations in that because some of the color schemes aren't always very colorblind friendly. So there have been various permutations on that. In fact, we're kind of thinking about that ourselves. But yeah, so right now we use the historic colors that actually, I believe they trace back to the original crystallography sets or those ball and stick sets from years ago predating all of us here on the stream.
I did not know that bit of History. That's really interesting. And I know that if you're adjusting options of some of these functions, you can definitely change the colors yourselves. Is there a way that surface to do that in this mode of Notebook, or is that something that is more easily done through adjusting options?
It's more through adjusting options to molecule plot 3D. Let me double check here. I don't remember if we take a color function. We have a color function option. We do have. We have a color rules option that you can pass in the. If we want to show how to use options, the easier way to show some of the options without digging into the specifics of color palettes and passing those in, which arguably might be a little bit beyond what we're trying to do is that we have other. We have other plot themes. Yep, that's the one we want. Plot theme. And as you see, we have the ball and stick, which is default. We have what's known as space filling tubes, and we have the wire frame. I'm going to do the space filling. That's one that sees some use in both the literature and classes. Is that. So here we've rendered the molecule, where we're using the van der Waals radius around the atomic center, so the cartesian coordinates where the center of the atom is. Then we draw the. The ball bigger, basically. And so that results in these interlocking spheres, which gives a better depiction of sort of the space occupied by the electron cloud around each nuclear center. So that's where the space filling representation can be useful compared to the ball and stick.
Having these nice, like, plot themes that you can use makes it, I mean, as you can see, relatively easy to decide whether or not you want to use the ball and stick or this other method. This is like a great way that you could talk about the nature of science and how modeling always involves making some choices about how to simplify the phenomena. And just there's. I mean, by adjusting this one little option, there's all sorts of, like, lessons that spin off the imagination, right?
Oh, absolutely. And again, it gets down to what sort of information are you trying to communicate here? You're. This depiction is definitely emphasizing more information about volume of the molecule and the electron cloud representation, whereas the ball and sticks are more of a classic physics approach where you're focused on the nuclear center and the number of bonds rather than the electron density that's giving rise to those bonds. And. And you can ask. We have. You can ask suspic. Yeah, wait. You can ask directly for each of the plot types. You could say the stick plot or again, ask for the space filling plot and you get access to those as well. And again, here, this is the linguistics is set up at the moment to go towards the entity object. And so these are then flat representations. But as I showed you, you can always use the plot theme to get the rotatable ones. And depending on the situation, what you're talking about, or what you're investigating, one may be more appropriate than the other.
And thank you for showing us how to do that, both in Wolfram language code earlier and then in natural language.
Yeah, it's.
It's nice to know that however technical people are wanting to be, that it'll it.
Right. And that's one of the nice things that I like about the the WolframAlpha Notebook Edition is that in chemistry we have a lot of folks that may not be super strong in their math skills or in their programming skills. And the notebook allows us to not only teach the concept, the digital concept of using a traditional lab and notebook for recording your work, but it also gives access to the notion that we could, as instructors, start teaching some coding because of the not with the natural language and the Wolfram language representations. You can kind of bring that in in a sneaky way, if you will, almost to a classroom without having to overload the classroom with. I've got 10 modules on computational programming.
Yeah, yeah, that's a great point. And a reminder to the audience as we're going along, if you have questions at all about chemistry functionality education tips in chemistry. Jason is a fantastic person to ask these questions to, so please do feel free to put them in the chat so that we can make sure that we pass those along.
Now, one of the other fun things that we have is once you're able to get new students or your colleagues to be able to see the molecules that you're interested in making. The connection between the 2D representation and the 3D representation is another pedagogical hurdle. Not all of us have brains that do that immediately, but we can be taught. And so we have the ability to draw molecules in our system as well. You can say, draw a molecule. In this case, it's starting from ethane. So I'm going to rerun this cell and it says we're going to use the molecule draw function, which brings up the molecule draw palette. And here we're able to draw in 2D and then use that result for more computations. So for any of the chemists in the audience, this is your classic sort of drawing system that you might have seen from other web interactive activities or whatnot. And since we said that we wanted to start from ethane, it's been pre populated with a molecule of ethane. And ethane, for those that may not remember, has two carbons and a single bond between them and three hydrogens bonded to each carbon. And so what we can do with the, the palette here is I'm going to click on chlorine and then I can do some transmutation or if you will, alchemy and take that hydrogen and turn it into chlorine and you'll notice it turns to a lighter green shade indicating that it. That's again, back to those color schemes that this is chlorine and we'll put another one over here. And now we've, we've got, we've built a new molecule and all I have to do is hit return and we get that, we get a molecule object again, molecule being the family of functions. Here's the molecule function in the language and in the notebook. I'm just going to say, well, I want to set that equal to a variable. Remember WolframAlpha Notebook Edition can use natural language to set up variables. And we can set a molecule equal to a variable. So I'll do that. And now we see that mole, which is the variable name, is equal to this molecule. And I can say, well, I want a 3D plot of mole. And there we go. And again, now it's rotatable. And for those teaching organic chemistry, this is, you know, the CIS version of dichloroethane.
That's fantastic. And I think there's also. Is it molecule identify? Is there a way to, you know, feed that molecule into a function and get that identifier? If you don't happen to be an expert in organic chemistry already?
Yes, I think so. I believe the easiest way to get to that, let's see, is we, well, we can do a couple things. We can. I'm gonna re. Nope, I don't want to do that. Let's go to one of these cells and I'm going to change. This was in molecule. You would think I'd be able to type better.
I can never type on a Monday. My fingers take at least a half a day to catch back up to the day of the week that it is.
Is it molecule identified? Is it molecule find?
It's been a minute since I've used it.
Let me take a quick look. I haven't used it much myself and I don't remember if it's. It might Be a Wolfram function repository.
Are you talking about molecule recognize?
It is in fact molecule recognize.
But molecule recognize works on 2D pictures. Yeah, it works on 2D images. So molecule recognize what, since you brought it up, will allow you to cut and paste a image from a literature article, or textbook for that matter, and then take the TD structure and turn it into one of these molecule objects. So maybe allows us to go from, like I said, 2D representations that are printed into a computable object to do stuff. But I think what you're getting at is maybe molecule giving back the name that this is 2 chloroethane. And we do have a function for that. And I'm not remembering it right off the top of my head this morning, but let's come back to that.
Yeah, we'll come back to that.
We have a question from.
We have a question from the. Molecules, which I think you're answering here, but I wanted to expand on that and ask is there any sort of limitation of the molecule being viable for molecules with more. Bonds than electrons would allow or constrained by this tool?
Well, if you're in the molecule draw function, let's load that back up again. It does some checking. So let's see. Let's draw another bond from this carbon here. And you'll notice now we've made five bonds from a carbon. And if you haven't taken organic chemistry, that's a. No, no. Carbon tends to make four bonds. There are exceptions, but they're rare in the most part and particularly in a learning environment, as this was sort of designed for. We've set it up so that you get indications that you've put five bonds to carbon. And that's indicated here by the red circle. And so it's indicating that, hey, something's not right. We don't have an error message in the molecule draw function, but again, it's a visual representation that you've done something not quite correct. Now, that being said, so I can undo what I did to get back to the molecule. I could also do something, say, like this, where we put all the fluorines here and we have the completely fluorinated version of ethane. And whether or not you have a synthetic route to make this, actually in the laboratory, the system does, has no knowledge of that and is doing no error checking. So you can make whatever molecule that you can draw or imagine whether or not it's stable, it's a viable molecule. Fluorine chemistry is notorious for being highly reactive and possibly a bit unsafe. There's a Bit of some lore that a good fluorine chemist has all of their fingers, things like that. There's no checking in the background. That's where the user and the scientist has to bring their component to the collaboration with the tools. But the tools don't do that sort of checking.
As you were giving that really good answer to the last question, I believe molecule name was the name of the function that we were trying to figure out earlier.
Yes, that's right, molecule name. So what molecule name? I'm not gonna, we don't have linguistics set up for that one at the moment, so I'll just walk you through a quick what it does is as the, the name suggests, you can pass it in a molecule. And what we do is we do a lookup to see if that molecule exists in the knowledge base. So roughly 44,000 molecules that we have in the Wolfram language with curated data. And if it's there, then we'll return back the name of the molecule because it's part of the curated data. If we don't have it, then we make Internet calls out to pubchem into some other sources to see if the structure and molecule exists there. And if there's a name, then we return that back to you as well. But again, we are just doing the lookup for you. We don't have a chemist coded into the language to do the double checking to make sure that indeed what was coming back from the outside sources is the official name. Great.
Okay, awesome.
Good. Questions. Others. While we're talking about structure, should we move on to and maybe pivot to some chemical conversions?
We, we did have one comment that this is before we started talking about doing alchemy with molecule draw, that this was one step closer to computational alchemy. And sure enough, now we have the, the drawing with the molecule jaw. But it looks like yeah, I don't see any other questions at the moment. If you have any others, feel free to put them in the chat.
I, I, I have a question. I know you mentioned that the colors are probably very familiar to people who do a lot of chemistry, but in case you weren't one of those people, is there any way to show the names of oh things in the 3D molecules?
Yes, they're, I mean, understanding that.
Showing the 2D plot within a perfectly fine way of doing that.
Yes, there, I believe there is a.
Might be as simple as plot legends goes to automatic or plot labels goes to automatic. That would be my first, first thought.
Yes, that would be, let's do, let's See what it does. Plot legend. And see if. Oh, well, look at that, we've got that set up.
So if you don't do automatic, you can definitely do all sorts of interesting things with that. But in a lot of cases, your first guest goes to automatic will probably get you close to what you were originally thinking of.
That's right. So a little bit of just inside information. So there we. I am not the only member of the chemistry team and my work is more on the alpha side and my colleague, also named Jason, is the one that takes care of the language functions. And so that's why I didn't immediately have in my head of, oh, wait a minute, what's the plot legend feature to turn that on.
So, yep, building cool stuff like this is always a team effort.
It very much is. And so we have actually our chemistry. There are two primary developers, both the Jasons, but then we also have three or four other folks that bring different chemistry backgrounds and organic chemists and other users. So it is quite collaborative actually, and it is very much tools for chemistry being built by chemists. So that often is important as well.
Great. So, yeah, I'm not seeing any other audience questions on this topic at the moment, so unless you get some come in. I think we could definitely talk about the next topic area whenever you'd like to move on.
Yeah, why don't we, why don't we do that? So conversions was the next area. And the reason that I bring this up is because chemistry is an experimental science, we have to measure our data. So finite precision is an issue and significant figures and all these other sort of things. And that comes into play in the calculations that we're doing. And the first calculation in almost every textbook at any level is going to be some sort of unit conversion and chemical conversion. So I just wanted to start with some simple unit conversions. And here I've got an example doing for those of us that work in the. Don't work in the metric system. So here in the States and elsewhere, converting 1 inch to centimeters again, running that pulls up the language system function unit, convert with one inch and then what we want back out. And here it returns the exact result. And let's see, we can show the suggestion bar and you know, see that we can convert to other units, we can simplify the units, we can convert to Imperial if we want. But we just went from Imperial, that's in an inch to something in metric. And so we have all this functionality built in to do just basic conversions. Here's another one where we're just going from grams to kilograms using a, basically an SI prefix. And so that's built in right away. And that's a good start for chemistry. But we need to do conversions where some of the conversion factors are specific for the molecule that we have. And that's this notion of a chemical unit conversion that I want to get to next. So here we're going to say we've got, say we've measured out 5 grams. Now in, in the laboratory we would never have just 5 grams. We would have say 5.000 grams if we're working with a milligram balance and both representations work. But you, however you haven't measured or however you have the information, you can put it in. So 5 grams of sucrose and we want many molecules. This is the, the conversion that uses Avogadro's number to figure out the number of moles. And we have a function called chemical convert. And it's, it's neighbor chemical instance allows us to represent here we've got sucrose and we've got five grams of it. And again mirroring what we saw up here with unit convert, chemical convert takes the thing that we've started with, in this case 5 grams of sucrose and then we ask it for what we want back. We want the number of moles. And so the chemical instance is returned that we have sucrose and it turns out we have 0.014-6072 moles. Now these sort of conversions, like I said, are at the heart of a lot of chemistry. Whether you're doing education or you're doing research in pharmaceutics or any material science or any of the fun areas that chemistry pops up. And so it's really important to be able to explain that. And so you can do the, you know, append to your query, just take what you have here and add show steps to it. And that's one way to access the step by step answer key for how to do this calculation. And again, just as we saw before, we can go one step at a time. We start off with a restatement of the problem and then go through the other steps. So we get the mass, we go out and get the molar mass and then we set up the calculation using the, if you will sort of fence notation, which is common, common lingo in the chemistry education community where we're setting up this expression for number of moles is the mass divided by the molar mass. And we lay this out because again, chemists aren't always the super strong at math. So being a little penalty, being very specific about how to lay out all the details and then showing how we have 5 grams and the grams cancel in the numerator and the denominator and we're left with just moles. And that's shown in the final calculation.
One thing I appreciated about this method of presenting how to do these conversions when I was first learning actually was that it sort of made me realize that oh, doing unit conversions is kind of the same thing as algebra. Right. Like so I can actually connect those two domain areas. And you know, luckily I was a fan of algebra. And so that in my case, you know, allowed me to sort of leverage this other subject area that I had more of what I thought an affinity for. Right, right. So having this sort of notation built into something that you can access for, you know, any given problem in this domain, you can just sort of check did I do this right? It's kind of nice, right?
And folks that may be more visually oriented or have learned visual techniques, the being able to see that we don't have the strikethroughs because that would be a little cluttering. But you know, you can if you're. You could think of scratching out the the G's and, and seeing what's left. So there's a nice visual connection for folks that, that learn and think in that way. Now, as I said with significant digits, the system recognizes what's going on if you get with the information that you give it. So before we gave it 5.0 here we're going to be more specific. I've got, I know that I measured 5 grams on a milligram balance. And so my error bars, the error in that measurement is 1 milli plus or minus 1 milligram. And so I can pass that information in as well. And the system keeps track of it using our around features under the hood. And so what's going on is, as you hopefully can see, it's a little small. I'll scroll up. It shows 5 plus or minus 0.0001 grams, indicating that it does know that there is an error associated with it. And again it does a calculation. But what's different, if we scroll back up here we've got the number of moles, 146072. Same here. But now that error has been propagated through. So this is a great way of showing how when you make a measurement that uncertainty propagates through. This is something that's traditionally taught at least the math to do this is taught at generally a third year undergraduate level. But now you can bring that into your middle school or, you know, quite early into the program if you want, and actually have conversations about how errors carry through. And then we have uncertainty. And this really gets to the heart of designing chemical experiments because depending on how, just like we talked about before, there could be different ways of doing the algebra, there could be different ways of running the experiment that change these error bars dramatically. And as scientists, we want to have the smallest error bars possible. And now that error bar calculation is under the hood, done to the precise requirements by the governing documents of error calculations. All right then, and ready to go for you.
I love that because it lets you connect the, you know, practice of science, which is a big goal of letting students interact with an education with that theory side of, okay, I've got some numbers and some data and this is, you know, somehow I have to connect these two things and a lot of time in the classroom that can be a challenge to accomplish. Right, because one of them seems very mathy and one of them seems very hands on. But you know, in this realm of computation, you can really bring the two of them together and actually critically think about how you're going to set up experiments like you're talking about. That's really fantastic.
Well, and the other fun thing is that before tools like, like the Wolfram Alpha notebook here and the Wolfram language for that matter, you would have to have conversations of, okay, I do this calculation, I take the, you know, 5 and I divide it by 3.42, 0.297 on my calculator. And then you would have to have a conversation about, you know, how, what do I do with what the calculator gives me back. Because the calculator screen will be full up from digits all the way from the left to the right. And not all of those are relevant and they're not relevant because of the underlying bits of uncertainty in our measurement. And the notion that all of those digits on the screen are useful is incorrect. And it can be very difficult to, to convey that information to get someone used to it because it's a lot of computer science and number theory that, that frankly we just don't need to bother about anymore. It's, it's now taken care of and we can really do everything because this is the sort of precision and, and accuracy care that you would need at a, you know, to publish in the literature or to do, you know, things that are going up to space missions, any of that professional science. This is it. And now you don't have to worry about the math. We can trust that the computer underneath is doing it right and we can really worry about the smaller details of experimental design and tolerances and frankly cooler chemistry stuff and not have to worry so much about the math.
Speaking of which digits are or aren't significant, I love and I don't know how visible this is to everyone watching the feed.
I'm gonna might need to.
Yeah, zoom in a little. I love the little set of parentheses starting at the 72 that lets you know that that 29 is specifically talking about these digits of what the answer is that they don't have to be writing out that it's plus or minus 0.0000029. And then everyone has to count up figure out where in the answer that's coming. That's. That's such an elegant way of, of depicting that.
Yeah, I'm glad you, you pointed that out here. When we have the uncertainty in just the third digit occurring in the third digit, then, then we, we do as you had said, without the, the separate set of parentheses. But when it gets more complicated, the system does the hard work of making it a little easier to see visually with those extra set of parentheses. Yeah, it's. The team that has worked on this has, has done a fantastic job. I was lucky enough to have tools that sat on top of the machinery for this, which again was the around function for those that might be interested. But it's, it's incredibly nifty.
I remember having to do this by hand as a student and this is, this is way more convenient. So in a nutshell, for people who are maybe not familiar with the around function, what sorts of things can you use that in that are other functions that will recognize around and say oh yeah, I know what to do here.
Most any place that you would have an integer or a real value you can substitute an around into. Now there are a few functions that don't yet eat that but most all of your, all of the chemistry functions will. Will handle it and nearly all of your, your. Your basic math. I, I think some of the linear solvers don't quite know what to do with it yet for a variety of different reasons because propagating air through least squares linear fit situation is a whole mess in and of itself but and is not well defined actually. It's not so much that it's hard, it's just that there are multiple ways of doing it. So that hasn't been tackled yet or is in, in the works. But yeah, any of your conversion functions, your quantity objects, you can put it in as a first argument to quantity object. Now I should note for those that might be joining us that do teach PChem, you'll notice that this was a linear conversion, I. E. We were just multiplying conversion factors. If we had to do error propagation on a function or calculation that had say squared terms or cubic terms or something more that you would see in a physical chemistry course, then you want to use a round replace which takes into account those higher order uncertainties and does all the. It's still completely automated, but you, you do need to have an extra step that I didn't show here. But again, like I said, that's, that's for your upper level courses for cases where you're not just doing something like your, your standard multiplication, division, addition, subtraction, you're doing a cubed something or you know, more complicated nonlinear expression.
And another note on around, I haven't tried it with all the plotting functions, but the plotting functions that I have tried it with, you know, you can also use it there. So yeah, very handy thing.
Yeah, I believe the functions with the tests that I've done are very smart and they'll actually plot the error bars.
For you automatically, which is really convenient.
Yeah, without doubt.
So audience, remember, if you have questions, feel free to put them in the chat. I don't see any on this topic at the moment. Noah, did you have any questions before we talked about the next part? Nope.
What you're talking about with the functions in the error bar sounds like something that would be interesting to see some examples of. But I'm not going to ask that to happen right now because I know that'd take a little time to put together ones that you like.
So yes, you're right. I wasn't sure that conversation would go in this direction, otherwise I would have prepped an example. But I think that's actually a really good topic for future chemistry chit chats is that, you know, how can we do these, these plots and, and, and plotting and the classic linear fit. Because anybody that teaches chemistry lab, those are big issues. And making sure you know the classic conversations about is your plot big enough or did you know? Are my three points down at the bottom left hand corner and the whole rest of my plot is empty? Those sorts of things. I think the, the tools in, in Wolfram Alpha Notebook Edition really help that and so we should definitely put that on a to do list for the next time we Chat and speaking of.
There, there are plans to have more of these chemistry live streams for anyone who is wondering who's watching.
So stay tuned if you're in the audience. Remember, we'll have more chemistry content coming soon. So definitely, if you have specific questions, feel free to put them in the comments or chat so that we can know that you have these questions. And if it's relevant to something that we're doing in the future one, we'll make sure to address it.
Absolutely. All right, so the next topic that I wanted to talk about again, kind of following the classic curriculum is balancing. And this is the notion of you have a chemical reaction. So we've glossed over chemical functions, excuse me, chemical formulas. And now that assuming that student knows chemical formulas and they can do chemical conversions, the next thing that they need in their arsenal is to be able to balance a reaction. And so we'll talk about the two broad categories of reactions, molecular reactions and ionic reactions. But if we start with a molecular reaction here, I again in natural language, just said I want to balance. And you don't need more than that. You could potentially think of, well, I'm going to balance this chemical equation. Just do balance. That's all you really need. And then in this case, oxygen plus hydrogen to go to water, one of the classic simple reactions. And what we get back is the balanced reaction. So here we've shown that we've got O2 and, and two of the H2 molecules goes to form two water molecules. So if we wanted to see more details about this reaction, we could click on this button here. It's because we've been shown this button that says Wolfram Alpha pod, indicating there's more info you. If, if we wanted. And we could go click on the full WolframAlpha results and then we can see again, we asked for the balanced equation. Here it is. There's step by step information for that. We'll get back to that in just a moment. But there is, we've also figured out the equilibrium constant expression for this balanced equation. We've looked at the rate of reaction for this balanced equation. So you get quite a bit of information when you do a balance if in the full Wolfram alpha results, which may or may not be useful to what you're doing at the moment.
I always really enjoyed getting into equilibrium constant and rate of reaction. But it was toward sort of the end of the chemistry that I took when I was a student in high school first encountering chemistry. But having a tool like this, you could introduce that A lot sooner because it's sort of an interesting topic that you can have a lot of labs and things associated with.
Exactly. And the other thing is that, you know, that first time that you're learning how to balance an equation or why do I have to bother with this? Can sometimes be a bit of a lift for. Especially if you've got someone taking, you know, high school or middle school chemistry course of why do I need this? That sort of thing or how does this, you know, play into bigger stuff? And, and this allows you to say, well, yeah, there's this notion of equilibrium constants, these rate of reactions. There's lots of other stuff that this is connected to. And we try and show that with the results from the alpha pod. And again, if you have shown the full alpha pod, you can click on the step by step button to get step by steps. But if you are still just working in a cell in a Wayne notebook, you can do show steps again I said show steps for balance this reaction. And what we'll get again is our steps. But I wanted to point out that here we get a dropdown menu and we get results for not only our balancing requests, but it does give us the equilibrium constants and the rate of reaction. And you might think, well, why are these showing up? Well, the reason that they are showing up is that all three show up on the full alpha request. So all of that comes through with the WolframAlpha Notebook Edition, because remember, WolframAlpha Notebook Edition is sitting on top of Wolfram Alpha. And so we offer you those other steps because, well, you just might need it while you're doing the balancing.
That's really handy.
Yeah. And again, I'm going to cheat and hit all the steps. And again, as with some of the other chemistry things that we've talked about, there are multiple ways of balancing chemical equations. We take an algebraic approach which may be more complicated than you run into, or less complicated depending on the method that was taught in your class. But it's robust that it'll handle all sorts of balancing cases, not just the molecular cases. And that's why we use it. So we go through and add stoichiometric coefficients using the symbology that's defined by international standards. We set up some equations, we talk about how to fix this, you know, choose a set of equations and then we come back to an answer. And it's important, as it's noted here, that this is a system of equations. So we want to small coefficients, but we don't have to. We could have Multiplied all these through by three, for example, and had three, six, and six. But the, when you're working out the balance coefficients, you choose the smallest ones by, by, by convention. But you. There are other solutions to this set of equations for the, you know, and again, you can make that connection back to the math as much or, or not at all, if you want.
Yeah, that, that's an interesting point that, like, I have very rarely seen in algebra or linear algebra courses these chemistry applications sort of spotlighted. And that's been weird to me after I made that connection as a student, because I was like, wait a minute, this is what I'm doing in one class and it's relevant to this scientific class. But the curricula don't really line up a lot of the time.
Right.
So I don't know why that is, but if you happen to be, you know, teaching in either of these areas, you know, go, go find your colleague in the other area and put together a nice set of exercises.
Exactly. A little fun note if you happen to wade through the linear algebra literature for those in that community, anytime that they come up with a new linear algebra method, they almost always apply it to balancing chemical equations. We seem to be the sort of test case for the newest and greatest linear algebra method.
That's awesome.
Yeah, it's kind of funny. So those are molecular equations, and we could put in many more, time permitting. Maybe we will. But we'll go over into the ionic reactions. Remember, ionic reactions are involving a different sort of bond. So this is not necessarily covalent bonds that are being involved in the formation of the molecules. And so these molecules, when put into solution, will break apart into their corresponding ions. And so here I'm going to ask for the total ionic equation, and we'll explain what that is in just a moment. But we're starting off with two salts, and they undergo a reaction. And you'll notice if you look carefully that the ions are switching places. So barium is with chlorine, and then barium ends up with sulfate, the SO4, and likewise the sodium ends up with the chloride. And so what's going on here is that we're seeing the equation balanced. So things that are, will break up, have broken up. That's indicated by the AQ tells us that there's a possibility of the molecule breaking apart. And then the solids indicate that that species is solid in the solution, which is another way of saying it precipitates and that's carried through. And I must say that if you don't include the States of matter. When you're doing these sorts of problem, we won't necessarily catch that it needs to, to break up. Because formally, if you are just, if you just gave a bacl2 without the aqs here, we don't have enough information to be able to tell you whether or not that that would break up. So if we, in fact, we can do that that quickly. Yep, copy that and put it into a new cell and we'll get rid of the AQs. And you'll notice that because the AQ is still there for sodium chloride, it breaks up because we have enough information to make that decision. But since that information was not provided, our reactants still stay as, as reactants because there's just not enough information. So we don't make those assumptions on information that's not provided, which is important.
Yeah, and that's also good to know. So that points out another place where the role of student knowledge comes in. It lets you shift your focus away from the sort of mechanical steps to the higher order thinking of, okay, what state of matter are these actually going to be?
And it gets back to that, well, why do I always have to carry around the states of matter? It's very important. It's, it's a, it's a condensed way of carrying a lot. Excuse me, carrying across a lot of information. So we can also ask for the net ionic equation. Oh, so let me back up for those that might not know. The total ionic means that you've broken everything up and you've balanced the equation, but you haven't, if you will, canceled out things that might appear in both places. If you'll notice, with this total ionic, we have two chlorine ions on the left and two chlorine ions on the right. And again, getting back to sort of the mathematical underpinnings of chemistry, one could think about crossing those out, just as you might cross out things that are on two sides of an algebra expression. And that's exactly what the net ionic equation gets after is it's remove things that could be canceled out. And so here we get just the barium and the sulfate going to the precipitate that that would form. And likewise, there's one other bit of information that you can get here is this notion of a spectator ion ions that could be canceled out as the sodiums and the chlorines were, that makes them spectator ions. And so you can ask for those as well. And then you get just a text list back identifying those ions.
And I also appreciate that these are yeah, these are already identified as anions and cations because I remember recalling the terminological distinction between the two. Whenever there's two things and you don't know the history of how they got that way, it's always almost impossible to remember which one's which. So it helps to go back and look at some of the reasons why these sort of name assignments were made, if that's a tip for students.
Indeed, indeed. So again, here, if we were to show the full alpha results, you'd see that we get. If you ask for any of these three species of results, so the spectator ions and that ionic, you're going to get the other ones as well. And likewise, when you ask for the steps for this, you get those as well. And one of the fun things about this is that while I usually do most of the step content, we've been lucky to have an intern working with us who's another chemistry student. And so this is quite literally the case of chemistry students making tools for other chemistry students to learn. And I know that's quite a. Quite a popular technique and topic in the chemical literature these days, chemical education literature. It turns out we're doing it here too as well, so that's awesome.
And another. So if you're a student who's thinking of what would be a cool project to do that could help yourself and other students, you know, maybe taking a look at the standard solubility rules that is a frequent feature of your introductory chemistry courses and saying, okay, given these sort of standard solubility rules, can I implement something that would, you know, use some list of rules and decide whether or not a certain species is going to precipitate or not? That made an interesting side project.
Absolutely. And with the demonstration ability of, you know, some of the functionality and Wolfram language with manipulate, you can build those, those interactives to help teach your other cohorts a lot of information quickly.
I'm loving this because I, I've the people at the top of the field who of course know the most. About a scientific discipline and out just. Just learning their way that often. To people who have been the simple ideas what is or isn't obvious in. The simpler examples. At. As a company we are getting insights from people who. Are experts in these fields and people who thinks.
Totally.
Yep. Did we catch the. The end of that? I think we. I think we did.
I think so.
Brief. Okay, good. I had a brief audio hiccup on my end, but we're back.
Sorry about that, by the way. Okay, the delay.
So so for showing steps for ionic reactions, were there any other interesting lessons around?
Okay, just going to show that here. So unlike the unit conversions that didn't have a plan step, most of our chemistry, step by step results have a plan step to model the sort of pedagogy that is used in chemical education where we, again, getting to this idea of designing a react. Excuse me, designing a experiment in the lab and our problem solving. We also have a plan step where we design what we're going to do. You know, thinking through the problem before actually doing it, that's big in chemistry because again, that's fundamental to, you know, it can be life saving to making sure when you're planning an experiment in the lab, you've thought things through before doing it, you just don't walk in and do it. That's unsafe. And the same idea here. We think and plan a bit before we do our calculation in this case to save some time. But also, again, building that more fundamental chemical thinking principle, we have the plan step and then it's, you know, what you would expect, balancing the equation, writing things out, identifying any common ions, and then getting in this case down to what are spectator ions being the ones that were removed. So, and you can see they're, they're a little faint, but there are boxes around the sodium and chlorines in step five indicating that they're, they're the ones being removed.
We had an audience member who pointed out, I think, the connection between also planning when you're doing like a physics problem too.
Right.
Because in a lot of introductory physics, you want to think about what am I trying to accomplish and what questions am I trying to answer before I start losing myself in any of the calculation details. And that's a great point.
Yeah. And I would argue it's bigger than just chemistry and physics. Anytime you're really doing science, you want to stop and think about it and lay out a plan of attack. It can do a lot of good for you and especially if you're in a laboratory environment.
Definitely. It's actually, this is an aside, but it reminds me of, I believe in some biographies of Einstein, there was an incident where Einstein is a student at university, did not take this idea seriously of doing careful laboratory planning. And so there were some, some incidents where there were some rather dangerous chemical reactions that happened because young Einstein, the student, sort of didn't take that part as seriously as maybe he should have.
Right. Lessons for all of us, for sure. The last thing I just want to show you is that you can also do some lookups on chemical reactions. Our database isn't huge, but it does do a decent amount. So particularly with combustion react, you don't know a combustion reaction for a particular molecule. You can just ask. And in this case here we get propane plus oxygen goes to water and carbon dioxide. So you know, as a multi step problem solving situation, you can say, well you know, balance the chemical equation for the combustion of propane. Well, first step, what's the combustion? Here it is. And then you could go forward and do the balancing of that. We also for the organic community, for the synthesis, we have a good number. Memory serves me correct for around 500. Maybe that's a little too much. Maybe it's only 200. Anyways, we have a good collection of named chemical reactions and so you can get information about that here. I've said what is the Diels alder reaction, which is one of the first reactions you would run into in an organic chemistry course? And you can get an explanation of that. And of course at certain levels this would just be nonsense because you wouldn't have the background or the vocabulary to understand what's going on. But if you want, this is a nice case where you can see the full WolframAlpha results and get more information, particularly if you're doing like a history of chemistry activity. Get some things, the names of the folks and any Nobel prizes that were connected to it. But that's the last bit that I had to wanted to share with the gang today about reactions. And obviously there's lots more stuff to share, but we're out of time and.
Thank you so much for sharing all this. So if, if you have another little moment here I'm, I'm curious about. And also we can add more detail about this as we speak again, but so what, what would be some of your favorite lessons that having automation enables you to do that ordinarily would sort of be not something you would start with. So like in a traditional, you know, way of going through things, you might be limited by. Okay, this is a really cool point that I want to make. But the analysis, either math or some detail of it becomes prohibitive because it's just difficult to implement by hand. But if you're not implementing it by hand, it allows you to unlock some of the more critical thinking that we were discussing earlier when we were getting into lab design. Are there any favorite examples of that that come to mind at the moment? And I definitely want to go more deeply into that topic in our future conversations.
Yeah, we definitely should. The topic that comes to hand is, oh, golly. I mean, it really gets back to, like you said, the higher order thinking. I, when I was teaching at Stevenson University, we had a broad range of folks with different math abilities and at times you, you didn't want to lose anyone, but you really wanted to get to the higher order chemical thinking. And while there are other techniques to allow folks to move at their own pace, such as flip classrooms and things that I, that I used the ability with these tools to be able to say, hey, we're going to balance this equation and then move on to talking about the buffers underneath or the, the equilibrium reaction under, you know, on top of it. Or we've got these two competing equilibrium reactions and say a sort of clock reaction. We could get to that, if you will, the chemical thinking quicker and with the assurance that, you know, if I don't spend 15 minutes or 20 minutes in class making sure that everyone knows how to do the math underneath, that they have the tools and the resources to work through it themselves. And I know that they're, if you will, not alone, even though I may not physically be there with them to provide the explanation, they've got the tools to get the full answers and will, I can rest assured that they're not going to get lost or hopefully wouldn't get lost as long as they remember to use a tool.
Yeah, that's great. So I came more from a physics background than chemistry in part because I suspect many chemists will say the opposite of what I'm about to say. So when I was sitting down to do a chemistry computation, I was always a little annoyed by the chemistry computations. I didn't get that feeling when I was doing physics computations. And so that influenced me greatly as a young student saying, oh, I like this area because I don't like the computations in this other area. But if you're able to just avoid that problem entirely when people are sort of formatively deciding what they're interested in, that seems like a really powerful mechanism for letting people follow their actual interests rather than, oh, like this little computational detail annoys me.
Right? Yeah, it's all about trying to get to, hopefully for the folks that are to be chemists to be chemists or applied chemists in other field, that we can get to the chemistry and really find the, the love and the passion for that rather than getting hung up on some of the smaller details.
I know we. Have a lot of sources of information and of course coming forward, but if people in between then and now. Wanted to get a sense of what book edition connection to chemistry in particular. Do you have any advice on what. That they could look into?
Yeah, so we just scratched the surface of examples and I want to take a moment. Let's see, the second button here, if you notice, says browse starting points. So if you click, you get this nice little interface. These are other examples of how to use our tools in your environment. And for us, that's chemistry. So if you click on chemistry, then what comes up is the notebook. And I'll make that a little bigger so everyone can see it from afar. What we have, we have eight notebooks, not just the one that we went through, we have eight notebooks of topical examples for areas of the curriculum. So I would encourage anyone that wants to see, oh, wait a minute, what are they doing with elements? Or what do they do with thermodynamics? And we'll go through some of this in future talks, but there's no need to wait for the talk. You can dive right in. And if you click on here, I'll click on the thermodynamics. And since I'm using multiple monitors, they come up on different screens. So here's exploring thermodynamics and talking about all the different tools that we have for problem solving. Some of these are calculators, which we haven't talked about, but just more examples of doing practical chemistry, both at the homework sort of level and possibly bey using the tools that we've got.
Thank you. And speaking of thermodynamics, make sure the exact time that these are scheduled for escapes me at the moment, but I know that at some point there's going to be some more live streams speaking specifically about computational thermodynamics. So stay tuned to the Wolfram YouTube channel if you are interested specifically in that topic. Another thing that I think is really great that the chemistry team has put together is so in the chemistry education literature, there's a lot about, you know, what, what are effective ways of using the tools that we have to help students engage with chemistry and learn. And I think actually the chemistry literature has done a particularly good job of making studies like these, in my opinion, compared to some of the other fields. And so one, one thing that the chemistry team has put together is a collection of, you know, studies that have sort of shown how tools like this can be implemented and what the results were. So we'll make sure that we can get that into the description following the end of the stream. But, Jason, was there anything else you want to say about Those studies and that collected collection of resources.
Let me just drag that over I think. Sorry for the lots of movement on the screen. So yeah, we've put together, this is sort of the in house chemistry curated resources that we use to keep track of all the, lots of, lots of stuff that we have. So links to the main pages, as I mentioned before, we have lots of calculators and these are growing. There's another 12 or so that are currently in the pipeline and we've got links to tutorials and we put together a, a small book for those that might be working in the language themselves. Here's you know, a book that was designed to help get people up to speed yourself and your students. I won't go through it, but it exists and all of that is available from our, our content page and in fact a lot of the full blown chemistry sites. The main pages like the, the one for the Wolfram language with our core part of the, the Wolfram language, we're extracting stuff from, from the, the team's resources and then they get cleaned up and made pretty out here. But yeah, I'll be sure to stick a link to this into the bottom of my notebook. Awesome.
Thank you.
Excellent.
And I think that's all that I had.
Let's take a quick look to see if we have any audience questions. I don't see at the moment. One brief one is we saw the little banner there on the core pages that there's a new announcement with the blog posts about ChatGPT getting its Wolfram superpowers. I know that you spent some time thinking about applications for chemistry. Is there anything briefly that you'd like about that? While we have people here who I'm sure are also always interested in new developments in that area too.
Yeah, absolutely. So if you have access to ChatGPT, go check it out. The plugin allows ChatGPT to then call Wolfram for data. And so it, although it, it doesn't always take the same steps just like a human being doesn't always take the same steps that we have for, you know, as I was showing in the step by step details for you know, balancing the equation, for example, or doing a unit conversion, ChatGPT can do a decent job of sort of explaining how to do a calculation and it from the core knowledge that it's sucked into from the lit, from not just the literature but from the Internet, it sometimes has a very creative way of solving some solutions. But now with the plugin it's, it doesn't make stuff up.
Yes, yes. So it's a lot of fun.
I was just gonna say it's a lot of fun and it's very exciting to see where this, the combination of the two can take us.
Yep. So definitely remember as a student to check out if you want to, you know, use a large language model but are curious if it's going to make things up. Wolfram plugin should help with that. Vastly.
Exactly. Anything else?
Not seeing any other audience questions? No. Anything else come to your mind? Let Jason go.
I just wanted to say that I'm loving this presentation. Thank you so much for all your hard work and the next few things you have to tell us.
Yeah, this has been fun. I look forward to our next chats.
Yeah. Thank you so much for joining us, Jason. We should probably let you get back to developing more chemistry education tools.
Yeah.
But thank you so much. And if you're interested in more chemistry education content, check back in. We will have more conversations with Jason coming up.
Bye now.
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






