The Science of Everything Podcast - Episode 120: Computational Chemistry Part 2

Episode Date: July 31, 2021

Building on the previous discussion of Hartree-Fock Theory, I discuss the inclusion of basis functions to produce the Roothaan equations, and the method of solving these using self-consistent field me...thods. I then provide an introduction into techniques to incorporate electron correlation by adding Slater determinants, focusing on the Configuration Interaction method. I then provide a brief overview of semi-empirical methods, Density Functional Theory, and molecular mechanics. Recommended pre-listening is Episode 119: Computational Chemistry Part 1. If you enjoyed the podcast please consider supporting the show by making a PayPal donation or becoming a Patreon supporter. https://www.patreon.com/jamesfodor https://www.paypal.me/ScienceofEverything

Transcript
Discussion (0)
Starting point is 00:00:33 you're listening to The Science of Everything podcast episode 120 Computational Chemistry Part 2. I'm your host, James Fodor. This episode, we will continue from the previous episode, which of course is the prerequisite, and talk about computational chemistry, particularly we're going to continue on from where we left off last time, and talk about how you can actually make proximate estimates of what your wave functions are going to be, which you can then use to solve the Hartree-Fog equation. So we'll talk about the basis functions that are used for that purpose. I will then go on to talk about methods for incorporating electron correlation
Starting point is 00:01:11 in order to increase the accuracy of these methods and some of the techniques that are used there. Then, once we're done with that, I'll talk about some of the other approaches to estimating molecular structure and energies. Particularly, I'll talk about semi-empirical methods and density functional theory, which are kind of like two different takes to ab initio calculations on how to work out, molecular structure and energies. And finally, at the very end, I will talk about at a higher level, something called molecular mechanics or molecular dynamics, which is a method of simulating larger molecules using classical mechanics. So there's quite a bit to get through.
Starting point is 00:01:48 And as I said, the episode 119 part one of this two-part series is an absolute prerequisite in the sense that you probably won't be able to follow what I'm talking about if you haven't listened to that. So strong warning there. If you haven't done so, please go back and listen to that first. That being said, let us get started by just briefly reviewing where we got up to last time. So remember, the whole sort of premise of what we're trying to do here is to solve for the molecular wave function of some molecule, a bunch of different atoms bonded together. And what we observed is that you can't just kind of solve for the atoms individually and then sort of smush them together because the electrons in the neighboring atoms interact with each other and they form chemical bonds
Starting point is 00:02:27 and the electrons become delocalized and so forth. So what you need to do is you kind of need to solve for the molecule as a whole, and you need to solve for the molecular orbitals of the electrons in that molecule as a whole. Doing so requires the use of complicated techniques. We've talked about ab initio methods, which basically starts from the very beginning, without making any assumptions, at least at the outset, to try to calculate the correct molecular orbitals for a given molecule using Schrodinger's equivalent.
Starting point is 00:02:57 from quantum mechanics. And we talked about how to derive what's called the FOC operator, which is basically like the energy operator for a single electron in a molecule, and talked about how once we've got the FOC operator, which is basically a combination of potential kinetic energy and interaction terms between the electrons, then we can apply that to the molecular orbitals for our molecule and get back a series of energies multiplied by those molecular orbitals. So basically we get an eigenfunction equation. F times the molecular orbitals gives the energy times back the molecular orbitals. So that's the Hartree-Fock equations that we talked about at length last time and worked towards deriving. Once we've got our Hartree-Fock equations, that provides the
Starting point is 00:03:43 basic ingredients for then solving for the molecular orbitals. Once we've got our molecular orbitals, remember, we can stick them into our slated determinant, which allows us to construct the molecular wave function out of the molecular orbitals. So the basic ingredients are the FOC operator gives us our Hartree-Focke equations. We solve those to get our molecular orbitals, which we then stick into our isolated determinant to get back our molecular wave function, which tells us everything we might want to know about the molecule, and that's the ultimate thing that we're trying to find here. But the thing that we got stuck on is how do we solve for the molecular orbitals?
Starting point is 00:04:19 We've got an equation, the Hartree-Fock equation, which if we can solve, will give us our molecular orbitals. We know that we have to solve that iteratively, because basically the fog-operatorial turns out to depend on the very molecular orbitals that we're trying to find. So we have to start with a guess and then solve the equation and then use that to update the guess and then feed it back into itself until we converge to a solution. So that's an iterative technique. But where do we even start from? Like how would we even have a clue as to what to guess for these molecular orbitals? I mean, they could be anything theoretically that they just function over space. So what on earth could they look like? Like how would we even know where to start? Well, the answer is that we're going to use basis functions. Let's think about what we're going to use basis functions. Let's think about,
Starting point is 00:04:57 what a basis function is. So a basis function is a function, you know, a mathematical function, which we combine together to give us our molecular orbital. The number of basis functions that you use is kind of up to you. And generally, the more basis functions, the more accurate your results will be, other things being equal. But what are these basis functions? I mean, sure, there's some function over space, but like what do they look like? Well, the thing is, you can choose what form the basis functions take. The idea is that you're going to add a bunch of them together to give you your molecular orbitals. So they should be flexible enough to represent the types of shapes that you think your molecular orbitals will look like. So a good starting point here would be to pick the atomic
Starting point is 00:05:36 orbitals for hydrogen. Remember I said we know what the orbitals are for atomic hydrogen by itself. The trouble is when we start to add in extra electrons beyond the single atom of a hydrogen, then it gets complicated. Well, how about we start with our atomic orbitals for our hydrogen as our basis functions? And then we can add a bunch of those together to form our molecular orbitals. So the basic idea of your basis functions is that you take your basis functions and then you just do a weighted sum of those basis functions. So say I've got an S orbital and a P orbital from my hydrogen atom and I use those as my two basis functions just as a simple example. So I might give a weighting of 0.2 to my S orbital and 0.8 to my P orbital. The weightings have to sum to 1. And that then would give me
Starting point is 00:06:24 when I add those two together, according to their weightings, an overall value for my molecular orbital, which is basically a combination or a compromise of the S and the P orbitals. Now, in practice, your basis set is going to be more complicated than that. It's going to have more than two in it. It may have three, four, six, or more basis functions in it. The idea is the more basis functions you add in, the more accurate your results are going to be. Now, I said that a good starting point would be to use your atomic orbitals from hydrogen, and these are called Slater-type orbitals. after, I think it's just the guy who came up with them, physicist John Slater.
Starting point is 00:06:58 They're a generalization of the functions used to describe orbitals for an electron in a single hydrogen atom. But for various complicated reasons that we didn't go into here, Slater type orbitals are often not used these days, or at least they use less often. Instead, it's more common to use what are called Gaussian basis functions. Primitives, they're also called. Now, a Gaussian function is kind of like a Slater,
Starting point is 00:07:24 type orbital, but it has a slightly different shape. For those who are familiar, a Gaussian is the shape of a normal distribution, so like the bell curve. And basically, it decays more quickly than a slater type orbital. It has some other features as well, which make it a little bit easier to work with mathematically. So that's the basic reason for using Gaussian basis functions instead of slater type orbitals. It turns out that even though a Gaussian function doesn't necessarily have anything to do with a hydrogen atom or anything to do with wave functions, it's just a really general, really flexible mathematical form, which when you add a bunch of them together, can give you a wide range of functional shapes. And that's kind of what we need in order to use as our basis functions to estimate our molecular orbitals. We need flexibility because we don't really know beforehand what the right shape is going to be. There are some constraints. We know that a wave function has to be continuous, so it can't be a function
Starting point is 00:08:13 that just sort of jumps around from one spot to another. It has to continuously vary, and Gaussian's do that. Also, in general, the wave functions are going to be concentrated around where the nucleus is, and then they'll decay as you get further away. So we want a shape that sort of has a peak in the middle and then decays towards the edges and Gaussian also have that property. So there's some basic properties that we can sort of guess at that we know we'll need and can then pick functions that have the right shape. But beyond that, we don't know the specifics. And so we're just going to use Gaussian as a very convenient kind of one-size-fits-all function, which we can then adjust as appropriate. So there's different parameters that we can adjust in the exponent and as the coefficient in the Gaussian
Starting point is 00:08:51 function and basically those can be adjusted as needed to give us a set of basis functions that we can then build the orbitals from. Now, I'll talk a little bit more about the basis functions just in a moment, but just so that we know where we're at, what we're going to do is we're going to grab our Hartree-Fock equations and instead of our molecular orbitals, we're going to replace them with an equation that states that our molecular orbitals are now written as a sum, a weighted sum of the basis functions. So basically, each molecular orbital will be written as the sum of some coefficient multiplied by the basis function, then we'll add all those up. So we stick those as our solutions for the molecular orbitals into our Hartrefourke equations and rearrange and simplify.
Starting point is 00:09:35 And once we do that, we arrive at a new set of equations. It's basically the same old hydrophoc equations, but we've represented them now in terms of the basis functions instead of our molecular orbitals. These are called the Ruthan equations. Now the advantage of doing this is that now we actually have some structure about how to solve these equations. Because before we just had these unknown molecular orbitals that we had no idea how to solve for. But now we've got we've gotten rid of those molecular orbitals and replace them with a set of known functions, which are our basis functions. Like we know what those are. So those are just sort of stuck in multiplied by a series of coefficients.
Starting point is 00:10:11 And those are just numbers, right? A series of numbers, which then are used to weight the different basis functions together. So now the problem has been significantly simplified. Instead of having to solve for these completely unknown molecular orbitals, instead, all we have to do is solve for a set of coefficients, which are just single numbers. So now the ruthane equations give us the structure that we need to actually solve the problem. All we have to do then is start with an initial guess of what these coefficients might be,
Starting point is 00:10:38 and really this could come from anywhere, then stick the result into the ruthane equations, and then we will see what result that gives us back. out again for what the coefficient should be. It's called a self-consistent field method. Basically, we make an assumption about what the fields should be, or in other words, what the coefficient should be of our basis functions, put those into the equation and see what results it gives us. Of course, the first guess is likely to be very wrong, right? But that gives us a new guess based on what number comes out in the equations, which we then use as our updated guess.
Starting point is 00:11:08 We stick that back into the equations, turn the machine again, solve for it, and see if that was what we started with. Again, it probably won't be, so we need to stick it back in again. doing this until we put in a set of coefficients and then the results come out again and they're the same as what we put in. This is telling us that we've got a consistent field. We've got a set of coefficients that actually solves the equations. Whereas if we put in the wrong set of numbers, it won't actually solve the equation. So we're like, well, this is clearly the wrong set because it doesn't actually work with the equations. We need to get a series of coefficients that solve the equation and actually work with the FOC operator and the form of the equation that we know
Starting point is 00:11:42 is correct, or at least approximately correct, from the Hartree-Fock theory. So this is as I said, called it the self-consistent field method. And it basically is a method of guess and check, if you like. We guess what the coefficients will be. Stick them in and see if it works. If it doesn't work, well, within, and we take the updated guess and stick it back in and keep going until it does converge to a set of values that's consistent.
Starting point is 00:12:02 Now, note that there's no guarantee that in general, self-consistent field methods will actually converge to a set of coefficients that is sort of consistent. Perhaps they'll keep going in a cycle, or they'll just never converge. They'll just wander around forever. Now, often they do converge. but sometimes we have to use pretty sneaky and sophisticated numerical or chemical tricks
Starting point is 00:12:21 in order to help the process long and get convergence. For example, something that we might do is use a very simple level of theory, so a small number of Gaussian primitives or basis functions, in order to get an initial guess for the molecular orbitals. Now, the initial guess won't be very good, but at least it will be somewhere to start with. And then we might use that initial guess as a starting point for a more complex level of theory that has many more Gaussian basis functions,
Starting point is 00:12:45 which helps those, that more complex theory, to converge more easily than if we just picked something at random. Another trick that can be used is if the molecule has symmetries, that might help to simplify or modify the basis functions that are used, because if you know that it has to be symmetrical, then that can rule out, you know, certain basis functions that are not symmetrical, for example, that you won't need to use. So there's these different tricks that you can use to help converge, and this is one, like, one of the skills of a computational chemist is to know sort of how to coax these complicated sets of equations into converging to a set of solutions that actually works. Now, I mentioned that I was going to say a little bit more about the basis functions, and I'll do that right now. So remember, the whole point of a basis function is to give some structure to the form of the molecular orbitals. We take our basis functions, we multiply them by a set of coefficients, and that gives you a molecular orbital. Each molecular orbital will have a different set of coefficients, but the same ingredients, the same basic ingredients.
Starting point is 00:13:35 Basically, you start your basis functions are your ingredients, and then you combine them in different ratios to give you each of your different molecular orbitals. I also talked about how I originally Slater type orbitals were used, which is basically like hydrogen atom type orbitals, but now Gaussian orbitals are more commonly used. There's more to it, though, because there are many different types of galsions, and typically what we try to do is use a multiple stage process. So basically what we'll do is try to replicate the, say, S or the P or the D orbitals from a hydrogen atom with a certain number of gals. The reason we'll do that is just for mathematical simplicity. It turns out it's easier to approximate Slater-type orbitals with a few Gaussian added together than it is to actually use a Slater-type orbital. It's for mathematical convenience because we need to make these equations more easy to solve numerically.
Starting point is 00:14:24 So we'll add a bunch of those together, and then we'll combine those approximated atomic orbitals to then give us a molecular orbital. So it's a multi-stage process. There's other tricks that we use. So there's something called a split valence basis. Basically what this means is that we give a different number of basis functions for the valence orbitals, those are the ones in the outermost shell, compared to the core orbitals, which are those in the innermost shell. And that's typically done because
Starting point is 00:14:49 the valence orbitals are generally the most important ones that determine energy and interactions and so forth. So those are the ones who are most interested in. So we want to give them more flexibility, because again, in general, the more basis functions you use to estimate something, the more accurate the resulting estimates are going to be. So split valence gives us extra flexibility to give sort of more basis functions in for the valence orbitals. There's something else you can do called adding in polarization functions, which is basically adding in extra atomic orbitals, even when those orbitals aren't actually occupied. So, for example, you might add in a D function, even though the D orbitals, those are the ones above the P. You've got S, you and your D, the Ds are the more complicated ones that are start to be occupied with like your transition metals.
Starting point is 00:15:30 You might add in some of those. Again, each D orbital is going to be comprised of a bunch of Gaussian's added together. you might wonder, well, if I don't actually have any electrons in the orbitals, then why would I add them into my series that's approximating my molecular orbitals? And the answer is that it just helps to give extra flexibility to the shape. Because remember, molecular orbitals aren't really atomic orbitals. They're their own thing. We're approximating them by adding a bunch of atomic orbitals together,
Starting point is 00:15:57 or approximations to atomic orbitals. It's approximations not approximation, so I know it's a bit confusing. But the point is it can often be the case that even if you don't have any say D-orbitales that are occupied or variations on the orbitals for the molecule, it might be useful to add some of them in to your basis set in order to give more flexibility to the orbitals that actually are occupied, which helps to better represent the true molecular orbital, which is you know, its own thing. So basically polarization functions just help to
Starting point is 00:16:24 increase the flexibility. There's other tricks as well like diffuse functions which help to represent atoms that have weakly held on outer electrons. So you remember I said that Gaussian functions decrease fairly rapidly as you move away from the center. Diffuse functions can help to just bump up the tails a little bit so that there's a bit more electron density there for atoms that have electrons that are far away. As I said, in addition to trying to get the self-consistent field method to arrive at a solution to converge, the computational chemist also has to think carefully about what basis set is going to be right to solve a particular molecule. It's not just a one-size-fits-all thing.
Starting point is 00:17:00 Different basis sets with different numbers of Tracted Gaussian, different numbers in the split valence, different numbers of polarization functions, or whether you have diffuse functions and other things of this sort, all need to be decided on on the basis of what you think your solution is going to look like for a particular molecule. Because again, we're trying to approximate these molecular orbitals, which don't necessarily look much like atomic orbitals at all. But we use that as a sort of a starting point to guess what they might look like, and then have to choose judiciously about how many galsians to choose and what weightings to give to them and this sort of stuff, or what parameters set for the goscians and then the, the weightings are learned by the iterative process. So it's quite a complicated and involved process, which involves a lot of sort of judgment calls, guesswork and iterative improvements to try to get better and better energies. One good thing is that there is a clear way to tell how accurate your results are, is because remember the ground state energy will always be the lowest energy. So if you find a new basis set or a new method of optimization or something that gives you a lower energy then, assuming you haven't made a mistake somewhere, that is a better result than
Starting point is 00:18:05 alternatives because it's a lower energy, it must be, it must be better. That's the same principle that we use for the variational, variational theorem, that the true ground state energy is always the lowest possible energy, that configuration of atoms. So there is a way to check how good our results are, but there's no very easy way of knowing in advance exactly what, so to set of basis functions or assumptions will be the best for a particular case. And it's kind of a case-by-case basis of what type of atoms you have, what arrangement they're in, what basis-sets worked well in the pass for that particular type of molecule, chemical knowledge and intuition, symmetry symmetry considerations, and so on and so forth.
Starting point is 00:18:40 So to recap where we're so far, what we're trying to do is we're trying to solve for the molecular wave function, which describes basically all of the molecule and its properties and energies and so forth that we would want to know about it. The first thing that we have to do is we have to choose a basis set to use for constructing molecular orbitals. So you might choose a set of Gaussian and a particular number of split valence, basis, and so forth. So you pick that, and that's basically. on chemical knowledge and intuition and so forth. Then the next thing you have to do is you need to choose a molecular geometry. So I don't know that we've said much about this, but one of the things
Starting point is 00:19:10 that is assumed by the Hartree-Fock approach, which we've been talking about, is the geometry of the atoms, particularly the nuclei. So where are the nuclei located? For example, if I'm trying to solve for the molecular orbiters of a water molecule, I need to specify that there's like an oxygen here and then a hydrogen here and another hydrogen over there, in a kind of a Mickey Mouse shape, Mickey Mouse head shape, you know, the three circles. So I need to specify that in advance. And again, that's generally going to be chosen on the basis of chemical knowledge or previous results. But that is something that I need to set and that I may optimize later.
Starting point is 00:19:42 But the Hartree-Fock method just takes that as a given. So I need to choose a molecular geometry and also need to choose an initial state of molecular orbital. So basically that corresponds to an initial guess of my coefficients. My coefficients tell us me how to add together my basis functions in order to construct my molecular orbitals. So I've chosen my basis functions. I now need to choose an initialization for the coefficients. And that may be based on past work or just chosen at random or whatever. Once I've done that, then I use my initial set of molecular orbitals to construct the FOC matrix.
Starting point is 00:20:13 Because remember the FOC operator, or FOC matrix, or just called the FOC operator here, the FOC operator is essentially an energy function for each electron, but it depends on the molecular orbitals. So I need my molecular orbitals to construct the FOC operator in the first place. Once I've constructed the FOC operator, then I can, can solve the Hartree-Foc equation, or in the case that we're actually looking at here, because we're using basis functions, the ruthane equations. I get my molecular orbitals. I use them to construct the FOC operator. I use the FOC operator to solve the ruthane equations and do some linear
Starting point is 00:20:47 algebra, and out of that, I can get a solution for what my coefficients should be. Then all I have to do is check how close those new coefficients were to the initial ones that I guessed. If they're pretty much the same, then I can go, oh, I'm finished, I'm done. These are my coefficients. If, as generally is going to be the case, they're quite different. Then I pick up my new set of coefficients, use them to recalculate my FOC operator, which remember depends on those coefficients through the molecular orbitals. So I get my new guess for the coefficients, use them to update my molecular orbitals, use the molecular orbitals to update my FOC operator, and then use the FOC operator to solve for the Routhaun equation again to solve for a new set of coefficients. And then I do the same
Starting point is 00:21:24 thing. I compare them to the old ones and say, oh, how different are they? And then I keep doing that, keep iterating through using this self-consistent field method, and they converge, if they do converge, they weren't always. Once they've converged, then I've got my correct coefficients. These coefficients tell me how to add together my basis functions, my Gaussian essentially, to approximate my molecular orbitals. And once I've got my molecular orbitals, I can then stick them into the slated determinant to give my molecular weight function, which is the thing that I'm trying to find. So at this point, are we done? Are we finished? Because we found the molecular way function, right? Isn't that the whole point? We can use that to calculate everything we want,
Starting point is 00:22:00 all the energies and molecular shape and everything else, so we're finished, right? We can go home. Well, not so fast, because so far we've just been talking about the Hartree-Fock method. If you recall, way back in the previous episode, actually, I mentioned that the Hartree-Fock method is actually just the beginning of Abinissio methods. The reason it's just the beginning is because it makes some very strict assumptions. I've already talked about the Born Oppenheimer approximation, which is that the nuclei are assumed to be in a fixed position. which means that you just sort of start off with your molecular geometry, and the Harchifok method itself doesn't change that. You have to optimize that separately.
Starting point is 00:22:39 The Hartreifok method also ignores relativistic effects. So those are usually not that important for many cases, although for particular applications they can be, and I won't really have much more to say about them here. They're their own sort of can of worms to deal with. But apart from those two things, there's one very important approximation that the Hartreufok method relies on, and that is, as I believe I said last time, the mean field approximation, which means that when we consider each electron, we're treating all of the other electrons as if they're sort of an average field that's smeared around the nuclei. So we just sort of treat them on average.
Starting point is 00:23:16 That is, we're ignoring the effect of electron correlation. And it turns out that is a very significant approximation and significantly limits the accuracy of the results we can get using the Hartree-Fock method. In fact, unfortunately, the Hartree-Fock method's not even very accurate for many cases. It's a starting point, but it's not nearly sufficient for chemically precise energy estimates or other types of phenomena that we would like to predict. So what do we do? How do we get around this? How do we incorporate this electron correlation, which is so important for getting accurate estimates of the properties of interest? Well, this takes us into a field called post-HartreeFock methods, which attempt to incorporate electron interactions
Starting point is 00:23:56 as adjustments to the wave functions that are found through Hartree-Fock theory. It turns out there are quite a few different ways of doing this. So you can think of Hartree-Fock theory as sort of like the starting point, and then from there branch out a variety of different post-Hartreveck techniques that try in different ways to incorporate this electron correlation effects and therefore get more accurate measurements. The one that I'm going to talk briefly about here is called the method of configuration interaction, or the CI method, configuration interaction. And the basic idea of the configuration interaction methods is to build upon Hartrefourth theory
Starting point is 00:24:35 by writing it as a weighted sum of multiple slated determinants instead of a single slated determinant, which remember is what the Hartreefok method does. So in the Hartree Fock method, you get your molecular orbitals, and then you stick them into your slated determinant, which is basically just a way of combining the molecular orbitals in different ways to account for the fact that electrons are interchangeable with each other and are identical. But the Hartreefog method assumes that there's only one of those slated determinants. But it turns out that we can actually do better than that. We can increase the accuracy of our results by writing the molecular wave function as a weighted sum of multiple different slated determinants.
Starting point is 00:25:15 Note that this is different from what we were talking about before when we wrote the molecular orbitals as a weighted sum of multiple different. weighted sums of basis functions. This is a whole different ballgame here. We're writing the whole molecular wave function now, not just molecular orbitals, the whole wave function, which is a slated determinant, as a sum of multiple slated determinants. Now, what does that actually mean, though? What does it mean to add up multiple slated determinants? Like, isn't one slated determinant just the molecular wave function? Because that's what I've been saying so far. Well, it turns out that if I take a different slated determinant, what that corresponds to is the the same molecular wave function, but with one of the electrons promoted to an excited energy level.
Starting point is 00:25:56 So you know how in a single atom you can have your electron at the lowest energy state or it can be excited to a higher energy state or a higher one still. So there's different energy levels that it can exist in. It's the same thing with a molecule. There'll be different energy levels, basically corresponding to the different orbitals, and you'll have two electrons in each orbital because of spin up and spin down. And generally, all of the electrons will exist at the lowest possible energy levels that they can get to, subject to the restriction that you can only have two in each. But there are excited states, including singly excited states where you have one electron that's been promoted up to a higher energy level than it would normally exist in, or doubly excited
Starting point is 00:26:32 states where you've got two electrons both promoted up to higher levels and triply excited states and quadruply excited states and so forth. There's no real limit to how many excitations you can have until you run out of electrons, I guess. Now, it turns out that adding insulated determinants means adding in excited states or basically wave function configurations that correspond to excited states with one excited electron or two excited electrons and so forth. Now you might wonder, what do these extra slated determinants corresponding to excited states have to do with anything? After all, we're interested in the ground state energies and the ground state wave function. So why would I want to add on excited states, you know, with a weighted
Starting point is 00:27:12 sum in order to get the ground state? That doesn't really make any sense, does it? Well, it wouldn't make any sense if we actually had the ground state to start with. You wouldn't add anything on to that. But remember, we don't actually have the ground state. What we have is the Hartree-Fock estimate of the ground state. And it turns out that if I then add on a weighted sum of Hartree-Fock estimates of excited states, that can actually, the combination of those can give a better estimate of the true ground-state energy. So basically, to put it crudely, different combinations of the Hartree-Fock estimates together can give a better estimate of the true ground state wave functions and energies than just one of those heart-tree-fok estimates by themselves.
Starting point is 00:27:56 Now, there's a more technical explanation here, which is that slated determinants form a complete basis of wayfunction space. If that doesn't really mean anything to you, I won't try to explain it in too much detail, because that could take another 20 minutes. Basically, it just means that any possible way that the wave function can be can be described by a combination of the slated determinants, which remember includes basically the Hartree-Foc one and then all a combination of different excited states with one excited electron or two and three and so forth. So any possible wave function, which includes, of course, the correct ground state wave function, can be written as a linear combination of slated determinants.
Starting point is 00:28:29 So that's really useful, right, because that gives us some structure to then begin to solve the problem of how to represent electron configuration. Because basically what we're going to do is we're going to start with a good old-fashioned single slated determinant Hartree Fox solution. And then what we're going to do is we're going to add on some singly excited states, or singly excited slated determinants, and then some doubly excited states corresponding to doubly excited slated determinants, and so on however far we want to go,
Starting point is 00:28:57 depending on how much time we have for the computation. Obviously, the more you add, the longer it takes. And that's going to give us a better estimate of the true wave function that we're really trying to estimate, basically incorporating more and more of the electron correlation effects that are ignored by the straight Hardre Fock method. Now, for technical reasons that we didn't go into here, but relate to what's called the Brilliant theorem,
Starting point is 00:29:19 for those who might be interested, there is actually no coupling between the ground state and single excited states. So that means I've just been saying that we add in these singly excited states, but it turns out that you don't actually need to add those in because they don't have any effect. So the first ones that we add in are actually doubly excited states. But that's just a technical point
Starting point is 00:29:36 that doesn't really change the basic point, that what we're going to do is add in extra slated determinants, corresponding to these excited states. But you might be wondering, this is all well and good. If I get my excited slated determinants, I can add those on, find the coefficient somehow, but we'll get to that. And then I can incorporate the electron correlation effects and get a more accurate molecular wave function and calculate my energy use and so forth. So that's all well and good. But where do I get these extra slated determinants from? Well, the excited state slated determinants. Like, how do you find them? We know how to find the one for the Hartree Fock, corresponding to the ground state level, Hartree-Fock version, but how do I get these excited states? Well, the answer is that you basically
Starting point is 00:30:16 just solve for the Hartree-Fock version, but using a basis set that's big enough to give you more solutions than you need for your molecular orbitals. So let me just explain that in a little more detail. Remember that when you're solving for your the Hartree-Focke wave function, you get, you need your molecular orbitals first, and a molecular orbital just basically describes the spatial pattern of a single electron, well, two electrons spin up and spin down. So two electrons for each orbital. And then there'll be a bunch of those that describe all of the different pairs of electrons throughout the whole molecule. So you'll have a bunch of different molecular orbitals, is the point. A bunch of molecular orbitals combined together in a slated determinant to give you the total molecular wave function.
Starting point is 00:30:57 But how many molecular orbitals are there? Like how much should I find? Now you might think, well, half as many of the number of electrons. So I've got 10 electrons. I need five molecular orbitals, right? Because two in each. Well, you could do it that way. And that's perfectly fine way of doing it. The problem then is, however, that you won't be able to describe any excited states. Because in order to create an excited state, you need to move an electron, or at least one electron, from one orbital to a higher energy orbital. Remember, you can rank the orbitals in order of their energy from lowest to highest, and the electrons will fill them from the ground up, according to the alpha-bile principle. So if I want to describe excited states,
Starting point is 00:31:35 all I have to do is solve for more molecular orbitals than I actually need. So maybe I've only got 10 electrons in my molecule and therefore only strictly need five orbitals in order to get my heart true FOC total molecular weight function. But if I want to use the configuration interaction techniques, I'm going to need some extra space, some extra leeway, so to speak, to be able to describe excited states, and therefore I'm going to need extra orbitals. So instead of just solving for, say, five molecular orbitals, I can solve for six or seven or eight. I can solve for as many as I like.
Starting point is 00:32:09 And you might wonder, well, how does that work? How can I just sort of solve for more? Well, because remember how we solve for them in the first place. We solve for them by solving the ruthane equations, or basically the hydrant-fok equations. Ruthane equations is just the version where I've put in my basis functions. I mean, it turns out that there's actually an infinite number of solutions to those equations, each one corresponding to a different molecular orbital. So basically, I can decide how many solutions,
Starting point is 00:32:32 to the Hartree-Fog equation or the ruthane equations in practice, I'm going to generate just by basically churning through the maths that many times. And specifically, when I'm doing the ruthane equations, I can decide how many coefficients that I'm going to try to solve for in order to get that many molecular orbitals out. Once I've solved for those molecular orbitals, I won't actually need all of them to produce the ground-state Hartree-Fock total molecular wave function.
Starting point is 00:32:57 But then what I can do is I can just rank the, I can order the molecular orbitals by their energies, solving the Hartree-Falk equation allows me to get their energies as well. So I can just order them by lowest energy to highest energy, and then create a series of singly excited states by just by moving the electrons kind of manually, or you can think of it as just writing a list of, well, if I move this one here, then it will have this energy, and then if I move this one to this one, then it will have this energy and so forth.
Starting point is 00:33:24 So I can work out a full list of what all of the singly excited states will be, and then I can do the same thing for doubly excited states by moving two electrons. and I can do that for as many excitations as extra orbitals that I have. So this is kind of a neat process that I can basically just generate as many excited states as I want by solving for more orbitals and then filling them kind of manually, so to speak, and then constructing the corresponding total molecular wave function or extra determinants by just using those excited orbitals instead of one of the ordinary ones. So for example, let's go back to the 10 electron example molecule.
Starting point is 00:34:00 For the ground Hartreefok determinant, I'm just going to use my five lowest energy molecular orbitals and stick them into my Slater Determinant. That gives me my Hartreufk determinant. But then for my singly excited determinant, which remember technically you don't need, but just for illustration purposes, for my singly excited determinant, I'm going to take one of my electrons from one of the five initial orbitals and put it into a sixth orbital, a six molecular orbital, which I saw for earlier, but didn't need in the Hartree Fok case. and then that's going to produce an excited state. But there's going to be many different excited states, of course, because I can take electrons from different, like I can take an electron from orbital 1 and put it into orbital 6 or orbital 2 and put into orbital 6. Or I could get crazy and take one from orbital 3 and put it into orbital 7 and so on. And there's in fact, again, theoretically an infinite number of combinations
Starting point is 00:34:49 because there's no limit to the number of orbitals I can put it up in, although there's going to be a limit to how many actually makes a difference there because very high energy orbitals. Well, eventually the electrons will ionize and become discerer. associated from the molecule anyway. So there's practical limits, although theoretically there's no limit to how many excited states you could generate. So basically, I do that for all my single excited states, and then I do that for my doubly excited states and my triplet and however many I'm including. And then I sum over all of those singly excited states to give me the next
Starting point is 00:35:19 term that I add in my expansion. So there's my single Hartree Fok, no excited states, Slated term in it. Then there's a sum together of a whole bunch of singly excited state. slated determinants and then a sum of a whole bunch of doubly excited state slated determinants and so on for however far I want to go. So I can construct all of those just using my molecular orbitals that I found using the Hartrefourth methods and by basically combining them in different ways in the way that I just described. With the caveat that I do need to solve for more orbitals if I'm planning to find excited states later. So this is all really nifty and allows us to get kind of arbitrarily accuracy because remember we know that the total molecular wave function space is spanned by this set of all of the slated determinants.
Starting point is 00:36:07 So theoretically, if I had infinitely many determinants with infinitely many excited states, I would actually be able to solve for the total molecular wave function exactly without further approximations other than the ones that I mentioned about the Born Oppenheimer approximation and the ignoring relativistic effects. But I would be able to incorporate all of the correlation effects if I had enough determinants, which is quite cool. Now, the downside to all of this is that it becomes very computationally costly. Because remember that I mentioned that in order to calculate the total molecular wave function,
Starting point is 00:36:41 you need a weighted sum of these slated determinants. I've sort of skipped over the weighting part. So how do you find these coefficients that I use to multiply each of the slated determinants by before adding them together? Well, unfortunately, you have to do it by iterative methods. This leads us to something called multi-configuration self-consistent field methods. which means that I have to do a series of two iterative optimization steps, kind of in sequence. The first stage will be optimizing my molecular orbitals by finding the set of coefficients
Starting point is 00:37:10 that I used to add up my basis functions to get my molecular orbitals. Once I found the molecular orbitals, I then have to optimize a second set of coefficients that I used to multiply by my excited determinants to add them all together to give my total molecular wave function. Generally, these can be done separately because typically electron correlation doesn't really change the molecular orbitals very much. The point is, though, that if I'm doing multi-configuration self-consistent field methods, I have to do two stages of very complex optimization, which may not converge and is very computationally intensive. And so that's
Starting point is 00:37:47 why there's a limit to sort of how many of these slated determinants you can add in. You can't just add in any number of excitations you want, because you'll just never get a solution. It will be too costly. So in practice, I think that they don't really really go up to more than quaternary levels, so four excited states with four electrons. I think that that's pretty much the most that they'll go up to, and even that is extraordinarily expensive. Now, I did mention that there are other methods, other post-Hartary Fock methods, for incorporating electron correlation.
Starting point is 00:38:16 We talked about the configuration interaction method, but that's only one technique. The two other main techniques for incorporating electron-electron correlation are called the molar-plecet perturbation theory, and the other one is coupled. cluster theory. Now, these methods also involve incorporating determinants into the wave function, but they do it in a different way. The reason I decided to explain, in brief, the configuration interaction method is because I think that it is the conceptually easiest to understand. Basically, you have the same ingredients, your good old molecular orbitals, you just have to solve for a few extra ones and then combine them in different ways, and then you do iterative solutions to
Starting point is 00:38:54 find the coefficients to add them together. It's not too difficult to understand. The other methods are rather more complicated, but also involve incorporating more determinants. So it's sort of slated determinants all the way down when it comes to incorporating electron correlation, but the methods by which that is done can vary depending on the technique that you're using. So at this point, let me summarize ab initio methods by summarizing the approximations that are involved in finding the total molecular wave function, which is the gold standard that we're trying to reach at the end of the rainbow there. So the first approximation is the Born Oppenheimer approximation, which means that the nuclei are assumed to be fixed in position. And this can be relaxed by optimizing
Starting point is 00:39:32 the geometry after you solve for the molecular orbitals. So perhaps what you'll do is you'll solve for your molecular orbitals, and then based on that, you'll then optimize the geometry by moving the nuclei by small amounts. And then you can recompute the molecular orbitals using the new geometry. So that's yet another iterative series of steps that could need to be taken. The next assumption is that relativistic effects are negligible, and all of the techniques that I'm describing here, basically ignore relativistic effects. Many systems don't need them, but if you do need to include them, then, well, you have to adopt entirely different sets of techniques to include those. The third assumption is that we're only using a finite number of basis functions. So remember I talked
Starting point is 00:40:11 about the fact that you need to approximate molecular orbitals by using basis functions, and then you find the coefficients that you use to multiply those basis functions together to give you your molecular orbitals. In the theoretical limit of infinitely many basis functions, you approach what's called the Hartree-Fock limit. And that just means that most accurate you could possibly get, theoretically, using Hartree-Fock methods. And that's achieved by having infinitely many basis functions. In practice, you never have infinitely many basis functions, of course. You only have a finite number, a handful or a dozen at most for each orbital. So there's always some trade-off of accuracy there. And the fourth type of approximation is the mean-field approximation, which means ignoring
Starting point is 00:40:50 electron-election effects. And that's relaxed by using multiple slated determinants, for example, using the configuration interaction techniques that we discussed. And in the limit of using infinitely many determinants, you approach the theoretical limit of incorporating all of the electron correlation, although of course in practice you can never get even close to that because it's computationally infeasible. But theoretically, if we had infinitely many basis functions, or just at least a very, very large number of them,
Starting point is 00:41:17 and if, theoretically, we could have as many slated determinants as we wanted, And if we carefully optimized the geometry, iteratively, to ensure that the nuclei are in the right position, and forgetting about relativistic effects for the moment, then theoretically we would be able to solve for the exact, or at least very close to the exact, total molecular wave function, for a molecule. And that's pretty cool. But you'll see how complicated it is even to solve for the molecular wave function of relatively small molecules that have maybe a few dozen or, at most, maybe a few hundred electrons. The problem is that as cool as these techniques are, they're just so slow. I don't know exactly what the limits are of how larger systems have been solved using these sort of techniques.
Starting point is 00:42:02 I mean, it depends on the level of, you know, how big your basis set is and how many determinants you're adding. But we're not talking about thousands or tens of thousands electrons. It's fairly small molecules we're talking about. And that's fine as far as it goes, but it really limits the applicability of quantum chemistry if we can only study relatively small molecules. because there are much larger systems that we would like to study. So how do we get around this problem of post-Hartree-Fock methods are just too slow to study really big systems with the accuracy that we need?
Starting point is 00:42:32 One way that has been developed to try to get around this problem is called semi-emperical methods. The other method that we'll talk about a little bit is a different approach again, which is called density functional theory. But before we get to that, let's talk a bit about semi-imperical methods. Semi-emperical methods are based on the Hartree-Fock formalism,
Starting point is 00:42:50 so they're sort of starting at the same route, but they take a different philosophy. It's almost like a philosophical, methodological difference here between the semi-emperical on the one side and the ab initio on the other side. The approach of the ab initio techniques, which is sort of what I've been talking about so far, is try to solve the exact total molecular wave function and only introduce approximations exactly when you need to. So, for example, like we only have a finite number of basis functions, or we only incorporate a finite number of slated determinants. and we can specify sort of exactly where the approximations are made. So we try to exactly solve for what we want, but we do need to make some approximations along the way.
Starting point is 00:43:29 But they're very sort of theoretically motivated, or mathematically motivated approximations, if you like, and it's all based on underlying theory. Semi-empirical methods are a bit different than that. Obviously, they make approximations, but they make more approximations, and they base those approximations less on just, say, truncating an infinite series or a sophisticated mathematical argument,
Starting point is 00:43:49 but a lot more just on basing these approximations from empirical data. So it's more about fitting curves to data and then making these sort of ad hoc decisions about what sort of a good enough fit or a good enough approximation. And the advantage of that is that it allows you to solve for much, much larger systems in much, much smaller amounts of time because you just don't have to solve for so many integrals that you have to in post-Hartrefoc methods or even the Hartrefourke method itself.
Starting point is 00:44:15 The downside, of course, is that it's a bit harder to validate sometimes. I mean, you can, of course, compare it to empirics. data, like you can compare it to direct measurements, but many systems it's too hard to get those measurements, and that's one of the reasons we want to use computational theory, of course. So it's a bit of a difference in philosophy more than anything else, but the techniques do differ a bit as well. So let me talk just a little bit about some of the key ideas that are used in semi-emperical techniques. Most semi-imperical methods these days adopt an approach that's based on something called extended hookel theory. Now, I haven't really talked much about what hookel theory is,
Starting point is 00:44:48 but it is a way to describe essentially or to find the total molecular weight function. So it's sort of the same objective that we've been looking at. You know, you write out the different components of the Hamiltonian, and you solve the Schroeneges equation, you're rearranged for energies and so forth. And when you do this, you can arrive at a series of equations which are kind of similar to the Hartree-Fock equations. They're a bit different, though. I'm not going to explain exactly how they're different,
Starting point is 00:45:14 but there's sort of two points that I want to make here. When you do this rearrangement, you get a series of two terms. They're basically two different components to the energy of the system. One are called your overlap integrals. They're represented as an S. I don't know why. The other one is called H, and they're your resonance integrals. Now, if you put them both together, they both kind of combine together to give you the total energy of the system, right?
Starting point is 00:45:37 Or at least of one electron in that system, I should say, of one orbital in that system. However, it's useful to decompose them into these two pieces. So there are overlap integrals, the S's. they represent the degree of repulsion between two electrons that overlap in physical space. The resonance integrals, or the H terms, represent interaction between each electron and the nucleus, plus the repulsion between two electrons in neighboring orbitals, but not in physically overlapping orbitals. Now, that's actually very important, because if we're talking about orthogonal orbitals, then they won't overlap at all physically, and therefore the overlap intervals will always be zero.
Starting point is 00:46:13 But when we're solving for these systems, we often don't work with, orthogonal orbitals because it's much it's too difficult to do that basically so for example our basis functions that I mentioned before that we use to approximate the molecular orbitals those basis functions are not orthogonal to each other and so we're going to have overlap between them now this is very important because if I have two molecular orbitals that physically overlap in space I need to take into consideration in you know solving for my total molecular wave function the degree of that overlap because that's going to affect their
Starting point is 00:46:46 energy levels, right? So this is not just the repulsion of electrons in different orbitals, but actually it's the repulsion of electrons that are in orbitals that physically overlap with each other. It's a different type of interaction, and it's an importantly different one. As I said, we have to deal with this in Hartree-Fock theory as well, but it's incorporated into the ruthane equations that we need to solve for, and so we have a principal way of dealing with that. The downside is that it involves solving them iteratively, solving those equations iteratively. But using semi-emperical approaches, we do it a bit differently. So we've got to this set of the overlap integrals and the resonance integrals, and we need to figure out how to solve them.
Starting point is 00:47:22 So the way that you would do this in the Hartree-Foc theory, as I said, is solve them iteratively by using the basis set and then sticking them into the equations and then seeing if they're consistent, and then you stick them back in again if they're not, and you iterate around. But that takes a very long time. So instead, semi-imperical methods take a completely different approach. What they do is that they adopt a method to parameterize these integrals to basically make assumptions, about what they should look like. In particular, as I said, using extended hookal theory, all of the valence orbitals are assumed to be represented by Slater type orbitals. Now you remember I said that these are typically not used these days, or at least not directly used, in Hartree-Fock
Starting point is 00:48:00 theory because they are more difficult to work with computationally. But they are used in semi-empirical theory because it turns out that they're easier to work with with the mathematics that is done in semi-empirical methods. Basically because we don't need to calculate complicated integrals over these basis functions in semi-emperical theory, and that's the difficult bit. So in semi-empirical methods, core electrons are just ignored, and assumed to be not very relevant, and valance orbitals are represented by slater-type orbitals. So already we've got a big savings over Hartree-Fock methods, because we're not even bothering about core electrons, and we're representing each valence orbital as a single slater-type orbital. Then what we do is we
Starting point is 00:48:36 calculate the overlap integrals, the S-1s, the ones that describe the physical overlap of orbitals in the same space, just by taking the, basically, the difference directly between Slater type orbitals. I'm like, it's very simple. You just directly take the difference between them. They can be computed very quickly. And then the other, the resonance integrals, the H terms there, those are computed using empirical energies for single electrons and a combination of the overlap orbital. So basically there's a formula that you use, which I won't describe here, but it basically just uses empirical data plus the overlap integrals. This is a recipe. This is a recipe for directly solving the equations that are similar to those solved in Hartree-Fock theory,
Starting point is 00:49:15 but instead of solving them iteratively, we can just solve them in one go. We can just plug in the numbers and calculate them. So instead of having to iterate through millions and millions of integrals, you just plug in the numbers and you've got your answer in one go. So that is why it's so much much faster, and therefore you can use this treatment for much, much larger molecules. Because basically all you have to do, well, yeah, you have to define your geometry, you have to do that for any method. Once you've done that, you just ignore all the core electrons, as I said. Just look at your valence orbitals, associate each valence orbital with one slater type orbitals, so much smaller basis that we're using here. And then I've got
Starting point is 00:49:51 a recipe for calculating my overlap integrals and a different recipe for calculating my resonance integrals, which basically just uses those slater type orbitals plus some empirical data that goes in to help me. And this means I don't have to use iterative methods because I've got a recipe to just find the solution one go, and I've got my total molecular wave function just like that. It's done. So this is a very fast, method. Unfortunately, and there's always a catch, isn't there, this method produces far less accurate results in general and also neglects electron spin because we haven't included that in the parameterization that we've given for the resonance integrals. So there are some big
Starting point is 00:50:24 cost to this. Now, there are other formalisms that go beyond what I've talked about here, extended hookal theory, that use different parameterizations for the overlap integrals and for the resonance integrals and that therefore allow you to incorporate more accurately spin and other effects, but this is the basic philosophy that semi-emperical methods use. Instead of trying to define precisely all of the quantum terms that should appear in my Hamiltonian and then solve for them using these complicated integrals, instead, it just tries to use a sort of a quick and ready approximation to solve for all of these energy terms using a combination of, you know, chemical intuition, empirical data and mathematical arguments is about, you know, what things should
Starting point is 00:51:04 roughly be. There's a big savings in terms of computational time, but in general a loss of accuracy. So that's a little bit on semi-emperical methods and how they adopt quite a different, I guess, philosophy to Abinitia methods. Now I'm going to talk a little bit about a third method and this is an alternative method for solving for molecular geometries and energies and other parameters. The reason it's called density functional theory is because the entire approach is based on something called a density functional. Now hopefully we know what a function is. A function is basically a mathematical artifact that has a formula or a recipe for taking in one number and then spitting out a different
Starting point is 00:51:45 number. So if I tell you what the number is that goes in, it tells me the number that comes out. So x squared, for example, is a function. You put in x and it spit out x squared, right? Gaussian is another function you put in a number and it spits out, you know, the formula of that. A functional is a bit more complicated. A functional is basically like a function of a function. When I have a functional, I put in a function into it and it gives me back a number. So it's a little bit more complicated. It's sort of like putting a function inside of another function, although that would just give you a composite function.
Starting point is 00:52:17 So it's a bit more than that. But we didn't get into the mathematical details here. I just wanted to explain the name. Now, that's what the functional part means. The density part is referring essentially to electron density. So the functional in question is electron density. That's basically just a description of the density of electrons in a given region of space. Now you may recall, we've kind of talked about this before, because the density
Starting point is 00:52:41 functional is basically just the square of the wave function at a given location, or over locations in space. So the wave function describes, the square of the wave function defines the probability of finding an electron in a given place. So if you sort of represent that as a function over space, then you get a density functional, specific in an electron density functional. And this is what density functional theory uses to describe the properties of molecules. Instead of using the wave function directly, you use the density functional, which has one advantage of being observable. You can observe electron density. You can't observe a wave function directly. You can only observe the square of that wave function in terms of probabilities of finding electron
Starting point is 00:53:18 density. So that's one advantage of this technique, that it's more directly connected to something that's observable. There are other advantages as well. So there are a series of theorems that would prove, I think back in the 60s or something called the Hohenberg-Cone theorems. And these are kind of technical, but the basic idea is that it proves that the ground state properties of many electron systems, so like a molecule, are uniquely determined by a single electron density that only depends on three spatial coordinates. Now, this might not sound like a lot, but it's actually huge, because what it means is, instead of having to deal with three N spatial coordinates for my N electrons, so if I have 10 electrons, I'll have like 30 spatial coordinates for each of those electrons,
Starting point is 00:54:01 that then I need to describe my system. Instead of having to do with all that, it turns out that there's actually a density functional that has only three spatial coordinates that can describe the exact same system. That is a really, really powerful result because it dramatically simplifies the problem, at least in principle.
Starting point is 00:54:17 The problem with the Hohenberg-Cone theorems is that they don't really tell you how to actually find that density functional. If we could find it, then that would be great because we could then basically use it to derive all of the observable results that we need. But how to actually find the density functional is sort of the core problem of DFT. And again, there's a lot to say on how it works.
Starting point is 00:54:38 I just want to give you the barest flavor of how this works. So here's the idea. It's too hard to solve for the true Hamiltonian, you know the true energy function of the system, just like all of these. Like it's too hard, so you have to do it a different way. So what do we do? Well, DFT has this kind of weird idea to replace the true Hamiltonian in which all the electrons interact with each other and have correlations and spin effects and all that complicated stuff, we just forget about that for the moment and replace it with a simpler non-interacting Hamiltonian that has the same ground state energy. Now it turns out that you can always do that. That's sort of one of the results of these Hohenberg cone theorems that I mentioned. I won't really bother with
Starting point is 00:55:19 sort of how that works exactly. But the point is that it's possible to always do that. So I can replace the true interacting complicated Hamiltonian with kind of a simpler one. And basically that means that I can write down my energies in terms of density functional. So the energy is going to be a function of that density function, which is in turn a function of the spatial coordinates. So that's why it's a functional. So my energy is dependent on my density functional and can be split up into different energy components.
Starting point is 00:55:46 We've seen that before, splitting up the energy terms or the Hamiltonian terms into different aspects. So here we're going to separate out into the kinetic energy of each electron, the interaction term or the potential energy from the nucleus and electron interactions. Again, that's not too hard. Then there's the interaction between the different electrons, so the propulsion between electrons. That's a bit more complicated. And then there's one final term, a fourth term, which is called the exchange correlation energy. And this term is all of the difficult parts of the energy. So it's electron correlations. Remember, that was the thing that gave us trouble in the Hartreufel method. Exchange
Starting point is 00:56:22 energies, so that's exchanging around electrons as they're indistinguishable. And also the between the potential energy of our fictitious non-interacting system and the potential energies of the actual real system. So what we're doing here might seem a bit strange. Basically, we've said, forget about the real problem. We're going to solve a different problem that's easier. And not only that, but we're actually going to throw all of the difficult terms into this sort of aeroterm, if you're like, which is called the exchange correlation energy. You might wonder, well, what's the point of that?
Starting point is 00:56:50 What's the point of just splitting up my energies in three sort of easy or relatively easy baskets, kinetic energy, nuclear-electron-interaction energy, and electron-electron-interaction energy, and then one really hard basket, which has just got everything else in it. What's the point of all this? We seem to have reached an impasse. Well, not so, because we've already simplified the problem a lot more than it might seem. First, the Holmberg-Code theorem gives us the result that there is a density functional, again, just a density function over the three spatial coordinates that does solve this, that will solve for this system. So we know that there's a solution there to find, and that's
Starting point is 00:57:25 lot easier than having to find all of our molecular orbitals, for example. So there's progress there. The other thing is, if we can find a way to parameterize or estimate the exchange correlation functionals, then we've actually got our energies and also the Hamiltonian and the other things that we've wanted to solve for. Now, there have been many methods that have been developed to do exactly that, to estimate these exchange correlation functionals. And it turns out, actually, that often the energetic contribution of the exchange correlation functionals is not that high. So we don't have to be super accurate with them. We just have to be accurate enough to get decent results.
Starting point is 00:58:02 And in general, what they involve is fitting very complicated mathematical functions to empirical data for a particular system of interest, and then using those functions to apply to the particular molecule that I'm interested in. So it's kind of semi-emperical in nature, basically, function fitting. But it's semi-emperical in a different context. It's basically, here's the easy terms. here's the hard term, the exchange correlation bit, and then we need to find some way parameterizing that. Once I can parameterize that, then the easy bits are fairly easy to solve for. You know, if I tell you my molecular geometry, then you should be able to solve for those
Starting point is 00:58:32 in terms of the density functional. And then I've got my hard bit, and then we're done. We've found the energies, or we've found the density functional itself, which describes the sort of shape of the molecule and so forth. So that's kind of quite a different take on things, I suppose, than the Hartree-Fock method. I thought I'd mention it here just to give you a flavor. of the different approaches that do exist. I don't know as much about this,
Starting point is 00:58:53 but I'm given to understand that density functional theory is sometimes faster and easier to do than archery-focke-based methods and sometimes it's harder. So it's kind of like you pick the method that you think is going to deliver the best results. Now, before we finish up,
Starting point is 00:59:07 there's one final application, or I guess branch of computational chemistry that I wanted to discuss very briefly. Everything that I've been talking about so far involves estimating molecular wave functions and energies for quantum systems. so for molecules using quantum effects. But sometimes we don't really need to worry about quantum effects,
Starting point is 00:59:26 and especially this is the case if we're simulating very, very large molecules. Think of like a protein or a DNA molecule that have thousands or even millions of atoms in them. And the main things that we're interested in are the overall three-dimensional shape of the molecule and how it moves and bends and distorts around. And we're not even talking here about the movements of individual atoms. We're talking about big groups of atoms as they're kind of move. move around. For molecules that are this huge, we don't necessarily care about the precise bond geometries or the exact wave function and things like that. We want to abstract at a higher
Starting point is 01:00:02 level than that. And so if that's what we're interested in doing, we may want to use a technique called molecular mechanics or molecular dynamics. And this is a classical approach. So density functionals, molecular orbitals, wave functions, forget about it all. That's all quantum stuff. We're not even going to worry about that. We're going to treat. every atom as if it's a billion ball connected to other billiard balls by springs that can rotate. So there are springs that are also rotatable. That is the basis of molecular mechanics methods. And what you do in a molecular mechanics, in molecular mechanics methods is first that you, you know, specify your molecular geometry, so you always have to do that. So basically that's just
Starting point is 01:00:39 your connection of all of the atoms with the other atoms and you need to specify what types of atoms there are. All right, so far so good. Then what do we do? Well, then we need to specify a potential energy function that describes the energetic state of all of those bonds. Remember here, we're treating bonds classically, so we're forgetting about all of the quantum stuff and we're just treating them as if they're balls on springs. So there are different types of energetic interactions that can exist or that can occur between balls on springs. And some of the main ones I'll just mention here, because what we need to do is we need to define a potential energy function that incorporates all of these different types of interactions. For some obscure reason that I still haven't been able to work out,
Starting point is 01:01:16 these potential energy functions are called force fields. Now that sounds a bit sci-fi, and it also sounds like it might be a function that tells you what the force is, but it isn't. It's a potential energy function, so don't get too confused, but they're called force fields, and so I guess we're stuck with the name, but it's really a potential energy function. So what it does is it takes the coordinates of all of the atoms, and then it returns the energetic state that that set of atoms exist. So what are the types of energetic interactions that can exist? Well, the simplest one is just a simple bond interaction. So basically, how far apart are the two atoms that have bonded together? Generally, there's going to be an equilibrium length that they sort of like existing at.
Starting point is 01:01:53 If I stretch them further apart, then that's a higher energy state, or if I compress them too close, then that's also a higher energy state. So that's one type of energy. Basically, spring, like bond length on a spring. Another type of energetic state is rotations about a bond. So instead of stretching a bond, I can rotate the bond. Basically, like, extending your forearm from your elbow. So if you think about the angle between your elbow and your upper arm, that's basically a bond angle. And bonds can also rotate in that way as well. And generally there'll be a sort of a position that they prefer. And when they move away from that equilibrium angle, then they have a higher energy state. Now there's another type of rotation as well, which is called a dihedral. This is a bit
Starting point is 01:02:31 more complicated because it involves four atoms instead of just the three, you know, the three points of a simple sort of hinge. It's a different type of rotation than the rotation that you get if you just sort of flex your forearm up and down. It's sort of a sideways rotation. If that forearm example didn't help, then don't worry about it. Just take my word for the Deidreel is a different type of bond rotation that has a different type of energy associated with it. In addition to those, there are also Van der Vel's forces. So we've talked about those in the past. These are the interactions between non-touching atoms that are also not bonded to each other, but just get close to each other. And basically it's because they're electron clouds sort of interact with each other.
Starting point is 01:03:05 Although, again, we're just talking about classical models, so we're not really even worrying about electron clouds. We're just talking about atoms getting too close to each other, essentially. And then finally, there is good old-fashioned electrostatic interactions. If I have two charges, they're going to interact with each other according to Kulom's law. So those are five different types of interactions. You've got bond stretching, bond rotating, another type of bond rotating called dihedral, Van der Valle's forces, and electrostatic interactions. All of these are treated classically, and there are ways of parameterizing them. So basically, the parameters that we put in here will be like spring coefficients that describe how much a spring wants to return to its equilibrium
Starting point is 01:03:44 length and another similar coefficients describing how much an angle wants to bend back. And also I need to define what the equilibrium angle is for each type of atom. Obviously, I need to specify the charges when I'm dealing with electrostatic interactions. And Van de Vals forces are kind of the trickiest one, but they're parameterized using a series of equations as well that needs to be parameterized. So what I end up with is this equation, which is called my force field, has a big long list of constants in it or of parameters. And there's not just like a few of these for each type of interaction, but there's going to be like, there's going to be a constant for each type of bond for all of the types of bonds that are present in my interaction. So if I have a
Starting point is 01:04:23 carbon hydrogen bond, then that's a parameter for that. If I have a carbon oxygen bond, there's another parameter for that. If I have a carbon oxygen double bond, there's another parameter for that. And in fact, it's even more complicated than that because you may want to add additional parameters in for bonds in different chemical environments. So if I have a carbon and oxygen nearby to a nitrogen, that might be different to a carbon-oxygen bond that's not near a nitrogen, for example. So you can see how we're going to end up with hundreds of these parameters that all need to be determined somehow. And that's the big problem with these molecular mechanics methods, is that there's a huge number of these empirical parameters there. Because we're having to treat things classically, so we can't just sort of compute things from first principles like you can with Abinichio methods.
Starting point is 01:05:04 The big advantage is, though, that once you've got these parameters and you've got your force field equation, then it's pretty easy to work out what you want. So first of all, you can work out the lowest energy state of the molecule by just minimizing that potential energy function. So remember, the potential energy function is just your force field. If you just minimize that with respect to the positions of the atoms, that's the only free variable you have, where the atoms are in relation to each other, then that will give you the minimum energy state of that molecule. It may be quite difficult to find the minimum because it's a very complicated space. There's obviously lots of moving parts there depending on how big your molecule is, but in principle there's a fairly easy way to achieve that. Now typically what we actually want to do is not just find the minimum,
Starting point is 01:05:45 but we actually want to see how these molecules move over time, how they bend and stretch and change their shape and interact with other things. And this is called molecular dynamics when we do these sort of simulations. I actually worked for years doing molecular dynamic simulations as part of a research group. The way that these molecular dynamic simulations work is you start off with your geometry and your force field and your list of parameters, and then you give an initial position of your atoms, consistent with whatever geometry you've set up, you initialize your simulation. Then what you do is you use your force field to work out what the forces on each of those atoms will be. because if you hopefully recall the force of one thing on another thing
Starting point is 01:06:28 is directly related to the basically the derivative of the potential energy so the force in the X direction will be just the derivative of the potential energy in the X direction so if I have my positions and my potential energy function I can just directly calculate the forces
Starting point is 01:06:43 on every atom in that molecule once I've got the forces using f equals MA I can work out the accelerations on all of the atoms so I just need to know their masses and I've got accelerations got accelerations. Once I've got accelerations, I can just use those accelerations to work out the change in the position of each of my atoms over some increment of time. The new positions will just be the initial position plus the velocity times my increment of time, plus half the acceleration times
Starting point is 01:07:10 my increment of time squared. And this is done iteratively, right? So you just use very short increments of time in your simulation so that you move them just a tiny amount, and then you recompute what your new acceleration should be based on your new positions. To summarize, start off with my initial positions and my potential energy given those positions. Given the potential energy, calculate the forces. Given the forces, calculate the accelerations. Given the accelerations, calculate the new positions. Having updated my positions, recalculate the potential energy. Using the potential energy, calculate the new forces. Using the new forces, calculate the new accelerations. And then so forth. And you iterate this as long as you want. And what you'll get,
Starting point is 01:07:51 it's basically a trajectory of the molecule moving around and changing shape. There are obviously other complications as well, such as specifying the boundary conditions. So molecules don't exist in a vacuum. You'll generally want to put them in some sort of space. Often we'll put them in a solvent of water molecules, for example. But then we have to define some way that the molecule interacts with the side of the container that it's in. Often we use something called periodic boundary conditions, which is basically just that the molecule exists in a universe that wraps around on itself.
Starting point is 01:08:19 So if it goes too far to the right, it will just sort of appear. back on the left. And there's other things that you need to control the temperature and the pressure of the box that it's in and ensure that the energies don't skyrocket and other things like that. But we need to go into all those details here. The basic point is that if I run my simulation for long enough and I've specified the boundary conditions and temperature and everything appropriately, then I should be out to calculate theoretically any thermodynamic property of interest, such as maybe the melting point or the minimum energy, kinetic energies, whatever sort of things you might want. That is relying on the fact that I'm able to simulate these for long
Starting point is 01:08:52 enough periods of time to get enough data. Now there is one thing that I didn't mention, and this will serve as a good point to close out on. You remember I mentioned that you've got your force field and you've got all your parameters in the force field, maybe hundreds of them for different combinations of atoms? Where do these parameters come from? Obviously your results are only going to be as good as your force field and the parameters that you put in and there's always inaccuracies there. But nevertheless, how do you get these parameters? Well, they can be determined empirically, you can make measurements about how particular types of atoms interact and then use those to construct parameters. So certainly that is one way that you can do it. But
Starting point is 01:09:27 increasingly more and more of these parameters are found using quantum chemistry techniques. So basically what you might do is you might simulate a simple system with just a few of the atoms that you're interested in and a small molecule, say one amino acid or something, using a quantum chemical technique, whether it's Hartree Falk or Density Functional or whatever, using that you will then calculate the parameters that you're interested in, such as bond lengths or bond angles. Then you take those equations and stick them into as parameters of the force field that you want to use to simulate a much bigger molecule. So using techniques like this, we can actually kind of connect up the different levels of theory. Basically, we can use quantum level theories to get very accurate predictions,
Starting point is 01:10:13 or as far as things go, very accurate predictions of certain parameters, which we can then use to parameterize much bigger molecules at a more abstract level. And I think this is a really interesting part of computational chemistry and computational science in general, is how you can connect up simulations at different levels, which make different approximations to give you something that's useful then to plug in as a parameter to a higher level of theory. That brings us to an end of this episode and an end to our two-part series on computational chemistry.
Starting point is 01:10:40 Hopefully you found it interesting. I know it was quite technical. but I did give a warning at the start. I'll just give a very brief summary of what we talked about. We focused mostly on describing Hartu-Focque methods, which are an ab initio technique for determining the total molecular wave function, basically from solving Schrodinger's equation. We did talk about how certain assumptions are needed,
Starting point is 01:11:00 such as the Born-Obenheimer approximation for molecular geometries, neglect of relativistic effects, using a finite number of basis functions for solving our ruthane equations, and using the mean-field approximation to ignore. electron correlation effects and this can be relaxed by using multiple slated determinants as in the configuration interaction techniques that I described. I then went on to discuss a few other techniques that build on or sort of a different ab initio methods including semi-emperical techniques which basically take a
Starting point is 01:11:29 Hartree-Foc approach but then instead of trying to solve things by solving lots of integrals they find ways of parameterizing them using empirical methods and other approximations to get the results much faster but at a cost of accuracy and then we talked about density functional theory which is a different approach which uses density functionals instead of wave functions in order to describe the positioning of electrons. Finally, we talked about how molecular mechanics provides a method for classically simulating the interactions of much larger combinations of particles at the cost of accuracy and having to make more assumptions, but that you can connect the two levels of theory together by using ab initio or other methods for
Starting point is 01:12:08 estimating the parameters that you then use for as numbers that go into, your force field for simulating the trajectory of your larger molecular system. As I said, thanks again for listening. If you'd like to support the podcast, you might consider becoming a patron on our Patreon page, which you should be able to find in a link in the description to this episode, or if you just Google Patreon James Fodor, then that should get you there as well. If you'd like to make a suggestion or ask a question or just give any feedback, feel free to send me an email.
Starting point is 01:12:37 My address is FODSTOV at gmail.com. That's FODDS1.com. Thanks once again for listening. And I'll talk to you next time.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.