Two minutes, we'll see. Today I'm going to speak a bit about proper statistical mechanics and throw some matter at your head. I love this lecture, and I'm well aware that some students fear it. The point is not that you're going to know the stuff we go through today by heart. But I want to show it to you because it's a very, one of the reasons why I originally started physics is that you can get some very powerful results just by sitting down with paper and pen and thinking about things. And the cool thing is, well, the hardest thing is that we're not really going to assume anything about the systems today. We're going to talk about general systems, which is hard because it's abstract. But because it's abstract, it's also exceptionally powerful. Because if you do not assume anything along the way when you derive something, it's universally applicable. It applies to any system, whether it's a car or the universe, or a building. But before we do that, we have some study questions. And now there are only six of you here, so that we're going to go through them.  But that's great because, well, we don't need to talk about these. But let's talk about the stuff you were interested in. How are energy landscape properties related to energy and entropy? I don't think I mentioned that exactly yesterday, which is good, because it forces you to think. Any takers? Well, not necessarily, right? So that the energy landscape is in principle just energy, not free energy, energy as a function of the degrees of freedom. And in a simple, it might be easiest for you to think about say two Ramesh-Handan torsions, one amino acid or something. But in principle, the energy landscape doesn't directly describe on the z-axis, it's in principle only energy. In principle. That's fine. You're quite right. But remember what I showed in that plot. I'll draw you two energy landscapes.  If you have one alternative with a protein is there, and then another alternative with a, which is that? And assuming that they're at the same depth. Which one is more likely to find a protein at? Well, there, right? Imagine if we drill holes here. The janitors are going to hate me. This is the interest of science. If I can drill a small hole, I'll drill one hole that's like one centimeter wide in that corner of the room. That's one meter deep. And then we'll dig a gigantic pit in that hard, same depth, but it's one meter in diameter. And then we randomly start throwing around balls.  On average, you're going to be in the large pit, right? It's not deeper, but because it's more likely that you will fit there. So here too, there are two parts of the energy landscape that's important. The depth of the energy landscape that describes how low the energy is. But that is not enough to predict which state is going to be the most likely. Because it also has to do with the space, sorry, the width, the space, the volume, whatever you call it. And that is exactly what you saw at the lab yesterday too, right? It's not always, well, if you only look at individual states, the state with the lowest energy is going to be the most likely one. But if you start looking at something with, well, sort of group these states together based on energy or something, the size of the states will also matter, the multiplicity. And that's what came in the lab. So if you look at these energy landscapes, the absolute z value would correspond to the energy. But the entropy is more related based on how large these areas are. So it's more likely to end up in the large areas of the energy landscape. Then you could, of course, also imagine drawing a free energy landscape, but that's a bit more complicated. Then it's not directly a function of the degrees of freedom. So I like the things of energy landscapes, and then the space in them is somehow related to the entropy. No. Well, in the free area, the advantage of an energy landscape is that it's a simple function of the degrees of freedom in the proteins. And that could be x, y, z coordinates. It could be torsions. You know what you have on your axis. And if you start drawing a free energy landscape, you would somehow need to have the macro states on your axis or something. And it becomes a whole lot more abstract. And that's why we usually, I like to think of, when it's the landscape, I like to think of the energy landscape, not the free energy landscape. Yes, enthalpy. Actually, it's a great question. But you see, I think it was only two lectures ago that I said I would try to avoid making these mistakes. But we do it all the time. And the reason why we mix up enthalpy with energy is that we don't care about that small pressure term. But strictly, it would be enthalpy s. But nobody says enthalpy. And that's why I think I would fool you more if I pretended in this course that it's always called enthalpy and no scientists would ever say energy. It's rather the other way around. I don't remember the last time anybody in my group called it enthalpy. We say energy. But the point is that even the simple energy landscape, although it's not a free energy landscape, you can find the entropy based on the size of the regions in the landscape. What is the hydrogen bond patterns in the most common helix? Yes. And that's the four in the 413 helix, right? The important thing to raise up, if you are in the protein, the reason for one reason for knowing this, if you are going through structures in the protein data bank and then you try to classify these helices, are they alpha helices or pi helices or 310 helices? How do you do it? You could, of course, start looking in the Ramesh Handan diagram and all these complicated things. But what you normally just do, you check the hydrogen bonding pattern. And if it's i to i plus 4, it's an alpha helix. If it's i to i plus 3, it's a 310 helix. And if it's i to i plus 5, we call it the pi helix. And that's why it's important to know that pattern. The pattern is we're actually going to see that either by the end of the day today or tomorrow when we're going to look a bit about helix properties. And then we spoke a little bit both about helices or sheets. And I think the distinction here compared to what we did a few days ago is important. So if we start looking at one of them, let's take helices. And now we're talking about free energy components. What components favor versus this favor folding of a helix? Like the components in the equation. Yeah, so basically what properties? You can think about properties. The energy favor. But it's always important to think in terms of the x equals e minus ts equation. The enthalpy of what? Hydrogen bond formation, yes. Let's stay there for a second. Are there other things that favor helix folding? In particular, alpha helix? Yeah, so you're quite right that the hydrogen bonds are by far by an order of magnitude the most important ones. But there are a couple of other ones you could come up with. And I touched upon that in one of the first lectures. So the alpha helix is a very well packed structure. It's not too dense. And it's not too what do you call it? It's not too low density, either. So the pi helix, for instance, that would have a problem that it's almost a vacuum in the middle of the helix. And the 310 helix, then we start to pack it a little bit too hard. So the alpha helix is actually slightly favored by the Lennard-Jones interactions, too, or van der Waals interactions. And if at least if the residue likes to be in alpha helical formation, the torsions probably favor that too a bit. But it's much, much weaker than the hydrogen bond. So what disfavors alpha helix folding? Well, not just hydrogen bond. The backbone torsions, right? That rather than being free to move around almost anywhere you want in the Rannachandran diagram, suddenly you're forcing it to be in a helical state. And this is not unique to alpha helices. And it's a bit, if you think about it, it's a bit strange. Entropy is always bad when you fold the protein. Because you're taking something that's free and happy and you're forcing it to be in one specific state that it's much more well-ordered. And nature hates that. That's not unique to heliprote folding. Any time you're binding a molecule or something, the entropy is bad. If you're ordering things, the entropy hates you. So the only question is, can you find enough things to balance it? And whether helices fold or not, and again, we might have time to get into that today, but I don't want to stress the static skill mechanics. It might be tomorrow, too. What determines whether alpha helices fold or not, whether particular residues fold into an alpha helix? Well, in a way, it's easier because you just said everything, right? What are all the components?  So what's going to do to, and then that's all, this is always the case for all residues. And the question now, if I give you a specific dot-a-camere and ask you, will this fold the helix? In general, you can't answer that, because we don't know exactly how large these components are relative to each other. So if for these particular residues, the entropy parts are more severe, then it will be more bad than good parts, and then it's not going to fold the helix. On the other hand, if the energy components, the hydrogen bonding part is better, then it's going to be downhill in free energy, and then we like to form an alpha helix. So that the terms are always there no matter what amino acid you have, but whether these particular amino acids are going to form a helix or not depends on the relative size of the terms. Let's do this for beta sheet folding too. I'll do the trivial one. So obviously for beta sheets, we also have a drop in entropy, because we're going to force it to be a one specific state. So what is favorable for beta sheets? The hydrogen bonding. So it's overall, it's actually the same thing for helix and sheet, right? Can you imagine if I were to force you to do something else for beta sheets, can you imagine other things that would favor beta sheet formation? So there are exactly, so there might be some global properties where it might be convenient. For instance, if you can turn all the hydropobic rest used to one side and all the hydrophilic to another or something, you can do that with a helix too, but it's a much less strong effect with helices. But same thing there. This is likely an order of magnitude weaker than hydrogen bonds versus entropy. And based on what I, and of course here too, whether a specific sequence of amino acids will fold a sheet or not depends on the balance between these. So based on this, do you now understand why I've been harassing you so much? On the one hand, understanding hydrogen bonds and the hydrophobic effect. And on the other hand, that you need to understand entropy. Because these two terms are just gonna determine everything in proteins. And that's why we had to go back to the physical chemistry and understand that. But from now, after the math today, we're gradually gonna steer away from the physical chemistry, basic physical chemistry and focus much more on real proteins. Yes? I do. They certainly can. But they usually don't directly stabilize the beta sheets, right? Because if you look at a beta sheet, how are the side chains oriented relative to the beta sheet? Up and down. They point, exactly. They point straight out from the sheet. So they might stabilize one sheet to the next sheet. But inside sheets, we have all the hydrogen bonds stabilizing it. I will talk more about disulfide bridges, but it's likely not gonna be until after Easter because they're important in proteins too. So what is the historical way to get secondary structure? The proteins. Well, that's probably what you would do, right? Rather, history. If you do this historically, I would say that there are two methods. One, if you don't, one, if you just wanna see what is the average secondary structure composition in a protein. And you don't care where it is. See this spectroscopy because it's simple, cheap, time-resolved, room temperature. It's awesome if you're gonna, and I might even talk about some experiments you can do on that today. If you wanted sequence result, what is the easiest way to do that? NMR. And that's slower, more expensive, but I think most of you, given a day of instruction, you could likely do that with an NMR spectrometer even here. You don't need an exceptionally fancy NMR spectrometer for it, but you're gonna need to fight with 10 other students who also want access to the NMR spectrometer. But it's not that difficult. But of course, then you might be able to determine it for one day of recording time and then a week of analysis, and then you have it for one protein. And the obvious thing that all of you should do if asked to do this is rather bioinformatics, bioinformatics. There are lots of drawbacks with bioinformatics, but this is not one of the area. When it comes to secondary structure, if I, today I would even say if I get two results, one of NMR and one from bioinformatics, and if they're substantially different, it's not obvious that the NMR result is the correct one. I would likely say go back and double check your NMR calculations. So they're roughly on par with this side. It's insane how good prediction is in this case. But there are some failures, and I think I will, let's see, tomorrow I'm gonna talk about those failures. So why do you get so much energy from solvating decker? What is decker? The heavy titrate of amino acid, right? You have a histidine too, and I leave that one out because it might or might not be charged. Why do you gain so much energy from solvating them? Or free energy rather? Yeah? No, they're gained.  I think I've had this question for four courses, and nobody has come in. So what you see here is that we are all stopping with words, right? So first, I occasionally say energy when we mean free energy. And some of that talks about gain when it's good. You're quite right. We should say that it's good in the sense that it does happen, and then of course there should be a drop in free energy. But you didn't answer the question. This is not quite as simple as you might think. Or maybe it is. It's just to me, it's not that simple. Well, yeah, but the water was already fairly happy, right? That all those waters were having a hydrogen bond party, and then you squeeze in the ion there. And sure, you can party with the ion too, but the waters are not gonna be significantly happier partying with the ion than with themselves. And this is the part of it that is not quite as simple as you might think. Well, but again, the waters were already interaction. I'm pulling your leg here a bit, right? So any time you get a question like this, it's not enough to look at one state. So what am I really asking about? Solvating, what is solvating? Oh, no, but it's a process, right? It's something happening. It's not just, I'm not asking virtually anything that in chemistry. I'm not asking, you can't answer the question about the solvation process just by looking in the final state when you are in water. It's a process. And if it's a process between A and B, you need to look at both A and B. So the trick here is don't just think about what happens with these residues in the water. What happened when they are not in water? Because that's where we're starting. Well, the point is when they are not in water, they don't have anything to interact with, right? And then whether you call it oil or vacuum, it's essentially the same thing.  It doesn't happen. So in practice, you need to have this in a salt or something so you pair it up with another ion. And when you solvate them in water, you get better entropy because they can separate and they get better interactors in compared to in vacuum. But the key thing here is that any time you're thinking about a process, you can't just look at one state. You need to look at both states and say that it is more favorable in B than A because, and in this case, it's more favorable in B and A because compared to the salt being either in a crystal or in Bacchio, it's much better to interact with the water. So what is disulfide and what's the role? Yep? So it's actually, it's advantageous in several ways. So first, this is gonna, any time you have a positive, if you have these amino acids in isolation, they would likely need to be deprotonated because you can't have pre-positive charges, right? While when you solvate it in water, it can suddenly take up a proton from the water and actually be charged. So that I would guess that the electrostatic interactions are gonna be significantly better. The other alternative is that you had it in some sort of salt so that you have a positive amino acid paired with some other negative ion. And, but then again, you would have a very ordered salt crystal or something, right? And that would be a low entropy state. So it depends a little bit what your reference state is.  Or it's because that if you have this ion in oil or something it might be deprotonated and then we can protonate it in water. It's a significant gain in energy. But the point is that no matter what it is, it's better in water because the residues will be free compared to being in salt and it can be protonated compared to being in vacuum. Disulfides. Let's do the same thing with disulfides as we did up here. What is good and what is bad with disulfides? So you gain a covalent bond, that's quite right. And covalent bonds only form when it's amazingly good. Now we're talking about electronic interactions. You can easily talk about 100 kilocalts or something. It's amazingly good. But say you use what? No, so that, well, you would have to lose the hydrogen and that's of course a bond that you lose. But I think the sulfur-sulfur bond is much stronger than the bond between sulfur and hydrogen. But those hydrogens will of course, they will attract with the water instead. So that we're gonna gain, when this happens, it's because you have some sort of oxidizing conditions that makes it favorable to form this bond. It's not gonna form under all conditions. But under those conditions, we're gonna gain a tremendous amount of energy, enthalpy. But what is that we lose normally? A huge amount of entropy, which is bad. On the other hand, well, losing the entropy per se is always bad, right? But this can rigidify a structure. And in many cases, that creating such a rigid structure is exactly what we need for the structure to be able to do its job, such as these small spider toxins I showed you. And it's gonna be the case for large iron channels and everything. If you do not have that disulfide bridge, the entire structure might just be too loose. And you could argue that's a more favorable free energy state. And if that was all you had, that would be it. But nature has an interest in making sure that this protein can actually do its job. So over the course of evolution, nature will have inserted enough residues to make it energetically favorable to be in that state, despite having a much lower entropy. We're gonna talk more about disulfides after Easter. Tryptophan, ah, I didn't talk about this yesterday. Good thing to see how much you look at things. What is special with tryptophan? There are two. You could argue there's one property that's very special from a, say, model building point of view. That one I did cover. And then there is a separate property that is very useful for tryptophan that I didn't talk about at all. So it's big and bulky, right? So that it's great if you screen through and randomly mutate other residues for tryptophan, you're likely gonna perturb the structure unless this location is right next to the binding site or something. So it's a fairly, we frequently do types of, when you say that you're doing scanning, you're typically going to an entire protein and replacing each residue, for instance, with alanine or tryptophan, occasionally with histidine too, because you can add tags to it. So tryptophan scanning is something we occasionally do if I, in a membrane protein, if I wanna find out what helices are interacting with each other, if I try to replace a residue with a tryptophan, well, if this residue was facing the lipid bilayer and not much is gonna happen, but if this residue was facing another helix, I will just have destroyed the protein. So that was the part that was useful for us in model building and everything. But there's one thing that is really, really, really useful with tryptophan. Sorry? That's cool. Well, that is related to it, and that ring creates something that you can use in the lab. Well, now we're still talking, that's two, two, but that's still more into it, but it's in terms of measurements of spectroscopy. The fluorophore. Yes. So tryptophan itself is a fluorophore, so you can see it with spectroscopy. And that would not work if tryptophan was a very common amino acid, but tryptophan is a fairly rare amino acids and proteins. So it might be common that you only have one or two tryptophan. And depending on the surrounding tryptophan is and everything, you can actually see this.  The other alternative would be that you had to introduce a special small dye, a fluorophore in the protein, which is may more complicated. So it's pretty cool that we can introduce a, just by altering the genes, you can have the body itself create a fluorophore in a protein. Why do we get helix dipoles? The peptide bonds, and all peptide bonds are polar, which means that there is a small dipole along each peptide bond. And then when you add up, say 20 of them or so, they're all gonna point in the same direction. And that is the equivalent of one large dipole. So the entire helix is, well, the entire helix is a dipole, as if you had a small minus charge on one end and a positive charge on one end. And that relates to the next question, helix capping. So these residues will always try to neutralize that dipole. Well, neutralize it. If you have a dipole, that would be the equivalent of having a minus charge on one end and a plus charge on the other one, right? Pair the plus charge with a minus charge and the minus charge with a plus charge. The reason for knowing that you're occasionally gonna see that, those patterns, and it's a really good component that has improved bioinformatics predictors. Now, of course, in modern bioinformatics, we don't do this by scoring positive or negative charges anymore. You will see this pattern in evolution, but the reason why we see these patterns evolutionary is because that is good from a physics point of view. And that is actually, I might bring that up already now. It's gonna come back to the course. There are two ways of seeing nature. What we've done quite a lot in this course is that we're looking at this from the fundamental interactions of nature, in particular physics. And physics is, of course, correct. Proteins are determined by the laws of physics. But then we have this whole thing, bioinformatics. So what does modern bioinformatics build more and more on? And what is homology? Evolution. And of course, it's not that evolution and physics obey different laws or anything, right? But when it comes to understanding proteins, when it comes to accessing proteins, one way is, of course, try to understand this bottom up with physical laws. And in some case, we need that. In particular, if we're gonna try to do something that nature has not done before. If you wanna create a new drug, well, you can't look to evolution because evolution hasn't created that drug yet. Or if you would like to create a protein with entirely new properties. But when it comes to understanding nature, evolution is frequently much more powerful. Not because it's more correct than physics, but because it's so complicated and the signals are so weak that it's easier to let neural networks or something find these weak patterns. And this, I would actually argue that bioinformatics has changed quite a lot. 20 years ago, bioinformatics was much more based on physics. And you even see this in the study sessions in the research council and anything where we handle bioinformatics now and again. It's much more common that the bioinformatics projects are gradually moving over to, say, evolutionary biology or something. Which is a bit fun from another point of view because all the people studying biology in my generation, they took biology because they hated math and computers. And nowadays it's completely impossible to get a grant in their area unless you're doing bioinformatics. So why is the right-handed alpha helix by far the most stable helix? But why can't you do that with the left-handed helix? Exactly, right? And this is also important that physics, now we're getting into deep physics, that physical laws are symmetrical. So that all the physical laws apply if you take a mirror image of things. So based on pure physics, if we take a mirror image of everything, the same physical laws apply. Just as physical laws are rotation invariant, the same rules apply if you move things one meter to the right and the same rules apply if you rotate it. But the chirality of amino acid breaks these laws. Or of course, the chirality of amino acid don't break the laws. If you took the mirror image of every single amino acid, it would still be symmetric, but we can't take the mirror image. Or can you? Well, if you have a small amino acid, can't you just imagine that those four groups change places? In lecture one I said that it couldn't happen. So if you have a small, say, C alpha here, and then we have a carbon, we have a hydrogen, we have a side chain, and we have a nitrogen. And that's, you're gonna need to pretend that that's the trade rule.  Yes? So the point is, in lecture one I said that this is not possible, right? And based on what you know now, we don't say that things are not possible. We just say that the free energy barrier to doing this is so high that it will basically never happen. And that means that we can't ignore it. But technically nothing is impossible. That once in a blue moon, if you waited a billion years, or probably a thousand years, the energy would be high enough so for then this particular amino acid, they could change place. But you're gonna need this happening in an entire protein. And the reason why I mentioned this is that, yes, you can actually translate to right-handed amino acids. And the laws of physics apply and everything. There's nothing that we broke in the symmetry or anything. It is just that there is such a gigantic energy barrier between left-handedness and right-handedness that in practice you're never gonna see it. And for whatever reason we originally ended up on the left-handed side of the amino acids, and that's because we have, for that reason, we only see right-handed alpha helixes. And we can also say, why do we say that we have a right-handed alpha helix while the amino acids are left-handed? There's one rule that's very easy and one rule that's very hard. Yep.  If we have left-handed amino acids, why don't we call that helix left-handed? And we have a right-handed amino acid, why don't we call that right-handed helix?  So this has to do with the way we define things. So we have one rule when we define the handedness of amino acids, and that has to do with how heavy these groups are and then the order how you calculate this, and I would even have to look up the exact definition. That's based on organic chemistry. It is what it is. We can change that definition. A helix, on the other hand, right? That has to do with a screw.  Because it would completely strange to call it left-handed when it's the opposite. Well, it would completely, if the helix looked like a right-handed screw, and we would call that a left-handed helix. So sorry, we've used, scientists use different definitions for these things, and we just have to live with it. But the right and the helix and the left and the amino acids, they have nothing to do with each other. This is also one cause to the other. So the twist of beta sheets. Where does that come from? Exactly. So none of them, they aren't exactly planar. And here too, I'm pulling it up. Why should beta sheets be perfectly planar? In principle, they could be anywhere in the Ramos-Handan diagram. It's just that they happen to be almost at a position that would correspond to planarity. And when it is almost, it's very easy that, oh, it looks like a plain layer and everything. But again, the likelihood that would be at exactly 180.0 degrees, it's not gonna happen. And because it deviates a little bit from exact trans in one or two residues, you're not gonna see it, but in a large sheet, these keeps adding up, and then you're gonna get the slight twist of the sheets. Sorry, you're gonna get the slight twist of the strand. And because of that twist of the strand, all the entire sheet will also be a bit twisted. And you will see that in every, again, after Easter, we're gonna start looking a whole lot into actual classes of proteins. And every time you see a beta sheet, you're gonna see this twist. And that is not because nature has distorted it or because we made a mistake when it determined the structure. It's a fundamental property of the beta sheets. Sorry? You can always get the top of it. Yes, for left-handed aminase. 13, we're gonna touch a little bit on that today, but I think this relates to the lab. So what is the difference between a state and a microstate? Sometimes when I wanna stress this, I even micro-state. And when I really wanna stress that something is not a microstate, I occasionally call it a macro-state. Yes. So the point is that if you're somewhere on the D-flow of physical rights, whatever system we look at, if we look at all the components, say, down to say atoms and electrons and everything, that is a microscopic state. Every single way we can orient or arrange matter or something. But if you think about this room, what is the number of ways we can organize all the oxygen and nitrogen molecules in this room? I mean, just even trying to think about describing the air in this room by tracking the position and velocities of all the molecules, right? It's insane. We can't do it. So anytime we actually look at the system, and particularly if we do this in the lab, this is not where we start. We start, we need to group things into things that we can describe in the lab or something, but, and then we rather talk about the pressure and the volume or something in the room, right? That the room is in equilibrium with the air in the next classroom. But what we might have done then is that we might have grouped lots of different of these microscopic states into one large state. For instance, atmospheric pressure in this room. That is one state that, of course, wants a quintillions of microstates. And I'm well aware that this is a bit difficult to grasp and that's partly why we have all these equations and why we effectively get entropy to come to the rescue. And I so understand right now, you probably feel that this is more confusing. And I will, I think we, I will probably even now decide that we're gonna skip the alpha helix part today. So we're gonna focus on these understanding the entropy and everything because it's gonna pay back. In most cases, whenever you start with a problem, if you don't know what you're talking about, you're in trouble. You need to learn what you're studying. So in the lab yesterday, you started, when you did your very specific definition, these states or classes when you put them in, that is a microscopic state. My particle can be in that one. But then you could also group them. What are all the states that have energy minus two? That is a macrostate. The second you start grouping things together it's a macrostate. And any property or anything you look at, you're likely looking, normally in the lab we're always looking at macrostates. In a few cases we might be looking at macrostates. But by few, I mean once in a blue moon. It's horrible to look at macrostates because it's too complicated. We would look at, for a protein, you would need to look at every single torsion, every single torsion of the side chain, every single way the hydrogen, the water can orient with the hydrogen bonds around this protein. So even if you're looking at something like the TRP cage, it's gonna be, you can't even start to enumerate the states around TRP cage. So the macrostates so quickly become completely impossible to work with. Now this is bad in a way, because on the macrostate level, the world is easy to understand. You just count things. But because it's impossible to work with, we need to find a way to translate from the microscopic to complicated world to this more simple world. But what happens then is that then we get this correction factor that we need to account that some of the things we group together actually corresponds to more states internally. And that is the entropy. And that is exactly when you started to introducing three states, you get this logarithm of three correction factor. And entropy is more complicated than that. We'll talk this later, by the way.  You could get by without the logarithm, but then we would have a completely different physics.  Yes? But when you're talking about macrostates, can you do something I've confused about yesterday? All the microstates that you're grouping together, how far do we exact the same energy? Well, that depends on what you're looking at. In the case where we're looking at energy, right? Then in your lab yesterday, it made a lot of sense to say, the macrostates depend on what you care about. Now let's see if we try to group you. We could group you based on H, the length, the weight. If I were going to group you based on length, I don't really care about your age. If we're going to group you based on H, I might not care about your length, right? So it depends on what you're interested in. And in the lab yesterday, you worked with the Boltzmann distribution, and we were interested to see how likely is it for things to happen as a function of energy. But then we're not counting states. Then we're looking at the energy. And if I want to do things in that, for that lab with energy, okay, energy is the most important things. If many macrostates have the same energy, I'm going to lump them together in one state. But that's because we decided to look at energy. The lab yesterday would probably have been a bit boring if you tried to group them by H. But the point is it's your choice. If you decided to group them by energy, yes. It's the amount of freedom you have in the large, the group you have, how many ways is it to orient things inside this group? And again, think of this classroom. We might, I might be so horrible that I just grouped you at students. And there are 15, 20 students, right? So how many different ways is it to orient? How many different ways can we place students on different chairs in this classroom? And then it has nothing to do with energy. Then it just has to do with permutations and how many ways can we participate in students? And that is going to turn out that you get exactly the same entropy-like correction factors there too. So this entropy comes from probabilities, really. Yes. So based on this labs, how would you explain multiplicity relative to microstates? It's very close to what we talked about. What I just said. Yes, so when I just say yes, so normally you would say it's very common. The reason for this is that when we talk about things as a state variable, pressure or free energy or something, you frequently talk about states without doing statistical mechanics. And it's only when we do statistical mechanics we start to introduce the microstates. And people who don't know about this, they would just talk about states. They would have, if we kept calling that, you've probably studied things for 10 years in physics and chemistry and everything. And you've talked about states, but you've never heard the concept macro state before. So I like to introduce that as a way to make the contrast really clear. But you're gonna see in general, if people really mean microstates, they will usually say microstates. And if they don't say anything, they likely mean macrostates. It's another one of things. I wish that there was a super clear definition. We should probably call one of them.  But sorry, you're gonna need to live with that. Because generations prior to you were not smart enough to use different words for them. But the multiplicity and microstates. Yes, so the point is that, but the multiplicity here really has to do with, the entropy comes from, there are multiple ways to distribute things over microstates without changing the macroscopic states. You're still gonna have the same energy, but there is more than one way to skin this cat or divide them to get this energy. And that is what I get you there. There is some freedom. There is some inherent freedom that you have without changing the entropy. And that's, sorry, without changing the energy. And that is what gives us this entropy. So how would you explain entropy based on that? Yes, and if we are doing this exactly where that, given one macroscopic states, and whatever you've defined that macroscopic states, how many ways, what are all the different ways that we can distribute things inside this macroscopic state over the different macrostates so that we keep the same property of the macroscopic states? So this just has to do with probabilities or permutations. So that even the original definition I said that they said that entropy is somehow proportional to volume or something is not even really volume, right? It's just counting. And that is why we end up with these things that don't really have any units. It's a logarithm of the number of ways you can do things. Then we might call this volume or something, but I'm not sure if we, for instance, the way we distribute you over the chairs here. Well, you can call the chairs some sort of volume, but I prefer to think it's in terms of counting. I'm not saying the math is trivial, but conceptually understanding that there are different ways to distribute students over chairs. That is not conceptually difficult.  So the problem is that, I said, this has to do with probabilities. And any time you combine probabilities, what do you end up doing with them? So we think about it, first we wanna describe the disorder in this room, and that has to do with the number of ways we can distribute you over the chairs here. And that is one probability. Let's call it PA. And then we'll look at the next classroom. There are students there too, much fewer, but it's unfair because they have a larger room. But there is a given number of probabilities, the ways you can, well, sorry, not probabilities. Say in the number of ways we can distribute you, NA. And how many ways are there you can distribute the students in the next room if we call that B? That's gonna be NB. So if we look at these classrooms together, how many ways are there we can distribute the students in both classrooms? NA times NB, right? When it's probabilities, we always multiply things. This makes lots of sense when you talk about probabilities. But now we wanna convert, we don't wanna have to look at the microscopic world all the time. We wanna be able to talk about these property of this room, how disordered this room. And then we have this property S. And then I somehow wanna, I wanna take this property here and then I want the property of the next room too. It's very nice to have a property I could just add. And it simply has to do with convenience. It's easier to add things. If I don't wanna drill all the way down and start talking about probabilities, if I wanna take what are in my equations, I somehow wanna account for a property in this room and then I wanna the property of the next room. It's more convenient to add things. And the point is if I define S from the logarithm, if I take the logarithm of a product, that is the logarithm that term plus the logarithm of that term. So by taking logarithms, we can add things. And it's much more convenient in all equations. If you keep thinking that it's probabilities confusing you, but at some point we're gonna forget about that probabilities, right? And you just think, but this is the disorder property in room A and this is the disorder property in room B. I would like to be able to combine them. And then it's more convenient. For me at least I think it's more convenient to add them. How many of you took the bioinformatics course? Okay, you do this in bioinformatics too. So when you did this alignments and everything, you talk about substitution scores, right? And you add substitution scores because that's convenient. But where do you get the substitution scores from? Log ratios, right? And the reason for that logarithm is that it would be a pain if we had to multiply these scores all the time. Technically, it is the probability, so we really should multiply things. But it's very convenient to be able to forget all about that and then just have some high level score. And that's why I have the logarithm there. It's a pure convenience. Or, well, yes, you can say it's convenient. But the alternative is to define a completely new physics and it would be a bit complicated for you to interact with the rest of the world. So if you don't buy that argument, just accept that it's the definition. But that's why again, logarithms, there is another reason actually. Computers, you were quite right that these numbers can get so astronomically small or large. So at some point, but this is much more recent. In modern times, by the time you get to 10 to the power of either plus 38 or minus 38, you can't represent the number in single position anymore. And when it's 10 to the power of 308 roughly, you can't represent it in double position anymore. So computers also have problems with very large or very small numbers. So for, but this is much more recent. If we didn't have the logarithms, I bet we would invent them today because for computers it's awesome. Good, we're gonna come back to this a bit today. We spoke about hydrogen bonds before and both the enthalpy and the entropy. But I think I covered that well enough last time that I'm not gonna go through it today. But the logarithm here is again, here we call it the volume, but that simply has to do with the number in this case we have one microscopic state here that we say that the hydrogen bond is not formed and another macroscopic state saying a hydrogen bond is formed. But for each of those high level states, there is a gazillion of small states, how this molecule can rotate internally and everything. So that the volume here really corresponds to the number of ways we can arrange this molecule versus those two molecules. And then I also spoke a bit about the hydrogen bonds, either in vacuum or in solvent. And do you remember the key result there? Exactly. Do you see, you would not be able to see that if you forgot about the left side here. If I'd only asked you, if you tried to understand this by only looking at a protein, it would be not just difficult, it would be impossible for you. So there are a couple of tricks here. Anytime there's a process, you have to compare what is before and what is after and what happens, what is the difference. And the same thing if you have, what happens when you form a hydrogen bond? Well, is there more than one case? And in this case it turns out, yes, there is more than one case. The before state can either be in vacuum or in solvent. Most of these things, if you find them difficult, it's because you try to do too many things at once. You try to combine the salvation with the hydrogen bond formation with understanding the protein structure. So a general strategy for problem formulation start writing things down. Take it easy, separate things. If things are still too complicated, separate it more, this is how you always do in physics. And what you do if, well, if you get to a point where you can't do things more, at some point you might have to assume. And in this case, I assume that, well, I probably don't change the entropy that much between these two states. That's of course not strictly true, right? But the problem is that if you try to be strictly correct, you're gonna be entrenched with all the details. You will never get to the answer. So many of these things have to do with experience, of course. And it's an art knowing what you can simplify and what you can't simplify. But don't be too afraid of assuming. You have to be aware that you did assume things and check in hindsight, was that assumption correct? But most of the things we do in physics in particular is that we assume things. So do you know what Hooke's law is? This is the one thing I promise not gonna be on the exam. If you have a small spring and then you extend the spring, either push it together or pull it apart, do you remember what the force you get from that is proportional to? So the force is proportional to the extension, right? So that the force would be some constant multiplied by delta X. And depending on the side that can have a positive or negative. Is that true? Every five-year-old knows that this is not true because what does a three-year-old do when they get a spring? They pull it apart so far that you break the spring, right? So obviously it's not true. It's completely false. And then we've all been teaching you an upper secondary school and it's Hooke's law. It's a physical law. So what physicists do in general, the way this is super complicated with plasticity and material properties and everything. But in general, you have some sort of equation that describes this in a super complicated way and which we're about that part. How the energy as you distort the spring is. And what physicists do, we know one thing. When you are at equilibrium, when the spring is happy to itself, what is the force on the spring? So the one thing we do know is that equilibrium, we must be at a local minimum. And at the local minimum, the first derivative disappears, right? So what physicists do in that case, well, we know that the first derivative disappears. So let's model the spring with the simplification, we'll just do a second order equation on it. And that's universally true. If the first derivative disappears, so this would be some sort of potential. And the potential is some sort of constant. Sorry, potential is a function of X plus another constant multiplied by the prime, sorry, I was gonna try to do it. There is some sort of first order term, but in this case, the first order term disappears. Then there is some second order term. And in general, the second order term does not disappear. So we stop there. Now this is always true, but the caveat it's only true in a certain range. And that range can be larger or smaller. And what the three year old does is that it finds the limit of that range. But for very large parts of physics, sticking with the simplest approximation you can do works amazingly well. And that's what we did with the bonds too. We assumed that we only, we approximated as a second order equation. And that's why you get all these things in physics that say that some sort of potential is K divided by two multiplied by say, delta X two, which would mean that the force would be minus K delta X. It's just a simplification, first order approximation. Why do I talk about physics? Well, it's gonna turn out in the next derivation we're gonna do, we too are gonna need to learn to simplify things. Don't be afraid of assuming. Try something. What happened? I do this, unfortunately, there's a major shortcoming in the way we teach science in general, probably math in particular, that we present things as if there is that one universal solution and we came up with this in 10 seconds. Sorry, that's not how it works in science. When I sit down and work with equations, I spend an afternoon. And then afternoon, well, it's Thursday afternoon and at five PM, I swear, sorry, this is not leading anywhere, I'll head home. And what do I do when I come in a Friday morning? I try something different. I try to approach it from another side or something. It just says it's difficult to do an experiment in the lab. It's difficult to work with equations. But if I anyway, I try to describe an experiment. I can't spend 10 hours describing all the mistakes in the experiment, right? So we tend to describe the things that worked in the experiments. And it's the same thing with equations. So what I'm gonna do today, we're gonna go through the foundations of statistical mechanics. Not because I expect you to be able to prove then derive this yourself, but to give you a feeling what we do. And I'm actually want you to see that this is not just based on things I'm saying. We can prove these things. And that will leave us some pretty deep conclusions about stability and instability and hopefully a bit more insight about what the entropy is. And we're even gonna be able, this far we've only talked about distribution of static equilibrium, a state A more probable than state B. But we will actually be able to talk a bit about kinetics too, how fast things happen. We're gonna introduce a couple of the partition function and then talk more about free energies. And I don't, well, we'll see. I don't think I will get to activation barriers in alpha helices. Yes, I did hand out the slide copies. So the reason we use statistical mechanics, this is a super simple system. It's still just 500 particles or something and compare this to the amount of molecules in this room. I'm not sure about you, but would you try to count every single velocity of every single part here, right? It's completely incompatible. And yet, I bet that each and every one of you can probably see that there is a difference between the left-hand side and the right-hand side here. And what you are doing, you're separating, when you do that, you're separating microstates from microstates. You said there is some sort of order here and there is some sort of disorder here. But for that particular molecule, that particular molecule is not really significantly different from that one. So this has to do with your glasses and the scale you're looking at things. If you're looking at one molecule, then we're looking at a microstate, either that microstate or that microstate. But when you're looking at the whole collection, you're looking at some sort of disordered macroscopic state and then ordered macroscopic state. This very rapidly becomes too complicated to handle. So what do we do in the lab? Sorry? Sampling. Sampling or yes, that's a computational way of describing it, but I'm thinking of an experimental lab. We measure things, right? And what is that you measure? Average properties. And these average properties are things we call such as temperature, volume, pressure. Well, volume is a property of the day, but they're pressure or something. That makes a lot of sense in the lab, but that is, I can't talk about a pressure of one molecule. The pressure is something I get for the entire collection of molecules. So it makes a lot of sense to simplify things, but that also means when we go to these averages, I also move from the microscopic world to the macroscopic world, which is gonna be so much nicer to deal with. But then we're gonna need to account for the fact that there is a difference between individual molecules and the collection of molecules. And what you can always start to hint here that this is, if you had to guess on the left versus right-hand side, which side has higher temperature? So why is left have higher temperature? Doesn't it feel any hotter?  Why can't you say that that's hotter? You haven't measured it. It is disordered and in particular, you somehow, you probably have a gut feeling that this is moving a lot, right? So that this is changing a lot between different microstates all the time, while that one is probably stuck. So, and that is related to these definitions of temperature. Temperature is really the interchange between microstates. If things change a lot, that corresponds to having high temperature. As the amount of energy goes up, if that means that we suddenly have access to lots of different microstates that you can move between, that is what we define as temperature. And the funny thing is how you know that because that this, we haven't measured it, but you can see it. So you do have a gut feeling for it, if you didn't think so. And then it turns out that that corresponds very closely to what we mean by heat and cold. So what I'm gonna try to do now, I'm gonna derive this for a completely generic system. And I think, I hope not, but I think you're gonna find this a little bit difficult. There are two, three slides. I will take as much time as we need for this. And the point, again, is not for you to know this equation, but it will show you a little bit how we think with equations. So the first thing is hard. What can I assume? So this was fairly easy. When I did this, was it the first lecture and I assumed that gas pillar? Well, then it's easy because we have a system and we can start saying, well, this is my system and here's the gas density. The hard part here is that if you're gonna make something universal, you can't assume anything. And the hardest part isn't really that you can't assume anything. I think the hardest part is that it becomes abstract. But the fact that you can't assume anything doesn't mean that we can't define things. Because somehow we need to start describing a system, right? This, I think, is frequently, it's probably part of a failure of university education. I think what I've seen, I've seen so many students, even if it's, they're outstanding at equations. But the one thing they find really difficult is to apply their equation to a real system. Because then it's up to you to start introducing the definitions. So what do I call my system? What is, first, what is your system? What are the important things? How do I translate the thing that I see here in the world? How, say, how a cable is attached to the wall? How do I translate that to an equation? And that's frequently harder than the equations. So what we're gonna do here is, I will deliberately follow the book very closely here, if you wanna go through this, but the book might not spend that much time doing it. So I'm gonna, it also turns out that we need to look at many different systems. So if I wanna say, if I wanna have a test tube or something, or a protein, whatever, this is my miniature world. And what I'm after here is really describing what you already know as the Boltzmann distribution. How likely is it for this one to assume different states depending on how many such states there are? And let's call this miniature world my test tube. That's the circular. It's a very, very small part of the system. Microscopic part of the system, even. So that's where I'm studying, but then I'm also gonna need some sort of system around that because I can exchange heat, and I can exchange energy through heat with the rest of the world. And what you do in physics, you call something a reference system or thermostat or something. If I could exchange pressure, it would also be a barrier as that. You could even think of this as the rest of the universe, but this is something that is so large that my system is only a small part of this. And if I'm looking at my test tube, you can think of that this might be the air and energy in the rest of the room. If I do a small chemical experiment, the amount of energy this test tube exchanges with New Zealand is probably not that important. But it's some sort of system that's large enough so that in total, the energy of the entire large system, including my system, is capital E, and that is conserved. So there is nothing that goes out of this border and further out. I don't have to care about the rest of the universe. And then I'm gonna get another E, but the problem if I see E and E, you're constantly gonna worry, did he mean lowercase E or uppercase E? So instead of saying lowercase E, let's call that epsilon. Pure convenience.  And that means that I've already, if I say that, I'm interested in how my system behaves at the certain, when this part has a certain energy epsilon. Well, if the total energy is conserved, the rest E minus epsilon has to be the energy in the thermostat. So you see what I've done here? I've started to put some letters on things. I haven't assumed anything. The only assumption that there is some sort of thermostat that is large enough. And if you doubt that, I will pick the universe as the thermostat. And then I just said that there is some energy. Exactly what the energy is. Oops, sorry. They get to hear our lecture otherwise. The problem here is again that these things are hardest in the beginning. Because in the beginning we don't have the definitions yet. So we're gonna need a couple of more definitions here. So what we would like to say is that, well, how likely is it for that to happen? Well, that's hard. But that had to do with these probabilities, right? So that if there are now a gazillion gas molecules here, if this energy happens to be in a state where there are lots of ways where this is likely, where this entire division is likely to happen, that would mean that there are lots of ways we can organize the rest of the system so that my system has energy epsilon. And then it's gonna be very likely. On the other hand, if for whatever reason this division is done so that there are only very few ways that I can organize this system, again, with pure probability there are gonna be fewer ways or there are gonna be fewer ways where that can happen. And that's gonna mean that that is less likely to happen. And that's not that advanced. That's, I think that you will all agree that. So the number of microstates we have in this term is that we're gonna need to call that something. And I, microstates, let's call it M. Again, just a definition. And for now, no, we don't know what that is. We have no idea how it varies with anything. But we know that the thermostat has energy E minus epsilon. So that is a function of E minus epsilon. Whether it's linear or quadratic, we have no idea, yep. No, the thermostat is the rest. The small system is what I'm interested in. But how much energy I have here is gonna depend, or rather, the amount of energy I have here and how likely that is is gonna depend on the rest of the world. I can do an analogy here. Unfortunately, this is gonna be a theoretical analogy. Let's say that I'm gonna randomly hand out money to the students in this class. And then we wonder how likely is it for you to get 37 kroner if I hand out 1,000 kroner? So you can, how likely is it for you to get 1,000 kroner if I randomly hand out money? That's, you probably know that that's relatively unlikely, right? Because then we would just randomly happen to throw all the coins on you and no points on anybody else. And the likelihood that you will get zero kroner is probably also not that likely. So that there's gonna be a maximum somewhere in the middle. So how much money you get will depend on how many ways are there to distribute the money of all the students. So whether you have three students or 30 students around you will matter. So you are the small part of the system but how likely a certain outcome is for you depends on how many outcomes there is for the entire class. But we don't know what these outcomes are. So for now on, I'm still in the face, I'm just putting letters on these. So that there is a certain number of microstates, the number of ways we can distribute the thermostat. We call M-therm and that's a function of E minus epsilon. And just as for the money in the class, the probability for something happening has to do with the number of microstates. If there are 500 ways we can distribute things so that you get 37 kroner, but 250 ways we can distribute things so that you get 50 kroner, it's more likely that you get 37 kroner than you get 50 kroner. So the probability of an outcome just has to do with, we're still counting here. The number of ways we can distribute things. And that really, so the microstates here is counting and the probabilities just means that I'm counting up the microstates. But I still haven't really done anything. I'm just, this is still this conceptually me putting letters and definitions on things but I have no idea what the equation, how this function looks like. And then for now, based on everything you know, let's just define S, which is of course gonna be the entropy. But now we just call this something else. S is a constant multiplied by the logarithm of this function M. And all these things, for now they're just a constant. And that's because we might want the unit for S, but the things that are inside the logarithm can't have units that we just counted. Why do I do this one at the very end? At the point you have no idea. We could try it without this one and we could likely get there. But again, Thursday afternoon we would realize, oh my God, this is not going anywhere. Let's take a step back and simplify things. If I introduce a logarithm here, it will likely be easier. So this is one of those things. I have to dump this on you because otherwise we would spend 10 hours going through this before we realize this is gonna turn out to be convenient. But just as people will sometime tell you in a lab you should add salt here. Trust them, because it's trial and error. It's the same thing here. This will simplify our lives. Yes. So what we wanna get is that how likely is it for that thing to happen? How likely is it for your system to be in a state where it has a certain energy epsilon? So we're looking at- Given the temperature and everything. Given the temperature and everything. Well, given energy, right? If this energy is a certain value and then you have other properties in the environment, we haven't introduced temperature yet. How likely is it for this outcome to happen? Or if epsilon was twice as large, how likely is it for that to happen? So this still has to do- We're looking at ways you can divide energy between parts of the system. And I guess when Boltzmann did this, they didn't quite well. Of course, they know roughly the area they were heading. In your case, we're gonna end up with a Boltzmann distribution. But for now, we pretend that we don't know that.  Let's take one at a time. This is what I did on the last page. So I know, and again, this looks complicated just because they're functions. This has, what's the number of microstates? The number of ways we could divide energy in the thermostat so that the rest of the energy is in my small system. And we know that that is a probability so that has to be a positive number so we can always take the logarithm of it. And then I introduce, say, well, there's this feature S that is gonna be entropy. We don't call it that quite yet. In this case, this will also be a function of the energy in the thermostat minus the part we took in the small part. Completely universal definition. I haven't made any assumptions here. It's just that it's gonna make life convenient. So what can we do with that one? Do you know anything about S or M here? And then we're stuck. Just like with Hooke's Law. In general, we do not know what the shape of what is the energy as a function of a spring. So as physicists, what do we do? We start to approximate a bit, right? Can we start to say something about the orders here or make a serious expansion of this? Well, let's do the serious expansion first and then I'll explain why only the first order matters. So we just take that term. For now, we don't even care about the logarithm. So this is a general, just look at the left-hand side and this is a general function. And if you do a serious expansion of a general function around a value E here, well, first we're gonna have the value of the function itself at E which is the zero-th order term. And then we get the derivative at this point which is the derivative of S with respect to the variable taken at this value, right? Multiplied by the deviation from the point which is minus epsilon. So minus epsilon, multiply that derivative. And then we're gonna continue with the second order term and the third order term and the fourth order term. But here is something that is very convenient. If your system is twice as large in Java, if the size of your system increases, what happens to S? If you take two such systems, how does S depend on the size of your system? Remember the classrooms here. You can add them, right? So S depends on the system size. The larger the system is, the larger S is. How does E, the total energy in the system? And I'm not saying that it's proportional now, I'm just saying that it will go up with the system size. The total amount, if you take two of these gigantic thermostats, is that a one, how much energy would we have? Double, so that S is roughly, let's say that they're roughly proportional because it makes our life easier. So this term is gonna be proportional to the size of the system because it says S. Epsilon is just a small number. So here we have something that is roughly proportional to the size of the system divided by something that's roughly proportional to the size of the system. And that term is roughly independent of the system size, right? The second order term, that's gonna be D2SDE2. So such a derivative, we take S, which is roughly proportional to the size of the system, divided by the square of something that is roughly proportional to the size of the system. So this term is gonna be proportional to what? So if we call the size of the system N, that's gonna be roughly N divided by N square, right? Which is one over N. And then I said, our thermostat was large enough. So N will go to infinity. So we can ignore all those higher order terms. Just as we could ignore in Hooke's law, we choose to ignore things within a certain range. The cool thing with our range here is if N is large enough, this will always be true. And if you doubt that, again, I will say the size of the universe. So if the system is large enough, this will hold. You see the cool thing here? We still haven't assumed anything. We still don't know what the actual shape of this one is. But we know that we can express this as one constant term and then one first order derivative. It's exactly the same thing you do with Hooke's law. And here comes the beauty. And this is the reason why we introduced that logarithm. Now we're gonna do the opposite. Because what I said on the previous slide that the probability of something happening was really proportional to this M, right? The number of microstates. The number of ways I can arrange the thermostat, the universe around me is proportional to the way I will observe that outcome. And we already know what S was a constant kappa multiplied by the logarithm of M. Forget about all the details of the equations. And that means we can divide by kappa. So we do S divided by kappa is the logarithm of M. So M equals the exponential of S divided by kappa. And then it looks more complicated because I'm gonna keep showing all these things that it's a function of something. But M, which is still a function of E minus epsilon, is the exponential of S divided by kappa. And then it looks much more complicated when we have all the suffixes and everything. But we're still just using the exponentials and logarithms here. The math is not complicated. And then we might sigh and say that, well, the only thing we've arrived at now is that we had on the previous slide that we have a relation between M and S. But now we know a little bit more about S. We had that series expansion. So let's take this series expansion and put that back in here to see what we got. So first we have, well, we have S divided by k. But now instead of E minus epsilon, we get that first term, S, exactly at the value E divided by k and then exponential. And then we have minus. But when it's an exponential of minus, we can separate that into a separate exponential. So then we also get an exponential of that term, minus epsilon, that derivative, and divided by the kappa we had there. And again, I understand if you sigh and think that, oh my God, that's complicated. It's not complicated. It looks complicated because you have lots of subscripts and lots of, forget about all the arguments for a second. So M was the number of ways we could divide the system this way. And that was proportional to the likelihood that this would happen. And this would happen is, again, what is the likelihood that I have epsilon amount of energy in my small system? The first term here, well, this is not the function of epsilon. And I was looking at epsilon, right? So the total amount of energy in the thermostats for, as far as we care how, that's a constant. So this is just gonna be some world constant. Forget about it, it's C. So that we just get rid of a bunch of stuff. And then we have an exponential raised to minus the amount of energy I have in my system. I might even do there so that we see it in the recording. Exponential raised to minus the energy divided by K, and then some sort of complicated ugly thing up here. So this is gonna be something. This is somehow a property of the system. And it says how much, how quickly the amount of entropy or disordered raises when the energy goes up. And that, my friends. Remember the definition? That's what we call one over temperature. And at this point, as physicists, we can't really get further here. That is temperature. That is the thermodynamic definition of temperature. And that is the first derivative in the expression. And what you then get is that the microstates or the likelihood that something happens is constant multiplied by minus an energy divided by KT, where T is then what we call temperature. And K is just an arbitrary constant.  But the point is that both Boltzmann's constant and temperature comes out of this. And we haven't assumed anything about the system. This is universally true for any system that has to do with the ways you can divide the degrees of freedom and probabilities how we can sort different things in the system. And you get both the temperature. And the temperature is literally gonna describe this. How easy it is to exchange things. And if you are in a surrounding where you have more energy, it's gonna be easier and easier for exchange things. And that's what you know as hot or high temperature. And then it depends on the energy. So I am well aware. I would not have come up with this in five minutes if I just had sit down and work with it. It takes time and effort. And the point here is that you need to give us much time to equations as you do to other things. It's easy to fit lots of equations in one slide. That doesn't mean that you will understand it in 10 seconds. Yes? The temperature, the temperature inverses?  The obvious thing, let's call this whatever. I know Z, not Z because that's a partition function. Psi, whatever. Let's call it Psi. And then we say that Psi, when things are very cold, Psi would be very small. And then when things move to the infinite hotness, Psi would be very small. Sorry, yes, Psi would be very, Psi would become very large as you go to the infinitely coldest part of the world. And Psi would be very small in the desert. It's perfectly fine. The only problem is that all of us, we have talked about temperature for 300 years. And you had Andrea Celsius and other interview and Lene actually introduced this whole concept of zero degrees when water freezes, 100 degrees when water boils. And now it turns out that we have something that kind of measures exactly the same property. It would be nice to, can we find, we are all used to thinking about high versus low temperature. Do we really want to introduce a new property that is one over that? Nobody will be able to understand it. So the first thing we realize is that this zero point here is gonna be different. Because if you do all your math here, you're gonna write the zero point here corresponds to minus 273.15 centigrade if you do one over it. So why instead of worrying about that and introducing Psi, you know what? Let's introduce another temperature that is one over Psi. And that's gonna behave just like a normal temperature. We can give it units so that one unit here is the same thing as the centigrade scale. The zero point will have to be different. And that's how we introduce absolute temperature. It's merely a convenience. And that's why this property corresponds so closely what you think high temperature is hot, low temperature is cold. In a way, this is good because you're now at the point where you're confused about temperature and that's what I said we would arrive at. Temperature is complicated. It's really complicated. The Boltzmann distribution is much easier. So the probability, just to sum up where we were, the probability of observing this small micro universe, my test tube, the probability that we will observe a situation where I have exactly epsilon energy there. That will correspond, be proportional to the number of ways I can distribute all the microstates in the thermostat so that exactly epsilon ends up in my system. And that was exactly the same factor. So now we don't care about the exact constants here so that the probability is proportional to that, which is the exponential of minus e divided by k and then this thing that would be one over t. Yep. Sorry, which one? That's one or that one? That one? So that vertical bar just means take that derivative, evaluate it at the value where the argument is e. And that's how to do it. That was the series expansion. But again, you don't try to calculate this, right? This is a property of the surrounding of the system that we, you all know this and we call it temperature. But this is really a very complicated property of the system that it's gonna depend on the surrounding of the system. It's gonna depend on the state we have things in.  And that's a C-sethesis. So what you now done, now you know the Boltzmann distribution. I think this is a great place to take a break. You know the Boltzmann distribution and we know that it's true and we haven't assumed anything of the system. And as painful and complicated as statistical mechanics is, this is also the beauty of it. Statistical mechanics will never be proven wrong because you can't prove it wrong. This is not based on an assumption or that we took one more, made something, say, Newton's mechanics and then made it slightly more advanced in the sense of also including relativity or something. There are certainly work that goes on that extending statistical mechanics and combining things with quantum mechanics. But in the limit of very large systems, this will always be true. And that's of course why it's a bit complicated. I think even Einstein, I said that there is only one area of physics that he's convinced that will never be completely overhauled and that's thermodynamics, statistical mechanics because we haven't assumed it's just math. You need to digest that a bit. It's 1030. I would suggest that we meet here at 11 sharp and then I will go through a couple of things what this will lead to and hopefully give you a bit more gut feeling how it's useful. All right, I will continue. I'll jump over those. Remember what I said when I started this derivation that there were some things that we kind of had to assume we had to play with it to see what happened and everything. And the only way to assess whether the outcome was good or not is to decide at the end of this, when we're ready did this lead to something good, productive and useful? And the point is that it did in this case. We were able to derive the Boltzmann distribution. But this is the same thing as experiment. It's not necessarily a failure when an experiment, well it is from one level, but it's not improductive when an experiment doesn't go the way you want. You might still learn something. And then you need to redo the experiment then try something else. And you're probably much more used to experiments and experimental observations in general than you are to equations, but it's exactly the same thing as the equations. It's perfectly okay to try something, play around with it and see where it leads to. The worst thing that can happen is that it doesn't lead to anything and then you just throw that paper, God knows that I've used many papers in my life, then you just throw the papers away and then start over and try to approach it from another way. Just as a way if it doesn't work with NMR you might want to try X-ray. And then people have failed with thousands of X-ray, structure determinations and then you try EEM instead. The good thing with the Boltzmann distribution is that this is going to lead us to some very deep insight about physics. You've already started to see it a bit and in a way that how this leads directly to the F equals E minus T is equation. The reason you got that equation was that this entropy part ended up in the exponent of the Boltzmann distributions and that's why we got F equals E minus T is wrong. So that that equation comes from Boltzmann, they're not orthogonal. So we said that we started out with this small amount of energy epsilon in the system. If we then start to increase the amount of energy, epsilon in the small part of the system, how quickly will the number of microstates increase? Because that's really what this gut feeling is about, right? That if we increase the energy you hopefully already have a gut feeling that the more energy you have, well, the less likely a certain state is gonna be but that has to do with the number of microstates. This gets complicated. But just as we moved, it's very useful to move back and forth between this M on the one hand and S on the other one. So let's try to do that and see, I'm sorry, one more order. Let's see just what happens to the term that is up in the exponential when we increase the energy by kT. So instead of looking at the microstates as a function of E, let's just add one kT unit. So why do we work in kT? Well, even though we have an absolute temperature, right, that T, if we were physicists and you happen to have two constants, you had kappa and T in this Boltzmann distribution, why on earth should we separate them? It's much easier. We can kind of measure energy in units of kT. So this is just really the physicist's way of talking about energy. It's the national unit to think about energy. So we add a small and we already have a gut feeling. What was kT again at room temperature? 0.6 kC, 0.6 kC per per. That's a pretty darn important difference. I'll show you why in a couple of slides. 0.6 kC, which is a tiny amount of energy. If we add that amount of energy, well, you can really just use the series expansion that we had at, so we had this M, the logarithm of M corresponds to the entropy, right, divided by the Boltzmann constant. Just a definition of M versus S. And then we can use the series expansion we had so that that corresponds, that's a small difference from E. So we take the value of the entropy and the point E, still divided by the Boltzmann constant. And then we're gonna have the derivative of the entropy, but let's see, the derivative of the entropy was one over temperature, right? And then we get the value kV, yeah. Where? Here? So I'm just interested in what happens. We already, strictly, we have the formula that is what are the number of microstates proportional to the probability if I have an energy E? But at least for me, that doesn't give me a gut feeling. What I wanna know, okay, if I add or remove energy, how will this change? So will it depend very weakly on energy or it's gonna depend very strongly on energy? Yep? Oh, you're right. This is for any system. You can think of this as our small system, sorry, my bad. Any system you think, whatever your system is, whether the system is the universe, probably hard to add energy to the universe. But this could be a test tube or Sweden or anything. Any system. So if we just add, if we give a system more energy than it had before, that will also mean that the entropy, we should evaluate how much entropy we have as a function of that, because it's logarithm there. And then we apply exactly the same series expansion we had. And the reason we do that series expansion is that we get the horrible derivative, but we already had a name for that derivative. It was one over T. And that T is the same T as we had there. So then it's gonna be S divided by kappa plus K, which cancels with that K and then T, which cancels with that T. So that entire term is gonna be unity. But then the logarithm of S, that was still, sorry, S was still the logarithm of M, right? So we get back, we have the logarithm of M plus one. And that looks a bit abstract. But remember, this is what's gonna end up in the exponent if you're exponential. So anytime you add KT to a system, you're gonna add one in the exponent, which is E. There are E more ways to distribute it. Yes? There? Just let me draw the conclusion first, because in general, we had E raised to the, and now I'm gonna say, well, let's just say, E divided by KT. That's what we would normally have, right? And if I now add a small amount of energy, KT there instead, what that will lead to is really, well, the proportionality there is gonna be proportional to E raised to the power of one multiplied by minus E divided by KT. So if I add KT to an energy here, this corresponds to multiplied, you're gonna get a factor one in the exponent. So I always, any system that you add KT to, there will be a factor 2.7 more ways you can distribute things over microstates. It doesn't matter if it's a test tube or the electrons in an atom or whether it's all the air in Sweden. I haven't forgotten about your series expansion, but I'm gonna do one more thing here. So if you take a torsion, and then you make this torsion, say the trans state of the torsion, a factor KT higher, how much less likely is it that you're gonna be in that state? If you take any state, any, so we have a torsion or whatever, say let's have two states of my molecule, and then I make one of these states a factor KT higher in energy. How much less likely is it gonna be to be in that state now? Sorry? Yes, three. The three is the first order approximation of each. So that any time an energy level goes up by KT, it's a factor three less likely to be there. And KT was 0.6 KKL per mole. It's a very small energy. So one KKL per mole is roughly 2KT. So if you're raising an energy level by one KKL per mole, it's a factor 10 less likely to be there. Do you see again that it helps you to have a gut feeling about this energy? So even one KKL per mole, it's a pretty significant difference in distribution. Now, I will show you your series expansion. So I even got a question about this. Unfortunately, the book is a bit sloppy here. There are a number of differences in series expansion. How many of you have worked with series expansions in math? Some of them a long time ago. Yeah. So in general, if you have a complicated function, you can approximate this function by its derivatives. And the simplest experience was something called the Maclaurin expansion. And then Maclaurin expansion, if you have an arbitrary function, let's, oh my God, what I'm gonna, let's say that this is a function of Y because I'm gonna save the X for later. And Maclaurin's formula, he started, let's say that Y is a very small number. And if Y is a very small number, we can expand this around zero. And if we expand this around zero, we would first have F at the value zero plus the derivative of F taken at the value zero divided by one faculty multiplied by the value Y, which is again, which is a small deviation from zero here. And then we're gonna keep adding terms here plus the second derivative taken at the point zero divided by two faculty multiplied by Y square plus the third derivative taken at the value zero divided by three faculty multiplied by Y cubed, et cetera, et cetera, et cetera. And this goes on. If you continue the series to infinity, you're gonna get a perfect expansion. But infinity takes a while, so I'm not gonna write the rest of the terms. This formula works great if Y is very small. But in general, in life, Y is not very small. And that's a bit of a complication. So nobody uses macro in polynomial. So that the series that you're probably more used to is Taylor expansions. And Taylor expansions, they do the same thing around an arbitrary, they say F of X. Let's expand that. I'm interested in how X behaves close to an arbitrary point A. And then we can write this this way. So we say that first is the value of A in F plus the derivative of F prime taken in the position A. But then we're gonna need to write X minus A there because that's the definition. And then F is, and I won't continue with the third order term. This is pretty much exactly the same formula, right? But then it depends. Well, do I really want to have A here all the time? It's ugly because that wasn't that important. So I can choose to write this in another way. And I think this is how the book does it. So that let's look at the function that is X plus a small value dx. And in this case, it's actually dx that I'm more interested in in X. So I'm gonna expand it around X. And dx is my small deviation from X. This is what the book does. So then we're gonna have F taken at the value X plus F prime taken at the value X divided by one faculty. And then we just get dx there. Plus the second derivative taken at the value X divided by two faculty multiplied dx squared, et cetera, et cetera, et cetera. And the more terms you have here, the greater the area, the larger the region where this will be a good expansion. And for physicists, infinity is usually somewhere around 10. Is it good enough? But the point, and again, remember, for us, infinity less than an hour ago, infinity was one. It's a good first approximation. Actually, no one, two. We had the first order. The reason why these are so useful and the reason why it worked is that then we had this property that because of the way things dependent on the system's highs here, it turned out that for a very large system, everything that's higher, order two or higher would disappear. So if we now do this for the entropy, so we'll let's see S as a function of E plus KT. And let's expand around the value E. Then we're gonna have S as a function of E, just the value plus, and then we're gonna have the derivative which you could write S prime or just dS dE divided by one, faculty, plus the small value, sorry, multiplied by the small value, KT. And then all the higher order terms we ignore and that dS dE was one over temperature. So I just applied the series expansion. And again, the reason why you see series expansions everywhere is that I can't actually, I can't because once in our research we had used third order terms but that's probably the exception that confirms the rule. Nobody, we virtually never go higher than the second derivatives. And what series expansion then gets you to do is that an arbitrary equation that you have absolutely no idea what the shape of this equation is, we can restrict this to a value and then a first derivative. The first derivative is frequently disappears in physics because that equilibrium, there's zero and then there is just a second derivative and that's gonna behave like an harmonic function. So then just say that I have no idea what that exact derivative and everything is but that's just a constant that describes how steep my second derivative is. Change in S with regard to E. Well, so S is here. So what, I know that the book and I mean, so S is a function of something, right? And S is just a function of a single variable. So there's only one way we can take the derivative of that function. And so that in one way is calling this dSdE might be bad because we use that both at the name of the variable and for the specific value of the variable. If you don't like that, just call it S prime. That's fine. But if I called it S prime, you would be confused that I use something else than the book. So that there is only, it's a single variable function. We can only take the derivative in one way. But that is the, if you look at all these functions, right, so that first we have the, that we have taken a derivative, but we also need to, the derivative itself is also functioned. Then I need to choose a value at which to evaluate the derivative. And in all these expansions, I always evaluate the derivative at the point I expanded the round. And if you're gonna write that, a general way to write that in math is to use this vertical bar. And then I just put the value either. So that means take that derivative, evaluate it at the value E. And that would be exactly the same way I could actually write S prime, E. That would be the same thing. Mathematics, there are many ways of writing it. The other thing that you've noticed here is that physicists are frequently a bit sloppy with equations. Yeah, because I know what I mean. And I, both men prove this. I don't care about the specific details that much. That's not an excuse, but it's just as physicists, we are frequently more focused on understanding the system, rather than the math. Well, a mathematician, he would bulk at many of the slides that I showed here. And strictly that's not correct. You need to prove that special case. If you take a logarithm, something, you need to prove that that value is positive and that it can't be zero, et cetera. Mathematics is beautiful, but I'm not a mathematician. What can I say? Go right ahead and photograph it. But you can find this, they're called, Maclaurin, forget about that. Both of these are called Taylor series. And the only thing, do I prefer to work with this small difference here or do I prefer to write out the difference? It's exactly the same equation. It's just a change of variables. Anybody else who wanted to photograph it? There's gonna be one more slide with a couple of equations, but before that, we will look at some other stuff. We haven't shown you the spots, but since S is a function of E, it's a function. We can draw it. We have no idea what it looks like. But for now you can trust me is that, let's create a graph where you have the energy on the x-axis and the entropy on the y-axis. And then there will be some sort of function, the blue one here, which is S as a function of E. Right now we have absolutely no idea what it looks like. And the derivative, again, you have seen derivatives of single variable functions. The derivative there, the tangent here, the black one is, the black bar here is gonna correspond to one over the temperature. And it's gonna turn out that these diagrams will help us understand about things that can happen and everything. This black bar is gonna correspond to the, sorry, the black bar corresponds to the temperature. And if you look at the system, if you were to move above this blue curve, then we would have lower free energy because we would have the same energy but higher entropy, or the same entropy but lower energy. So this space represents lower free energy and this space represents higher free energy. So while we are on this blue curve, at a given temperature, this tangent represents the best free energy we can be at, at a specific temperature. And for this to work, we need a very large system so that you can start to talk about some continuum or something. There is one more, I'm actually gonna, in the interest of time, I'm gonna skip through this a little bit. No, this slide I will go through but not the next one. So what we already had an expression, what is the probability of a system, or your small test tube of being in a particular state I? Well, the weight of that or the probability of whatever we call it is gonna be proportional to the Boltzmann distribution, right? E to minus the energy divided by KT. But this far I've just been hand waving and said proportional to. If you actually want an equal sign here, we're gonna need to normalize it with something. What is that normalization factor? Well, it's fairly easy, right? Just sum up all the possible states we have. So that if this is state I and there are 499 states, just do a sum over all the 499 states. Because in that case, the sum of probabilities must be one. Do you follow me? This has a fancy name and this is called the partition function, which in a way sounds sexier than it is, but you're gonna see this sum now. So you're summing over every single possible state in the system, microstate even. If you know the partition function, you know everything about a system. Because you literally, we just summed up every single possible confirmation the system could be in. It's gonna work great if you're looking at atomic spins or something. For the general world, this is gonna be a fairly large sum. If you're looking at all the particles and all the possible states the universe can be in. But if we know this partition function, we can calculate everything. The energy of your system is simply all the possible states your system can be in, some with the likelihood of being in that system multiplied by the energy. Sorry, likelihood of being in that state multiplied by the energy of a state. The entropy of the system is the sum of all states multiplied by the weight of being in each sub-state multiplied by the energy of that specific state. So again, if you know all your states, we can just calculate the likelihoods and sum it up. The likelihood that you've got one kroner, the likelihood that you've got two kroner, the likelihood that you can three kroner, then you can calculate what is the expectation value for the amount of money I will get. And this could equally be free energy, whatever, any property of the system. If you know these sums, we can calculate anything of the system. Yep. So this would be the energy of the specific state I. But the whole point, any property you have, the expectation value, the average property on microscopic scale is just the sum of all the microstates and what is the weight of that microstate multiplied by that property in the microstate. The sum of all the weights would be one, right? But the likelihood, for instance, if the likelihood of you getting one kroner is 30% and the likelihood of you getting two kroner is 30%, and the likelihood of you getting three kroner is 30%, then the expectation value is gonna be two. And same thing, you sum it up by multiplying the outcome with the weight of that outcome. But you would like to be able to calculate, we still haven't defined what is the entropy of some sort of state, not necessarily microstate, but the sub-state. I will deliberately skip over this a bit, because in the interest of time, I think there are other things that are more useful for us to talk about, but just to give you a hunch that it is possible to derive it. And what you do is that, in a way it's easier than the Boltzmann distribution, but there's a bit more bookkeeping here. So if you have an arbitrary number of systems, how many, how can you divide these systems over different states? And what we're interested is again, the logger, they came out by the logarithm of the number of ways you can do something. What this is gonna end up with is that, this has that with permutations. So how many ways can you pick, if you have 20 bolts and 10 are red and 10 are blue, how many ways can you pick six red bolts and two blue bolts, which is simply mathematical statistics. But it takes a while to go through all of this and we would need 20 minutes to go through it in detail. But it's exactly the same type of distributions here. How can you pick an arbitrary number of systems and divide them over this?  And then you need to apply the Stirling formula to simplify these permutations a bit and then it's even more mathematics. And then for one system, this in the end simplifies to one over and then a product of the weight of each system raised to the power of the weight of that outcome. And that looks a bit awkward. But if you simplify that, you end up with the system that the entropy is a constant multiplied by the sum of a weight of the logarithm of one over the weights. And you might have seen that in the bioinformatics course too. So this corresponds to the Shannon definition of entropy, which is, and let's see if we simplify it. Well, entropy is again, a constant multiplied by the sum of the weight of each system multiplied by the logarithm of one minus the weight. It's a bit awkward to take the logarithm of one divided by something. If you swap that, the logarithm of one over a is minus the logarithm of a. So we can actually put the minus sign here and then we have the weight multiplied by the logarithm of the weight. And the only reason for going through that, I can do it if you're late or if you're interested. If we now take this energy and S, we can actually say that the free energy that can also be evaluated as a sum over all the states in your partition function multiplied by the weight of that specific state. And then we have the energy of the state minus, minus minus is gonna be plus KT multiplied by the logarithm of that state, which you probably will have a gut feeling that looks like the entropy in each state. But again, don't expect to follow this when I did it in two minutes. This we would need 30 minutes for if you want to follow it. The book goes through it in a bit more detail. Why do I even bother showing this? Well, it has to do with there are two ways of defining entropy. Historically entropy came from Boltzmann and then Claude Shannon in the 1960s, I think it was, derived this way so deriving entropy completely from probability. And in modern computer science in particular, entropy is very much related to information contents. So the modern bioinformatical ways we derive entropy are frequently more related to the Shannon entropy, but they do correspond exactly to each other. It's just one of them we got from information and the other one we got from physics. The point of this is that if you know the partition function and know it, you have to know every single state, you can calculate everything of your system, exactly. And that's why the partition function in statistical mechanics, this is a holy grave. If you know the partition function of a system, it's game over. You have won. Yes? But from the way it was being in each state. But you have to know the entire. You can't just know what the sum of it is. You have to know that each state, there are lots of states in the world. There are lots and lots and lots. The sum of all the probabilities we've remembered, remember, that's because we normalize the probability with the partition function. To actually know the partition function, you have to make a sum over every single possible state, microstate the system can be in. Or you can sum over the macrostates. But if you're summing over the macrostates, you need to know the entropy and enthalpy of all those states. Think about these protein simulations I show you. How many states are there? Even for a protein, which is such a small way, there is an astronomical number of states, right? And again, here you have to account for all states. This includes the states where two atoms are exactly overlapping. This includes the states that would correspond to nuclear explosion. We need to go every single possible state, no matter how unlikely they are. While this is a holy grail, the problem is that it's a holy grail because just as a holy grail, we can't get them. Unless it's a trivial system, you're never going to understand the partition function. But the point is that if you know the partition function approximately, we can calculate everything, for instance, the free energy, approximately. And well, that doesn't sound so good. But the problem is there are some approximations that are better than others. If you do a simulation, for instance, no. We're not going to simulate the part where the protein is undergoing anatomic explosion. But if we cover most of the parts of phase space, if we cover most of the relevant parts, then this approximation will likely be pretty good. So that everything we're doing we're simulating, it's essentially that we're approximating the partition function. And that is why simulations are so cool, because computers are starting to be really fast. So they can do a fairly decent approximation over cases that we would not have dreamt of 10 years ago.  It turns out that we can make more predictions from these very simple entropy versus energy plots than you might think. And in particular, we can tell you what systems are realistic, what can happen versus what can't happen. So if a curve looks like one of the, oh, sorry, I'll make sure that it shows up in the video. In these cases, both of these curves have negative derivatives, right? And that means that one over the derivative is also going to be negative. So both these shapes would correspond to negative temperatures. Can you have negative temperatures? What forbids you from having negative temperatures? The temperature, nothing that I've said that corresponds to, that temperature has to correspond exactly to energy. It's the derivative of entropy versus energy. Well, but this is the derivative, it's not the entropy. Well, so there's one key thing here. So for example, I'm pulling your leg a little bit here. There's nothing formally in the equations that forbids us from having negative temperature. There is one important caveat that I've always said before we look at these things, equilibrium. And all these things about free energy, right? And they usually apply to equilibrium systems. So what would happen if you were here? Again, sorry, if you are here in the middle. The upper left part here would correspond to lower free energy, right? So if you were here in the blue curve, what would you like to do? You would move along the curve. And here too, if you start that, you would rapidly try to move there. And this can happen. So if you're looking at, for instance, a gas expanding or something, when you're not under equilibrium, you can have a negative temperature. But it doesn't mean anything. It's just that the thermodynamic definition of temperature would be negative. But strictly speaking, when you're at non-equilibrium conditions, temperature can be negative. But we're never going to see that because it's not a state we can capture. It's not equilibrium. You can't stop the reaction halfway and see what happens during this expansion. So that it's a theoretical exercise. You will never be stable under those conditions. You can't have an equilibrium there. In this case, we have a slide over. This is a local maximum of free energy, right? That if you are at that particular stage, you have a well-defined temperature. And if you don't move, this is like balancing on the edge of a knife. And the second I start to move here, I'm going to fall down either here or here. And in both cases, I will move to lower free energies. So technically, that can happen if you're right at the sort of peak of a transition barrier or something, which you're not going to be long-lived. So here too, I would say this is a bit of a theoretical exercise. So technically, you can be at equilibrium here, but any epsilon deviation from equilibrium is going to cause you to fall down at other side. So that it's also not really something you're going to observe in an experiment. So by now, we've started to exclude most of the blue curves you can imagine before we've even seen any real curve. So for a real system, as I already spilled the beans, you're going to have this region of lower free energy. And again, if you don't follow that, is that if you are at that point, if I move up, I will gain entropy without losing energy. And if I move left, I'm going to get to lower energy, but staying in constant entropy. So by definition, anything above this to the upper left of the tangent here, which is the temperature line, is going to be better free energy. And anything below it here is going to be worse free energy. So when I am at this point, I'm pretty happy. At this particular temperature, it's as low free energy as I can get to. And then I can move along the line. This corresponds to lower temperatures and this corresponds to higher temperatures because I changed the slope. And I would forgive you if you're yawning here because this sounds like a completely theoretical exercise. But now we're going to do something with this. So if I only look at one of these things, it's going to be a stable state. But what happens with system in general when we start changing the temperature? We change the properties of the system, right? And imagine if I start out at one energy here, E1, and then I have some sort of temperature, and then I keep adding energy to the system, for instance, by heating it or whatever. And then I'm going to move to a state with higher energy, and it's reasonable that the slope there is lower because the temperature is higher, right? So here I have moved along the blue line when I added energy. As I do that move, I can also draw that this corresponds to temperature. The exact shape here is not that important, but at the point I will go up in temperature. And you probably accept that this is going to be a completely continuous plot that I can move slowly along this blue line, and any intermediate state here is fine to stop in. So if I then start to draw what is the likelihood of each of these states as a function of the energy, I will start out here at lower temperature. When I increase the temperature a little bit, I will be halfway, and at very high temperature, I will have moved all the way. So everything is gradual and smooth here. What does this correspond to? Can you think of an example of this type of process? Well, melting, not phase transitions, skip phase transitions, it's very simple. If I have water 20 degrees centigrade, and then I heat it to 30 degrees centigrade, there is nothing special that happens. I can stop at 21, I can stop at 27.493. Everything is smooth and continuous, and any state on the way there is also stable and fine state. Now, there is nothing fancy here such as a phase transition, but I'm definitely changing the properties of the system. Smooth and nice. I'm boring. But we have to start with the boring stuff. But let's now say that we do something else here. Closer related, what if we have one energy? And locally at this state, we have a nice stable point. You see that the curve is under the black slope all the time. So this is a nice stable state. And then we have a higher energy where it's also nice and stable, but between this there's something horrible that happened. Do you see that the curve changes shape there, right? So that the pink line here is above the curve, so we can't really be stable at these points. So if I move here, I can be stable here, and then there is some unstable region here, and then I can be stable here again. The energy will increase all the time. So there is nothing really special that would happen to the energy. But if I drew that in terms of what I can be, I can be stable at energy one, or I can be stable at energy two, but I will never be stable in this area between them because that's like being on the edge of the knife. So that you will never see, if you try to stop this halfway through, you would see half the system at lower energy, half the system at high energy, you would never see anything halfway. But there will be some sort of small region here, delta E, where you can coexist. And this corresponds exactly to what you said, boiling, for instance, or melting of ice. You can be stable as ice, or you can be stable as water, but you're not really gonna be stable as half ice water. Any molecule will either be in the ice phase or the water phase. So what is delta E? So what is the region over which water melts? There is something that's a problem with the equations here, right? What do you know about ice melting or water freezing? Does it happen over a region? It happens at a specific temperature, right? So obviously the physics here is completely flawed. Well, or is it? It turns out you can actually calculate this. The book goes into some detail of doing it, and it's more serious expansion, which is not difficult, but I think I've given you enough equations today. You end up with a very simple expression that the range and temperature over which this happens is roughly four kB, both mass constants, multiplied by the temperature squared, the middle range of the interval, and then divided by the difference in energy, E2 minus E1. And we can put some numbers to that. So if you do this for water, let's say a typical water sample, what is T? Roughly 300 Kelvin or so, right? That's roughly where it freezes. And a typical sample of water, that's one kilo, right? A microscopic thing. So what is the difference in energy between one kilo of water versus one kilo of ice? That is the melting temperature in the ballpark of 50 kilocalories. Not per more, 50 kilocalories, period. And if you put that in this equation, you're gonna get a delta T, which is roughly 10 to the power of minus 23 Kelvin. And can you come up with a good first-order approximation of the size of that interval? It's effectively zero, right? So for all intents and purposes, when we're working with macroscopic systems, transitions like this happen at a specific temperature. You're never gonna see the interval. But if we do this for a protein, is that? Let's say, just for argument's sake, say that a protein actually did go through a phase transition like this, we haven't said it yet. T would be roughly the same, whether it's 300 or 330 Kelvin, I don't care. But energy now might be, say, ballpark of 10, or let's say 50, just to be here, kilocalories per mole, which is a much, much, much, much, much, much smaller number. 10 to the power of 23, smaller, roughly. So for a protein, small molecular systems, delta T might be in the order of 10 Kelvin. And suddenly we actually have a transition that would happen over a range and temperature here that you would see this. So the width of this interval is gonna depend on the energies in the system and the temperatures. So what do you think this is? This is a first-order phase transition. And this is how you define phase transition in physics, that you're moving from one state here that is stable over a region that is not stable to the second one. There are slightly more formal definitions that have to do with exactly the shape of the energy. And just to make sure that we don't confuse you too much, there are tons of other changes too, and we're not gonna go through them, but there are many, many, many forms of phase transitions. But we define phase transitions from this, and how the entropy changes as a function of energy. Let's see, I have 20 millimeter, oh, it's actually, this is good timing. So what I'm gonna spend, I will deliberately skip the parts of the alpha helices which are the last 10 slides or so.  We already talked about this a little bit this morning. What determines when things happen and when are things stable? It's easy to talk about stability or instability or whether the reactions happen or will happen, but when you start looking at it, it's a bit more complicated, because either you can say that things are absolutely, they will happen or they won't happen, or you can talk about probabilities. But in addition to probabilities, it also has to do with how fast things happen. For example, will I die? Yes, I will, hopefully not this afternoon, because then you're gonna need another lecture tomorrow, but I will die at some point, and so will you, sorry to say. So in real life in biology, the time scales are also very important.  So the Boltzmann distribution really only cares that at equilibrium, eventually what will happen? If state A has a lower free energy than state B, eventually you will reach a point where state A is more likely than state B, but eventually can be a very long time. And there is this famous quote, at equilibrium we are all dead. And in real life in chemistry, kinetics is also important because that's just how fast do things happen. And in many cases it's more important, well yes, but will it happen fast enough that it's relevant? And if it won't happen fast enough that it's relevant, I can ignore it. And the problem is that this far we have completely ignored kinetics, which is very bad for biology in general, because time scales of biology 100 years are much more limited than the time scales of the universe. The good thing is that we can partly solve kinetics with the Boltzmann distribution too. So in kinetics, we need to simplify things horribly. And the simplest thing, let's start, we have some sort of reaction. We start with some state on the left and we end with some state on the right. You could call this A and B and I actually like to call them A and B, but it's very common to say, let's, you know what, if this is a reaction that's happening, we can say that we have a coordinate and we start at zero and you move to one. But that's just to put a number on it. And if it's a straight downhill slope we have free energy from zero to one. It's fairly boring because then it's gonna happen right away. The interesting reactions are the ones there is some sort of barrier between A and B so that to get from zero or A to B, we need to pass this hash mark, the barrier. If this barrier is very low, we're gonna go over all the time. If it's very high, we will never go over. So exactly how high this barrier is is gonna regulate how fast it happens. And then there are more complicated cases where we have multiple steps and everything, but let's ignore all those and just focus on the very simplest case where there's one barrier we need to go over. So what do we need to happen to go over this barrier? How much energy do you need? Why does it depend on the barrier? You're right, but then what I'm looking for, to get over the barrier, what is the first thing you need to do? What is that you need to get through? To get to one, if you are at zero and you wanna get to one, where do you have to go first? And well, and what is that 0.5? You need to get to the top of the barrier. If you don't get to the top of the barrier, do whatever you want, but you're not gonna get to one unless you first get to the top of the barrier. Let's start looking at that. So we have a state zero here, and then we have a state hash mark there. And then let's say that there is some sort of free energy here, right? If this is delta F, or sorry, this is F, the difference between zero and hash mark, let's call that difference in free energy delta F. So the likelihood that we can get to the top of the barrier or the fraction of, if we have lots of molecules here, the likelihood or the fraction of molecules that are gonna be at the top of the barrier, we can say that that's N hash. And again, then we just use the Boltzmann distribution and say that the fraction of molecules that are at the top of the barrier is roughly, well, some sort of constant, proportional to the total number of molecules and then the Boltzmann distribution, e to the minus the relative energy, minus delta F hash divided by kT, as simple as that. And then we can't really get further, because we don't know exactly how fast these reactions happen, right? But it's gonna tell you what fraction of the molecules at one point in time are there. But we don't know how long it takes for each and every molecule to get from zero to the peak of the barrier. But you know what, let's say that I think it's reasonable to argue that it's gonna take just as long time for the fifth molecule to get from zero to the top of the barrier as it took for the first molecule. So let's just say that there is some sort of fundamental time and let's just call it tau. It's a constant. And that describes how long it takes you to get from zero to the top of the barrier. So that's gonna be the time it takes for one molecule to go over or the molecules that were up here. But let's say that, let's say that N was a thousand molecules, large number of molecules. And then the likelihood that a small number of molecules will be there is proportional to this. The time it will take, order of magnitude it will take for all molecules to go over. That's gonna be roughly all molecules divided by the fraction of molecules that were there at one time. This is an approximation, very rough approximation. So one percent, if this would mean at my particular energy, roughly one percent of the molecules were there. And that would take, let's say five nanoseconds. The time it would take for all of them, well, this was one percent of the molecule, let's say roughly 100 times that, right? And that doesn't account for all, as you have fewer molecules here, the number of molecules will decrease. You can make this mathematics as complicated as you want. But the point is that to keep it simple, let's keep it simple. So that's gonna be, well, some sort of constant divided by N hash is really gonna be, suddenly this whole expression says that not in the nominator, but in the denominator. And the reason why I don't care that much about the specific constants is that I still don't know what that time scale is, right? Whether it is this fiber, there's gonna be some sort of constant here that describes how long it takes for molecules. So that's now gonna be that, the time it takes for the reaction to happen is gonna be the time it takes for individual molecules or something to happen. And then multiplied by an exponential now raised to plus the free energy divided by KT. So that means that the higher this free energy is, the longer it will take for the reaction to happen. And that hopefully also rhymes well with your gut feeling, right? If the barrier is very high, it's gonna take as much longer to get over it. And it will even depend exponentially on the barrier. And that's why I have to go through the door if I wanna get out to the corridor. So the time it takes roughly for the entire system or a sizable part of the system to go over is some sort of fundamental time constant, the time it takes for the process to happen. Multiplied by the free energy barrier divided by KT. And again, it's a plus, super important. And there are two ways we can talk about this. Either you can talk in terms of time how long it takes or you can talk in terms of rates that is how many molecules per second go over a barrier. It's entirely up to you. They say the same thing, that if there are two ways you can get across the barrier, you can sum up transition rates because five molecules per second take one path and three molecules per second take another path. If we sum them up, it's in total eight molecules per second. So sometimes we will talk about times and sometimes we will talk about rates, but they say the same thing. So let's see, we have 10 minutes. I think I will have time to... So let's see if we can apply this very, very simple to alpha helix formation. Yep? Yes, but I made a ton of other... If we only had a factor two error here. The problem is that the first obvious things as more and more molecules go over here, right? One problem is that there are going to be fewer and fewer molecules remaining in state zero. I didn't even account for that. We're talking about order of magnitude. All I care about is the shape here. And I care that it's... There's going to be a ton of stuff in this time constant whether it's just a factor two or a factor of 10. But the general dependence of the free energy is that it's going to be proportional to the exponential of the free energy barrier. That's really only I care about. All the other constants I choose to merge in this tau for now. I'm just going to show you how we can think about alpha helix here, little secondary structure here. And now we're going to repeat that tomorrow. So just to show that the equations are actually useful. You already knew about this hydrogen bonding pattern that is I2I plus four. So if we look at the small piece of an alpha helix here, we have residue zero, one, two, three, four, five, et cetera. I'm a programmer, so I start counting at zero. The residue C is still fairly flexible on its side and the last residue is fairly flexible on its side. So residue zero is hydrogen bonding to residue four. However, while residues zero and four are somewhat flexible, once I have formed that hydrogen bond, residues one, two, and three are completely locked into place. They can't move at all anymore. Both the ramachandran angles are completely fixed in the alpha helix state. So one residue here for every hydrogen bond I add, I'm stabilizing three more residues. So in general, N residues are stabilized by N minus two hydrogen bonds. And then we can start to think of it again at the very high level. The total free energy of an alpha helix then, that would be, well, the free energy we have in the alpha helix minus the free energy we have in the coil. And first, the second term we can start with that. That's why it's actually easier. There's going to be some sort of entropy loss from being in an alpha helix, right? And that's proportional to the number of residues we have in the alpha helix. And what I said on the previous slide that it's going to be for N residues, there will be N minus two hydrogen bonds. And then I will just say that this is a free energy of a hydrogen bond. I don't really care exactly what it is. And then there are some, that means that but there's one term here, two FH bond, minus two FH bond even, that does not depend on N. And then N multiplied by FH bond and N multiplied by the entropy there, both of them depend on the number of residues. So we're going to have one term here that is constant and one term that is proportional to the number of residues. And we can choose that this is some sort of initiation free energy that I'm always paying or the F in it. And then this is some sort of free energy corresponding to elongation when I'm increasing the length of the alpha helix. And it's obvious that I can separate the elongation per residue multiplied by the number of residues. And then in principle I can do this, make this very complicated. Let's skip this equation. But the point here is that there is one term here that's proportional to when I start it and one when I continue it. I will go through this more detail tomorrow. Ah, actually, you know what? I will draw this instead. Can we say something about the alpha helix here? Sorry, I thought I had a slide about this. If we put the number of alpha helical residues on the x-axis here and then the free energy here, there was some sort of constant term. Let's move back. It's probably easier. There was some sort of constant term and then something that is proportional to the number of residues. So the question is, what are the signs of these? So is it good to form a hydrogen bond or not in general? In general it's good, right? So FH bond is negative. So minus two FH bond is always going to be positive. And that means that when we move from zero to one, we always pay. We go up in free energy. It's never good to start forming the alpha helix. And then after that, there are three things that can happen. We can go continue up. We can be constant or we can go down. Right? And that's gonna depend on the side of this FEL. If FEL is positive, a delegation is positive, we will continue up. If it's zero, we're gonna stay there. And if it's negative, we're gonna go down. So which one is it? Well, in general, it depends on residues. But if we look at residues that actually form alpha helices, if this was always positive, yeah, I think we could stop this course and head home because then we would never see alpha helices. Obviously that can't happen. Same thing here. Well, yeah, you would pay and then you would never get anything back. That doesn't lie like a great deal to me. So that it has to be, we have to go up initially. We know that from the properties of hydrogen bonds and then we are going down. And at some point here, there is even gonna be a net gain that is better to be alpha helical. And this probably happens around 10 or 15 residues or something. But the point is that this delta F here, that's not the delta F, that's the F. This delta F tells us something. What does this delta F tell us? Exactly, right? From this delta F, we will be able to say how fast will things form a helix? If this initiation energy is very high, then it's gonna be slower to form the alpha helix. And if it's lower, it's gonna be faster to form the alpha helix. And here is the point. You asked about a factor two. Do we really care whether things take one or two microseconds? No. We care whether they take a microsecond or a nanosecond. That's a factor of one million. Or whether it takes a microsecond or one second. So that's the point. And if we're thinking about things that are six orders of magnitude different, even yes, technically I should have accounted for the fact that as some of my molecules start to cross this barrier, there are some molecules remaining so that the rate would actually go down as I'm depleting the original state of it. Come on, we're talking about, we already have a factor million we worry about. That might be another factor of two. So yes, so sue me. I might be off by a factor of four. One or four microseconds, it's a bit faster than a second. And that's also why, when you first look at it, these approximations, they look so completely horrible. But when it comes to timescales in particular, the only thing we care about are the orders of magnitudes. And that's why there are so many other things that will go wrong in experiments and anything otherwise. So we would just confuse ourselves. We would end up with more complicated equations if we tried to do things more advanced. So don't be afraid of simplifying horribly. We have one minute remaining and I'm not even gonna try to cover the other slides. But this was to whet your appetite a bit. This is the reason why we are interested, these states, they're even called something, they're called transition states. So they're horrible, bad states that you would never see these states, right? Because if you are here, as you said, you're likely either you're gonna fall back down to the left and unfold the helix again, or you're gonna fall down on the right and form the helix. So that these states are, from one point of view, they're completely uninteresting because you will never, ever observe them experimentally. It's a local maximum in free energy. But because they determine the energy that we must pass for something to happen, these transition states are gonna determine everything whether things happen or in particular how fast they happen. And that's where we're gonna study them a bit, both for helices and sheets. And then it turns out that based on this, we can even draw some conclusions about what is the average length of helices and how stable are they, simply based on CD sp