 Okay, so welcome back everyone. We start with the afternoon sessions. The first speaker is Valerio Vitale here who will show you the how you can sort of fix this problem of coming up with good projections to Vania Ryan's system. And so his talk will be about Vania 90 and the SDM method. And it will be a mixed lecture with some hands-on tutorials there. And so please Valerio, thank you for coming and the floor is yours. Thank you, Antimo. Thank you for inviting me. Yeah, so today's tutorial is about SDM and how this can be used in conjunction with Vania 90. My talk is going to be the first part more of recap of what Lillin told you yesterday. And then we'll have a hands-on part of about roughly an hour. And after this talk, which is just a way of seeing how SDM can work in conjunction with Vania 90, June Fang will show you how to optimize everything with Aida. Right, so this is just a brief recap of yesterday and these days you should now be familiar with all these equations. But basically if you have isolated bands and you want to visualize isolated bands, you have to find a gauge. And if you want to maximally localize Vania function, this gauge is fixed by minimizing this spread function. And in a simple case where you have isolated bands like a semiconductor or an insulator, and there's more number of bands, these is achieved quite simply. So you first start with some initial projection, some initial functions, right, or a localized function, and you project your conscious state of this function, and then you grade this matrix. And you can create this localized function in this way. You'll do a loading of normalization and this is basically your initial guess for your new matrix. And as you can see, this works quite robustly. So for a simple system and a few number of bands, isolated bands you don't really need to know the initial projections. And of course, more complicated cases, but basically if you start from four s orbitals in the middle of the bond here for silicon, for example, which start with four s like random functions in a unit cell, eventually you still get to the minimum of this spread function. So that means the spread function is quite, the minimum is quite shallow, you have a large basin, and you can start from a different initial guesses and you will end up in a lower minimum. Things are quite different if you want to disentangle bands. The idea is similar, but now you have a larger space. You don't have a specific number of bands, but these bands are entangled with others, you have a larger space, but the procedure is quite similar. So you start with a localized number of functions, which is a number of bands that you want to visualize at the entangle. Can everybody hear me at home online? Can people hear me online? Okay. Can people hear me over at the end of the room? Okay. And yeah, so the procedure for entangled bands is not too much different, but then what you want to do is to find these states that in this energy window that you want to disentangle that maximize the smoothness of your manifold, the smoothness in the k space relative to k. And this is what's called a disentanglement, and this is a multi-objective optimization problem. So what happens here is that if you start from forest like random projections, or if you start from forest in three on silicon, which is what chemically your intuition suggests, you find two different minima, right? So you try to vanu your eyes at disentangle this band, and you end up in two different minima. So here initial projections come out. And entangled band is usually the most difficult case, and is also one of the most interesting case that you can encounter. So the algorithm that maximizes this smoothness of the manifold is the Suza-Marzari Vanderbilt, and is a multi-objective non-combat optimization. So it's highly dependent on the initial guesses. But there's an alternative method that we mentioned yesterday, which is based on the density matrix of information that you find in the density matrix, and in particular is based on the QR, the composition with column pivoting of the density matrix, which doesn't have this issue, doesn't suffer from this issue, and is a one-shot algorithm, and it's not an iterative algorithm. And it works by looking at information that you already have in your density matrix. So physically, the idea, as Linin said yesterday, is basically to find what's are the most representative columns of the density matrix, which in a sense are the columns that overlap less and are the most localized in your density matrix. And in general, if you have a gap or a semiconductor or an insulator, then your density matrix decays exponentially with the distance between electrons. But for metals, it's only decayed algebraically. So the idea is basically that you find, you use density matrix, which is for isolated bands, density matrix is basically a protracted to the space of the balance state, and it's gaping balance. And you can represent the density matrix, both in terms of your conscious states and your vanu function. And as I said, it is exponentially localized for isolated bands if you have non-topological systems. And you can think about columns of the density matrix in the real space representation as some sort of projection of the density matrix on two very localized over the delta like functions. So you can create a function phi centered on R0, which is basically the result of projecting the density matrix to a very localized function, a delta function for example. And this would give me a column of the density matrix. I think you've seen this picture before, but it's just to show you how this is done in a computer basically. So you have your density matrix, you discretized real space, and you can write your density matrix like this, write this standard to a constant orbitals. And this is basically what you get if you have a simple phi like orbitals. And as you can see, if I choose a column of this density matrix, this is usually a well localized function, and this goes from zero distances which are large here, for example. And apart from a phase, basically I have a quite well localized function which would be some more my feeling like orbital. So you can see that basically if I can extract this column by just doing a matrix multiplication of these density matrix times a very localized vector, which basically has a whole zero here and just one at some point. So that's the original idea. It's more physical intuitive. Basically you have this density matrix and the columns are well localized functions. And you want to select the columns that are the most represented in the way of this density matrix. And I could choose n random column, but this might not be, in a sense, linearly independent, also linearly independent. So you want to choose the ones that are as linearly independent as possible that means less overall, basically. And the idea is to use this qr with column pivoting, which is exactly what it does. So the qr method is exactly factorizing the density matrix into two matrices, q which is unitary and r which is top triangular. And it also speeds out a matrix which tells you which are how to order the columns, such as the first are the more linearly independent ones. For generalization to move the bands is very easy. It's not really complicated. So for isolated bands you can basically use the SCDM without any parameterization. So if it's a number of bands that you want to vanuize, it's the same, it's just a number of vanu functions that you want to obtain, then basically there are no parameters. You can still use this idea of a cosy density matrix where you use this profile function as I explained yesterday, but this would be just a cutoff basically, he decided function, for example, which sets your energy window in the middle of the gap. So this is really parameter free. And we have tested this idea on many systems, many iterating systems in this particular paper, we study 81 iterating systems. And we found, so these basically are on the y-axis is the difference, the main error I would say, the main error and the max error of your bands that are vanuized with the SCDM method and the DFT bands. And here you can see that basically we use the SCDM in isolation, so without further doing an iterative step where we also maximally localize the vanu function. And then in this light pink here, we also use the SCDM as initial guess to the maximally localize vanu function. And there is a little difference in reality to the SCDM only and the SCDM. So the SCDM works already without the extra step of the maximally localization. But maximally localization does help in some cases. So here the raw K is the different fineness of the grid in reciprocal space. So this basically tells you the number of points that you have in your K grid. So small raw K means high density. And you can see that the results improved. So basically we have the error, for example here we have basically 93% of all the systems, so 75, 81, the main error between the vanuized function, the vanuator interpolated function DFT is below the 2 MVP. But things are slightly more complicated if you want to decent tango bands and then in this case basically you have two parameters. In reality you have three parameters you want to choose. So basically in your calculation one parameter is the number of bands, which is not 6. And then you have these two other parameters, mu and sigma, which define your profile function F. And there are different ways of decent tango bands. For example in this case you want to vanuize the valence, manifold valence bands plus some conduction bands. And then you can use this complementary error function here, which basically tells set to 0 all the elements in the density matrix are above some certain region. But you could also choose something different. You want to basically decent tango bands, like for example only the conduction bands or just B bands in copper for example. And you can use a different profile function. In this case you can use a Gaussian function for example. And you still have to define these only two parameters mu and sigma, which define the center of your Gaussian and spread the energy region that you're interested in. So how does it work and how do we set these parameters mu and sigma? So the idea is that you can do it the way I want. You can use your chemical intuition and your physical intuition in a sense. You can set mu, if you want to for example vanuize bands up to this line here. You can set mu around this value and then a sigma, which is basically like bandwidth of your bands of interest. You can do that and that doesn't really work well. So if you choose these two parameters intuitively as you would, so basically mu around your upper bound of the energy window as sigma, which that contains the bandwidth of the bands you're interested in, doesn't really work. So we had to come up with a different idea and the idea to choose mu and sigma in a more reliable way is to use this concept of projectability. So what are the projectability? I think these are quite important because Jungtang also is going to talk about these. And it's basically the idea of projecting your conscious states onto the pseudo-atomic orbitals in your pseudo-potentials. So these five functions in general is on localized functions. But in particular, in our case, is to use the information in the pseudo-potential to make everything automatic. So basically you don't have to choose these five functions, but you extract them from your pseudo-potentials. And you compute this projection of your conscious states onto these pseudo-atomic orbitals. The square is sum over them and you get something which is between zero and one. It's bounded. And these basically give you an information on how different bands project onto these states. So you have example bands that have a high projectability and mostly on the core states. So this will have high projectability on the, if you have S or P orbitals in your system. And usually these have a high projectability because these bands are pretty flat. So in projective conscious states, these will look like very localized orbitals. And then you have other bands up here where your projectability decrease because this will become more and more delocalized and eventually you have the continuum bands. And so the projectability goes down to zero. So this is just a way to extract this information from something you already have which is the function of your pseudo-potential. And what you do, you do, you basically fit an error function. If you want to study, if you want to, for example, minimize bands with your error function, you basically fit an error function to the projectability and you find a nu and a sigma. And the algorithm that works for most of the materials is to use these recipes. So basically once you fit the projectabilities, which is what we're going to do in the tutorial as well, the optical, the optimal mu that you find is actually the mu from the fit minus three times the sigma from the fit, whereas the sigma optimum is the sigma from the fit. So the reason why this works, it's so many materials, it's not super intuitive, but the reason basically is that you have to find a sweet spot between your spread function of, I think my microphone was annoying. So basically you have to find a sweet spot where your spread functional is small, but the error in your interpolated bands is small as well. And here, for example, we plotted these on the left here is the spread functional as a function of mu and sigma. And here is the mean error of your interpolated bands as a function of mu sigma. And you can see that basically I could use very large mu and large value of mu and sigma. So introduce more and more bands in my optimization. These, of course, will result in a smaller spread function. I have more freedom now, including more bands that are higher in energy have more freedom to rotate them in a way that I find very localized orbitals. But at the same time, my binary interpolated bands error will become very large. Right here on the right. So basically you have to find a way of choosing mu and sigma such that your spread function is small, but also your error is small. And as you can see here, this is the line where we set mu minus three sigma for this particular system, which I think is the tungsten. But we tested on many, many systems. This line here where you set mu minus three sigma is actually always in this sweet spot of having a small spread functional and a small error. So it's just an heuristic. Okay, so an example of why this is cool and useful and can save many hours is, for example, in the carbon magnitude with projection. So if you want to do, if you want to project vanu-rise these bands from a carbon magnitude, you need all these projections. If you want to have such a nice vanearization disentanglement, you need all these projections are all S orbitals in the middle of bonds, right here. And all PZ orbitals, which need to be properly oriented according to the curvature of your carbon magnitude. So otherwise you don't get this very nice interpolation from vanu-1990. And nice disentanglement. So basically, if you think about it, you have to spend many hours to have this projection right. Whereas in using SCDN, you basically need two blocks, one in the PW to vanu-1990X where you tell that you want to use SCDN projections and what kind of disentanglement procedure you want to do. And just this line in the vanu-1990 input. And you get the same result, right. So you can play with mu and sigma. So that's much faster than actually playing with so many projections. So you have only two parameters. But if you don't want to play with mu and sigma, you can use the projectabilities. The projectabilities according to recipe, either these two values, right. And you're done. And we try this for metals and other systems, so over 200 3D materials, spanning quite a lot of the table. And we found that this works pretty well also for disentanglement. So it's not as good as the isolated bands of course. But we found that basically you can get for all the systems, well, for 97% of the system, you can get an error that is below 20 mb if you choose this density of k points. So this is usually what we suggest to use. But with these, basically you can have an error which is below 20 mb. And usually the error is mostly in the upper bound of your bands. So this is then being automated thanks to Antimo and Giovanni and Junfeng as well. So we put everything together, quantum espresso of 90 databases into AIDA. AIDA, it's a Python materials for multi-platform, which Junfeng will show you how to use in the next tutorial. And you can create this wonderful automated graph where you only think that you need to give to AIDA, I think the structure, right, of a material. And most of the parameters are already set up through the heuristics. Of course, you can choose them, you can select different k point mesh if you want, but basically you can feed AIDA with the structure and ask to get a vanearization of bands and then everything is automated through this procedure. And that nice thing about AIDA is also that it gives you this provenance graph automatically generated. So basically every time you can know exactly what kind of calculation you've done, you can redo it. And basically it's very useful for people that want for fair computational methods. So if you want to know more about it, you should really attend Junfeng Chao tutorial next. Right, so summary is that we all know that maximum localize a vanear function or vanear function in general are very useful that there is this issue with initial projections, especially for entangled bands. And the SCDM overcomes this issue in a very simple way. You only need to set up two, to define two parameters, three if the number of bands or if you include the number of bands as well. And these two parameters can be actually specified for you through an algorithm, through an arithmetic algorithm. And it works very well, both for isolated bands and for entangled bands. And we have tested, I think Junfeng is done other tests as well. And these methods also being then extended to speeders as well. So it's not just a block way function, but also a system with a spin orbit coupling. And as I said, it works quite well. It works particularly well for isolated bands, but it's also very, very useful for entangled bands. Right, so this is an algorithm. Most of the people I work with in this project, I think with Giovanni and Antimo, who set up all the AIDA framework, and these are the funding. Okay, so that's it for the recap of the SCDM. I think we can start directly with the tutorial, with the hands-on tutorial. So maybe I do a separate record for that.