From ogitsu at llnl.gov Wed Aug 23 07:38:46 2006 From: ogitsu at llnl.gov (Tadashi Ogitsu) Date: Tue, 22 Aug 2006 22:38:46 -0700 Subject: [Wannier] parameter to control convergence Message-ID: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> Hello, I've just started to use the wannier90 code, and having a little problem in converging the Wannier functions, so, I would appreciate very much if you could give me a little bit of tips in controlling the convergence. What I need is the Wannier centres and its spreads for beta- rhombohedral boron crystal. The system is a little bit big, 105 boron atoms in the rhombohedral unit cell (this is not exactly the experimental structure but that is another story. So, let me call it *beta-boron* in this email). The electronic structure of the *beta- boron* is metalic so that I'm using the disentanglement scheme developed by SMV (thanks Ivo!). I've put 180 bands, and the Fermi level is at around 158th band (this is metal). So, I specify num_bands = 180 and num_wann = 158. I've also specified the dis_froz_max equal to the Fermi level given by the PWSCF 3.1.1. The code seems to be working correctly, I mean, I do NOT see any warning (besides, "name = wann_main not found in io_stopwatch" when I restart the job from checkpoint), and the last message is "All done: wannier90 exiting". I've made iterations up to a little over 300, and the individual spreads are certainly decreasing, mostly down to 1.4-1.5, looking like reasonable. DLTA parameters go down to 10^(-4). However, there are 4 wannier centres, whose spreads are unusually large, around 55, and they do not decrease. So, my question is, which parameter shall I change to improve the convergence? FYI: I've tested with alpha-rhombohedral boron, which consists of 12 boron atoms in the rhombohedral cell. This converged without any problem, and the results, i.e. the locations of Wannier centres and its spreads look perfectly reasonable. This system is an insulator so that it does not require the disentanglement procedure though. I'm looking forward to hearing your suggestions. Thanks. By the way, the system size is very large as you might notice, so, I think, it is a quite challenging problem but the code seems to be dealing very well (besides the convergence). I'm very impressed. Best, Tadashi Ogitsu #I might be observing a memory leak but I'll post it when I get more accurate information if it comes from the computer or the code. From marzari at MIT.EDU Wed Aug 23 15:54:36 2006 From: marzari at MIT.EDU (Nicola Marzari) Date: Wed, 23 Aug 2006 09:54:36 -0400 Subject: [Wannier] parameter to control convergence In-Reply-To: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> Message-ID: <44EC5E1C.2070608@mit.edu> Dear Tadashi, welcome to the list ! It would be helpful to know what you'll need the MLWFs for - for chemical intuition, as a basis set, etc... My sense is that num_wann needs to capture the "natural"/"physical" number of orbitals that you want, and num_bands needs to be large enough to make sure you capture all of the dispersive bands generated by the Bloch sums of the num_bands localized Wannier functions. To give you an example - suppose you were to study graphene (one sheet of graphite). Sensible num_bands would be 2.5 times the number of atoms, or 4 times the number of atoms. In the first case, you are expressing the desire to obtain MLWFs that represent bonding combination of sp^2 orbitals (i.e. the covalent bonds of the graphitic backbone), and "half-empty" p_z orbitals. Each atom will have 1 p_z orbital, and 3 covalent bonds - since each bond is shared by 2 atoms, we have 1. + 3./2. = 2.5 MLWFs per atom as a target. The other possibility would be 4 MLWFs per atom - then, you would hope to disentangle 1 p_z and 3 sp^2 orbital per atom, all atom-centered. If the electronic structure of beta-boron is similar to alpha rombohedral, you need to ask yourself how the MLWFs of alpha look like - those are something that you want definitely to capture in your calculation (and you can use projection onto many different gaussians, to make sure you initialize the localization or disentanglement correctly). What else you need to capture is the tricky part, and some systems (e.g. graphite, or nanotubes) have empty states a few eV above Fermi that are very free-electron-like. You could start by playing around and increase num_bands - there should be a magical one in which everything falls into place. Worth a try would also be a num_bands equal to 210, and projection to s and p_x,y,z orbitals on each boron. Let us know, nicola nicola Tadashi Ogitsu wrote: > Hello, > > I've just started to use the wannier90 code, and having a little problem > in converging the Wannier functions, so, I would appreciate very much if > you could give me a little bit of tips in controlling the convergence. > > What I need is the Wannier centres and its spreads for beta-rhombohedral > boron crystal. The system is a little bit big, 105 boron atoms in the > rhombohedral unit cell (this is not exactly the experimental structure > but that is another story. So, let me call it *beta-boron* in this > email). The electronic structure of the *beta-boron* is metalic so that > I'm using the disentanglement scheme developed by SMV (thanks Ivo!). > I've put 180 bands, and the Fermi level is at around 158th band (this is > metal). So, I specify num_bands = 180 and num_wann = 158. I've also > specified the dis_froz_max equal to the Fermi level given by the PWSCF > 3.1.1. > > The code seems to be working correctly, I mean, I do NOT see any warning > (besides, "name = wann_main not found in io_stopwatch" when I restart > the job from checkpoint), and the last message is "All done: wannier90 > exiting". > > I've made iterations up to a little over 300, and the individual spreads > are certainly decreasing, mostly down to 1.4-1.5, looking like > reasonable. DLTA parameters go down to 10^(-4). However, there are 4 > wannier centres, whose spreads are unusually large, around 55, and they > do not decrease. > > So, my question is, which parameter shall I change to improve the > convergence? > > FYI: I've tested with alpha-rhombohedral boron, which consists of 12 > boron atoms in the rhombohedral cell. This converged without any > problem, and the results, i.e. the locations of Wannier centres and its > spreads look perfectly reasonable. This system is an insulator so that > it does not require the disentanglement procedure though. > > I'm looking forward to hearing your suggestions. Thanks. > > By the way, the system size is very large as you might notice, so, I > think, it is a quite challenging problem but the code seems to be > dealing very well (besides the convergence). I'm very impressed. > > Best, > Tadashi Ogitsu > #I might be observing a memory leak but I'll post it when I get more > accurate information if it comes from the computer or the code. > _______________________________________________ > Wannier mailing list > Wannier at quantum-espresso.org > http://www.democritos.it/mailman/listinfo/wannier -- --------------------------------------------------------------------- Prof Nicola Marzari Department of Materials Science and Engineering 13-5066 MIT 77 Massachusetts Avenue Cambridge MA 02139-4307 USA tel 617.4522758 fax 2586534 marzari at mit.edu http://quasiamore.mit.edu From ogitsu at llnl.gov Wed Aug 23 20:24:28 2006 From: ogitsu at llnl.gov (Tadashi Ogitsu) Date: Wed, 23 Aug 2006 11:24:28 -0700 Subject: [Wannier] parameter to control convergence In-Reply-To: <44EC5E1C.2070608@mit.edu> References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> <44EC5E1C.2070608@mit.edu> Message-ID: Dear Nicola, Thanks for your quick reply. I'd like to develop chemical intuition of boron crystal from Wannier functions. As you might know, boron chemistry is very unique; as it is described in many chemistry textbook, it does not follow conventional electron counting rule such as Lewis dot diagram (which works very well for carbon based systems). Typical example is B2H6 molecule, in which two hydrogen atoms are shared by two boron atoms forming two banana like bond (the other four hydrogen atoms seem to form the conventional bonds with boron atoms). I noticed that the Wannier function can be used to identify the banana bonds in boron system, e.g., the Wannier centre of the banana bond in B2H6 molecule indeed is located in the middle of triangle formed by two boron atoms and one hydrogen atom, contrary to a conventional covalent picture where the Wannier centre will be in the middle of two atoms (which could correspond to Lewis dot diagram). I'm trying to analyze the bonding nature of beta-boron crystal with this way and to compare with known empirical rule for boron chemistry such as mno rule. I'll try your suggestions that to change the num_bands and num_wann, and let you know how it worked. Meanwhile, I have a further question related to this issue. Do the occupation given in the pwscf calculations used in Wannier90 code? or in Wannier90, only eigenfunctions from the pwscf output are used and the energy window to construct the Wannier functions (or the definition of subspace for the unitary transformation?) is determined only by dis_*_[min|max] parameters? Thanks a lot! #Using the occupation information does not sound making sense if I have an energy window, which specify the subspace, but as a beginner, I just wanted to make sure if I understand correctly. Very best, Tadashi On Aug 23, 2006, at 6:54 AM, Nicola Marzari wrote: > > > Dear Tadashi, > > welcome to the list ! It would be helpful to know what you'll need the > MLWFs for - for chemical intuition, as a basis set, etc... > > My sense is that num_wann needs to capture the "natural"/"physical" > number of orbitals that you want, and num_bands needs to be large > enough > to make sure you capture all of the dispersive bands generated by the > Bloch sums of the num_bands localized Wannier functions. > > To give you an example - suppose you were to study graphene (one > sheet of graphite). Sensible num_bands would be 2.5 times the number > of atoms, or 4 times the number of atoms. > > In the first case, you are expressing the desire to obtain MLWFs that > represent bonding combination of sp^2 orbitals (i.e. the covalent > bonds > of the graphitic backbone), and "half-empty" p_z orbitals. Each > atom will have 1 p_z orbital, and 3 covalent bonds - since each > bond is shared by 2 atoms, we have 1. + 3./2. = 2.5 MLWFs per atom > as a target. > > The other possibility would be 4 MLWFs per atom - then, you would > hope to disentangle 1 p_z and 3 sp^2 orbital per atom, all atom- > centered. > > If the electronic structure of beta-boron is similar to alpha > rombohedral, you need to ask yourself how the MLWFs of alpha > look like - those are something that you want definitely to capture in > your calculation (and you can use projection onto many different > gaussians, to make sure you initialize the localization or > disentanglement correctly). What else you need to capture is the > tricky > part, and some systems (e.g. graphite, or nanotubes) have empty states > a few eV above Fermi that are very free-electron-like. You could start > by playing around and increase num_bands - there should be a magical > one in which everything falls into place. > > Worth a try would also be a num_bands equal to 210, and projection to > s and p_x,y,z orbitals on each boron. > > Let us know, > > nicola > > > nicola > > > Tadashi Ogitsu wrote: >> Hello, >> I've just started to use the wannier90 code, and having a little >> problem in converging the Wannier functions, so, I would >> appreciate very much if you could give me a little bit of tips in >> controlling the convergence. >> What I need is the Wannier centres and its spreads for beta- >> rhombohedral boron crystal. The system is a little bit big, 105 >> boron atoms in the rhombohedral unit cell (this is not exactly the >> experimental structure but that is another story. So, let me call >> it *beta-boron* in this email). The electronic structure of the >> *beta-boron* is metalic so that I'm using the disentanglement >> scheme developed by SMV (thanks Ivo!). I've put 180 bands, and the >> Fermi level is at around 158th band (this is metal). So, I specify >> num_bands = 180 and num_wann = 158. I've also specified the >> dis_froz_max equal to the Fermi level given by the PWSCF 3.1.1. >> The code seems to be working correctly, I mean, I do NOT see any >> warning (besides, "name = wann_main not found in io_stopwatch" >> when I restart the job from checkpoint), and the last message is >> "All done: wannier90 exiting". >> I've made iterations up to a little over 300, and the individual >> spreads are certainly decreasing, mostly down to 1.4-1.5, looking >> like reasonable. DLTA parameters go down to 10^(-4). However, >> there are 4 wannier centres, whose spreads are unusually large, >> around 55, and they do not decrease. >> So, my question is, which parameter shall I change to improve the >> convergence? >> FYI: I've tested with alpha-rhombohedral boron, which consists of >> 12 boron atoms in the rhombohedral cell. This converged without >> any problem, and the results, i.e. the locations of Wannier >> centres and its spreads look perfectly reasonable. This system is >> an insulator so that it does not require the disentanglement >> procedure though. >> I'm looking forward to hearing your suggestions. Thanks. >> By the way, the system size is very large as you might notice, so, >> I think, it is a quite challenging problem but the code seems to >> be dealing very well (besides the convergence). I'm very impressed. >> Best, >> Tadashi Ogitsu >> #I might be observing a memory leak but I'll post it when I get >> more accurate information if it comes from the computer or the code. >> _______________________________________________ >> Wannier mailing list >> Wannier at quantum-espresso.org >> http://www.democritos.it/mailman/listinfo/wannier > > > -- > --------------------------------------------------------------------- > Prof Nicola Marzari Department of Materials Science and Engineering > 13-5066 MIT 77 Massachusetts Avenue Cambridge MA 02139-4307 USA > tel 617.4522758 fax 2586534 marzari at mit.edu http://quasiamore.mit.edu > _______________________________________________ > Wannier mailing list > Wannier at quantum-espresso.org > http://www.democritos.it/mailman/listinfo/wannier From jryates at lbl.gov Wed Aug 23 21:35:26 2006 From: jryates at lbl.gov (Jonathan Yates) Date: Wed, 23 Aug 2006 12:35:26 -0700 (PDT) Subject: [Wannier] parameter to control convergence In-Reply-To: References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> <44EC5E1C.2070608@mit.edu> Message-ID: On Wed, 23 Aug 2006, Tadashi Ogitsu wrote: Hi Tadashi, Thanks for telling us about your Boron calculations. I'd like to make a fairly general comment. But I think it might be at the root of your question. If we look at the valence states of an insulator then the MLWF are determined by the localisation criteria. The MLWF are "fully occupied", by which I mean that the sum of |w(r)|^2 over all of the WF gives the charge density. Here it is certainly valid to think about the bonding in terms of the MLWF. When we use the disentangling procedure (ie for a metal or to describe both valence and conduction states in a insulator) the MLWF are defined not only by the localisation criteria, but also by the dimension of the optimal subspace (ie the number of WF) and the ranges of the two energy windows. The MLWF are no longer fully occupied, we have "partially-occupied" MLWF. So now the sum of |w(r)|^2 over all of the WF is the not the charge density. Using these MLFW to interpret the bonding in metals is therefore not straight-forward. [which is to say that you need to think about how this issue affects your particular problem.] > Do the occupation given in the pwscf calculations used in Wannier90 code? or > in Wannier90, only eigenfunctions from the pwscf output are used and the > energy window to construct the Wannier functions (or the definition of > subspace for the unitary transformation?) is determined only by > dis_*_[min|max] parameters? Thanks a lot! You are correct, Wannier90 does not know anything about the occupation of the bloch states. The energy windows are determined by the dis_*_[min|max] parameters. One must also specify the number of WF to extract. There is a keyword called 'fermi_energy'. This is not used in the construction of the WF. It is used when generating a plot of the Fermi surface using Wannier interpolation [eg /cond-mat/0608257]. Yours Jonathan -- Dr Jonathan Yates: email: jryates at lbl.gov phone: 510-642-7302 Material Science Division, Lawrence Berkeley National Laboratory and Department of Physics, University of California, 366 Le Conte Hall #7300, Berkeley, CA 94720-7300, USA From marzari at MIT.EDU Wed Aug 23 22:52:58 2006 From: marzari at MIT.EDU (Nicola Marzari) Date: Wed, 23 Aug 2006 16:52:58 -0400 Subject: [Wannier] parameter to control convergence In-Reply-To: References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> <44EC5E1C.2070608@mit.edu> Message-ID: <44ECC02A.2050600@mit.edu> Dear Tadashi, a couple of comments following Jonathan reply: 1) if chemical intuition is what you are after, you might want to consider also the electronic localization function of Savin and others (Nature ca. 1994). That covers insulators and metals. 2) banana bonds were one of the things chemists didn't like about the Boys-Foster criterion of the '60s (to which our max-loc criterion is equivalent, in molecules). One example I think I remember is ethylene C2H4, where the double bond between the two carbons is represented with an up-banana, and a down-banana, mixing sigma and pi. Very unpalatable. 3) Boys-Foster localization can give un-chemical results: CO2 (linear molecule, O=C=O) has 3 MLWFs between C and each of the Os, and one on the outside of each O. Something like .O...C...O. , where ... looks like a triple bond (so C would have two triple bonds...). Anyhow there is a vast chemical literature in the '60 and '70s describing all of this. 4) even if the disentangled DMLWFs are not "chemical", or "physical", they still tell you who is hybridizing with who, and so offer some intuituion. Best luck, nicola Tadashi Ogitsu wrote: > Dear Nicola, > > Thanks for your quick reply. I'd like to develop chemical intuition of > boron crystal from Wannier functions. > > As you might know, boron chemistry is very unique; as it is described in > many chemistry textbook, it does not follow conventional electron > counting rule such as Lewis dot diagram (which works very well for > carbon based systems). Typical example is B2H6 molecule, in which two > hydrogen atoms are shared by two boron atoms forming two banana like > bond (the other four hydrogen atoms seem to form the conventional bonds > with boron atoms). I noticed that the Wannier function can be used to > identify the banana bonds in boron system, e.g., the Wannier centre of > the banana bond in B2H6 molecule indeed is located in the middle of > triangle formed by two boron atoms and one hydrogen atom, contrary to a > conventional covalent picture where the Wannier centre will be in the > middle of two atoms (which could correspond to Lewis dot diagram). I'm > trying to analyze the bonding nature of beta-boron crystal with this way > and to compare with known empirical rule for boron chemistry such as mno > rule. > -- --------------------------------------------------------------------- Prof Nicola Marzari Department of Materials Science and Engineering 13-5066 MIT 77 Massachusetts Avenue Cambridge MA 02139-4307 USA tel 617.4522758 fax 2586534 marzari at mit.edu http://quasiamore.mit.edu From ogitsu at llnl.gov Thu Aug 24 07:31:04 2006 From: ogitsu at llnl.gov (Tadashi Ogitsu) Date: Wed, 23 Aug 2006 22:31:04 -0700 Subject: [Wannier] parameter to control convergence In-Reply-To: <44ECC02A.2050600@mit.edu> References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> <44EC5E1C.2070608@mit.edu> <44ECC02A.2050600@mit.edu> Message-ID: <449030E9-8EAA-4119-BB35-0543C8D9564A@llnl.gov> Dear Nicola and Jonathan, Thank you very much for your responses. Those are very useful for me. Nicola, I will definitely look into the papers you suggested. Here, I'd like to explore a bit further possibility how much information we can extract from MLWFs. If I understand correctly, those problematic cases are all related to multiple (double) bond. Am I right? Do you know any case where even MLWFs in single bond system could give misleading picture? I feel that the word, banana bond is a bit incomplete expression, I should have used the alternative word, the three-centre bond (in contrast to two-centre bond). It is a little bit more than a mere terminology; it conveys the essence of the bonding nature, i.e., the bonding electron has to be localized in the middle of triangle (bent is not the essence). I guess, I'm trying to say that if the system does not form multiple bond, the location of MLWFs (and spreads) could be used to distinguish between three-centre bond and two-centre bond (not as a definite proof but as a qualitative explanation). Do you still find a critical pitfall in my argument? Thanks. Tadashi #Now I understand why Francois once implemented the MLWF function with localization in energy space as well. With this way, you can distinguish the sigma bond and pi bond since those are located in different positions in energy space. The example, you have pointed out are the typical cases that if you minimize only spread, it will mix the sigma bond and the pi bond equally, which produces a bit confusing picture (in contras to sigma/pi picture). On Aug 23, 2006, at 1:52 PM, Nicola Marzari wrote: > > Dear Tadashi, > > a couple of comments following Jonathan reply: > > 1) if chemical intuition is what you are after, you might want to > consider also the electronic localization function of Savin > and others (Nature ca. 1994). That covers insulators and metals. > > 2) banana bonds were one of the things chemists didn't like about > the Boys-Foster criterion of the '60s (to which our max-loc criterion > is equivalent, in molecules). One example I think I remember is > ethylene C2H4, where the double bond between the two carbons is > represented with an up-banana, and a down-banana, mixing sigma and > pi. Very unpalatable. > > 3) Boys-Foster localization can give un-chemical results: CO2 > (linear molecule, O=C=O) has 3 MLWFs between C and each of the Os, > and one on the outside of each O. Something like .O...C...O. , > where ... looks like a triple bond (so C would have two triple > bonds...). > > Anyhow there is a vast chemical literature in the '60 and '70s > describing all of this. > > 4) even if the disentangled DMLWFs are not "chemical", or "physical", > they still tell you who is hybridizing with who, and so offer some > intuituion. > > Best luck, > > nicola > > Tadashi Ogitsu wrote: >> Dear Nicola, >> Thanks for your quick reply. I'd like to develop chemical >> intuition of boron crystal from Wannier functions. >> As you might know, boron chemistry is very unique; as it is >> described in many chemistry textbook, it does not follow >> conventional electron counting rule such as Lewis dot diagram >> (which works very well for carbon based systems). Typical example >> is B2H6 molecule, in which two hydrogen atoms are shared by two >> boron atoms forming two banana like bond (the other four hydrogen >> atoms seem to form the conventional bonds with boron atoms). I >> noticed that the Wannier function can be used to identify the >> banana bonds in boron system, e.g., the Wannier centre of the >> banana bond in B2H6 molecule indeed is located in the middle of >> triangle formed by two boron atoms and one hydrogen atom, contrary >> to a conventional covalent picture where the Wannier centre will >> be in the middle of two atoms (which could correspond to Lewis dot >> diagram). I'm trying to analyze the bonding nature of beta-boron >> crystal with this way and to compare with known empirical rule for >> boron chemistry such as mno rule. > > -- > --------------------------------------------------------------------- > Prof Nicola Marzari Department of Materials Science and Engineering > 13-5066 MIT 77 Massachusetts Avenue Cambridge MA 02139-4307 USA > tel 617.4522758 fax 2586534 marzari at mit.edu http://quasiamore.mit.edu > _______________________________________________ > Wannier mailing list > Wannier at quantum-espresso.org > http://www.democritos.it/mailman/listinfo/wannier From ogitsu at llnl.gov Fri Aug 25 04:10:41 2006 From: ogitsu at llnl.gov (Tadashi Ogitsu) Date: Thu, 24 Aug 2006 19:10:41 -0700 Subject: [Wannier] parameter to control convergence In-Reply-To: References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> <44EC5E1C.2070608@mit.edu> Message-ID: <4872F20A-6DA1-4F89-B4BA-67DFA0E467E3@llnl.gov> Good evening, 1. I have found that those MLWFs with unusually large spread vanish if I increased the k-points grid size. I was using 2x2x2 before and now I'm using 4x4x4. Does it make sense? (Now, all of the MLWFs look reasonably localized) #Since the unit-cell size is big with beta-boron, I thought 2x2x2 grid is not that bad, but this seems to tell me that I cannot go cheap... 2. Also, at the beginning, I've mentioned about a possibility of memory leak. It seems that, memory size grow very much if I turn on wannier_plot. It grew rapidly after running for awhile, so, I suspected the memory leak initially. I found out later that if I switch off the option, the memory size stays around 100MB. Now, I'm guessing that turning on this option simply allocates large memory space. In my case, the original basis size were 66^3 FFT grid times 180 bands and, at that time, 2x2x2 kpoints. My firs question on this issue is that, does the wannier_plot indeed require larger memory size? Then, how can I estimate the size? In that particular case, the job crashed after awhile, and the machine has 32GB memory, so it looks like, it went over 32GB! #I would imagine that the memory size would be estimated something like (FFT grid)*(# bands)*(# of kpoints) *prefactor. I would like to know the prefactor if this assumption is correct. Thanking in advance! Best, Tadashi On Aug 23, 2006, at 12:35 PM, Jonathan Yates wrote: > On Wed, 23 Aug 2006, Tadashi Ogitsu wrote: > > Hi Tadashi, > > Thanks for telling us about your Boron calculations. > > I'd like to make a fairly general comment. But I think it might be > at the root of your question. > > If we look at the valence states of an insulator then the MLWF are > determined by the localisation criteria. The MLWF are "fully > occupied", by which I mean that the sum of |w(r)|^2 over all of the > WF gives the charge density. Here it is certainly valid to think > about the bonding in terms of the MLWF. > > When we use the disentangling procedure (ie for a metal or to > describe both valence and conduction states in a insulator) the > MLWF are defined not only by the localisation criteria, but also by > the dimension of the optimal subspace (ie the number of WF) and the > ranges of the two energy windows. > The MLWF are no longer fully occupied, we have "partially- > occupied" MLWF. So now the sum of |w(r)|^2 over all of the WF is > the not the charge density. Using these MLFW to interpret the > bonding in metals is therefore not straight-forward. [which is to > say that you need to think about how this issue affects your > particular problem.] > >> Do the occupation given in the pwscf calculations used in >> Wannier90 code? or in Wannier90, only eigenfunctions from the >> pwscf output are used and the energy window to construct the >> Wannier functions (or the definition of subspace for the unitary >> transformation?) is determined only by dis_*_[min|max] parameters? >> Thanks a lot! > > You are correct, Wannier90 does not know anything about the > occupation of the bloch states. The energy windows are determined > by the dis_*_[min|max] parameters. One must also specify the number > of WF to extract. > > There is a keyword called 'fermi_energy'. This is not used in the > construction of the WF. It is used when generating a plot of the > Fermi surface using Wannier interpolation [eg /cond-mat/0608257]. > > Yours > Jonathan > > -- > Dr Jonathan Yates: email: jryates at lbl.gov phone: 510-642-7302 > Material Science Division, Lawrence Berkeley National Laboratory and > Department of Physics, University of California, > 366 Le Conte Hall #7300, Berkeley, CA 94720-7300, USA > _______________________________________________ > Wannier mailing list > Wannier at quantum-espresso.org > http://www.democritos.it/mailman/listinfo/wannier From jryates at lbl.gov Mon Aug 28 03:52:04 2006 From: jryates at lbl.gov (Jonathan Yates) Date: Sun, 27 Aug 2006 18:52:04 -0700 (PDT) Subject: [Wannier] parameter to control convergence In-Reply-To: <4872F20A-6DA1-4F89-B4BA-67DFA0E467E3@llnl.gov> References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> <44EC5E1C.2070608@mit.edu> <4872F20A-6DA1-4F89-B4BA-67DFA0E467E3@llnl.gov> Message-ID: On Thu, 24 Aug 2006, Tadashi Ogitsu wrote: > 1. I have found that those MLWFs with unusually large spread vanish if I > increased the k-points grid size. I was using 2x2x2 before and now I'm using > 4x4x4. Does it make sense? (Now, all of the MLWFs look reasonably localized) > > #Since the unit-cell size is big with beta-boron, I thought 2x2x2 grid is not > that bad, but this seems to tell me that I cannot go cheap... Given the size of the unit cell I would expect it to be possible to find a set of well-localised WF from a 2x2x2 grid. I think the behaviour you see could arise when you try to describe a metallic system with a number of WF that is very close to the number of electrons (/2). This goes back to the points Nicola made in his first email regarding a "natural"/"physical" num_wann. So I would suggest trying to extract a larger number of WF. You might find the discussion of "maximum localisation per WF" in Thygesen et al Phys. Rev. B 72, 125119 (2005) relevant. However, before trying this, as quick test re-run the 2x2x2 calculation adding 'guiding_centres = T' to the input (see section IV-D-2 of the Marzari-Vanderbilt paper - I have had to use this option to converge the spread for certain systems.) Also check that the disentanglement procedure (minimisation of the invariant spread) has converged in both the 2x2x2 and 4x4x4 calculations. I always check two things 1- That the MLWF provide a good interpolation of the band-structure within the energy range of interest (ie the inner energy window) 2- That the MLWF are essentially real (the plotting routine tells you this) When my Wannier functions pass these tests, I'm usually happy with them. [although I realise that it is more difficult to apply these tests for large systems] > My firs question on this issue is that, does the wannier_plot indeed require > larger memory size? Then, how can I estimate the size? > > In that particular case, the job crashed after awhile, and the machine has > 32GB memory, so it looks like, it went over 32GB! > > #I would imagine that the memory size would be estimated something like (FFT > grid)*(# bands)*(# of kpoints) *prefactor. I would like to know the prefactor > if this assumption is correct. As you've noticed the plotting routine currently in Wannier90 is not as smart and efficient as it could be. This is something Arash and I plan to improve in the future. It is fine for small systems, but large systems are resource intensive. The memory size is [ (FFT grid)*(wannier_plot_supercell^3)*(num_wannier_plot) + (FFT grid)*(#wannier+#bands in outer window) ]*16bytes It is independent of the number of kpoints. For your case this is ~7Gb. Which is less than the physical memory, but compilers and operating systems can have problems with very large arrays, so that could be a cause. [it's hard to say without more information]. Plotting is always going to be an expensive operation in terms of time and memory. Some things that can speed plotting up include: 1- wannier_plot_supercell defaults to 2. Reduce it to 1 (although at the moment wannier90 does not translate a WF into the 'home' unit-cell for plotting. So if a WF lies in a neighbouring unit-cell, or on the boundary you will not see all of that WF). 2- Plot 1 WF at a time (via wannier_plot_list) 3- Reduce the FFT grid: For plotting there is no need to use the very dense grid from the planewave calculation, rather we can "decimate" it by removing, say, every 2nd element. This is the job of the ab-initio code, rather than wannier90. I assume you are using pwscf - I will send you our latest copy of the pw2wannier90 code, which include a 'decimation' option. However, if you are using a different ab-initio program it is easy to do yourself. Yours Jonathan -- Dr Jonathan Yates: email: jryates at lbl.gov phone: 510-642-7302 Material Science Division, Lawrence Berkeley National Laboratory and Department of Physics, University of California, 366 Le Conte Hall #7300, Berkeley, CA 94720-7300, USA From ogitsu at llnl.gov Tue Aug 29 19:33:48 2006 From: ogitsu at llnl.gov (Tadashi Ogitsu) Date: Tue, 29 Aug 2006 10:33:48 -0700 Subject: [Wannier] parameter to control convergence In-Reply-To: References: <6C4C3303-C2C4-4035-B3EA-B6BCFF0E9B4E@llnl.gov> <44EC5E1C.2070608@mit.edu> <4872F20A-6DA1-4F89-B4BA-67DFA0E467E3@llnl.gov> Message-ID: <99BEC2EE-8DA2-4328-A135-28ABAC00D1E1@llnl.gov> Dear Jonathan and other developers, Thanks for the reply. About the memory size, I was specifying wannier_plot_supercell = 3 without thinking carefully. I was watching the process using top command after a few of my jobs crashed, and noticed that it goes beyond 10GB, then machine's response gets extremely slow (I managed to kill the process though). With wannier_plot_supercell = 3, the memory size is around 24GB (?), so, it is understandable. One feed back. For beta-boron (105 atom cell), one has to start with using fixed_step at a smaller value than the default (I used 1), for a couple of ten iterations, then, switch to the normal line minimization. Otherwise, the calculation gets stuck somewhere; even with num_iter = 5, the code did not write on STDOUT at all for several hours, and I gave up. It may be helpful if the code either halts or writes a warning if the line minimization steps gets too many. I've tried larger values for number of bands, but it did not work. Simply the spreads diverge over wide range of values from less than 1 to over 50. My current understanding is as follows: Beta-boron's bonding character is covalent, although it has a Fermi surface (large hole in the valence band). Therefore it might be important to limit the subspace for wannierisation within the valence band (i.e. include the hole states in the valence band). Indeed, this strategy together with 4x4x4 k-points grid seem to give a reasonable result. Any comment will be appreciated. Jonathan, I'll try your suggestions, the quality of band interpolation and if MLWF real. Many thanks for your help. Best, Tadashi Ogitsu On Aug 27, 2006, at 6:52 PM, Jonathan Yates wrote: > On Thu, 24 Aug 2006, Tadashi Ogitsu wrote: > >> 1. I have found that those MLWFs with unusually large spread >> vanish if I increased the k-points grid size. I was using 2x2x2 >> before and now I'm using 4x4x4. Does it make sense? (Now, all of >> the MLWFs look reasonably localized) >> >> #Since the unit-cell size is big with beta-boron, I thought 2x2x2 >> grid is not that bad, but this seems to tell me that I cannot go >> cheap... > > Given the size of the unit cell I would expect it to be possible > to find a set of well-localised WF from a 2x2x2 grid. > > I think the behaviour you see could arise when you try to describe > a metallic system with a number of WF that is very close to the > number of electrons (/2). This goes back to the points Nicola made > in his first email regarding a "natural"/"physical" num_wann. So I > would suggest trying to extract a larger number of WF. > You might find the discussion of "maximum localisation per WF" in > Thygesen et al Phys. Rev. B 72, 125119 (2005) relevant. > > However, before trying this, as quick test re-run the 2x2x2 > calculation adding 'guiding_centres = T' to the input (see section > IV-D-2 of the Marzari-Vanderbilt paper - I have had to use this > option to converge the spread for certain systems.) > > Also check that the disentanglement procedure (minimisation of the > invariant spread) has converged in both the 2x2x2 and 4x4x4 > calculations. > > I always check two things > > 1- That the MLWF provide a good interpolation of the band-structure > within the energy range of interest (ie the inner energy window) > 2- That the MLWF are essentially real (the plotting routine tells > you this) > > When my Wannier functions pass these tests, I'm usually happy with > them. > [although I realise that it is more difficult to apply these tests > for large systems] > >> My firs question on this issue is that, does the wannier_plot >> indeed require larger memory size? Then, how can I estimate the size? >> >> In that particular case, the job crashed after awhile, and the >> machine has 32GB memory, so it looks like, it went over 32GB! >> >> #I would imagine that the memory size would be estimated something >> like (FFT grid)*(# bands)*(# of kpoints) *prefactor. I would like >> to know the prefactor if this assumption is correct. > > As you've noticed the plotting routine currently in Wannier90 is > not as smart and efficient as it could be. This is something Arash > and I plan to improve in the future. It is fine for small systems, > but large systems are resource intensive. > > The memory size is > [ (FFT grid)*(wannier_plot_supercell^3)*(num_wannier_plot) > + (FFT grid)*(#wannier+#bands in outer window) ]*16bytes > It is independent of the number of kpoints. For your case this is > ~7Gb. Which is less than the physical memory, but compilers and > operating systems can have problems with very large arrays, so that > could be a cause. [it's hard to say without more information]. > > Plotting is always going to be an expensive operation in terms of > time and memory. Some things that can speed plotting up include: > > 1- wannier_plot_supercell defaults to 2. Reduce it to 1 (although > at the moment wannier90 does not translate a WF into the 'home' > unit-cell for plotting. So if a WF lies in a neighbouring unit- > cell, or on the boundary you will not see all of that WF). > > 2- Plot 1 WF at a time (via wannier_plot_list) > > 3- Reduce the FFT grid: For plotting there is no need to use the > very dense grid from the planewave calculation, rather we can > "decimate" it by removing, say, every 2nd element. This is the job > of the ab-initio code, rather than wannier90. I assume you are > using pwscf - I will send you our latest copy of the pw2wannier90 > code, which include a 'decimation' option. However, if you are > using a different ab-initio program it is easy to do yourself. > > Yours > Jonathan > > -- > Dr Jonathan Yates: email: jryates at lbl.gov phone: 510-642-7302 > Material Science Division, Lawrence Berkeley National Laboratory and > Department of Physics, University of California, > 366 Le Conte Hall #7300, Berkeley, CA 94720-7300, USA > _______________________________________________ > Wannier mailing list > Wannier at quantum-espresso.org > http://www.democritos.it/mailman/listinfo/wannier From ogitsu at llnl.gov Wed Aug 30 02:03:58 2006 From: ogitsu at llnl.gov (Tadashi Ogitsu) Date: Tue, 29 Aug 2006 17:03:58 -0700 Subject: [Wannier] pw2wannier90.x Message-ID: Hello, I have a memory space question on pw2wannier90.x. Shall I ask to pwscf forum? or this list is ok? Let me know. Thanks. #pw2wannier90.x seems to consume a larger memory space. This time, I see clear message from system saying I have exhausted the memory space... Tadashi From jryates at lbl.gov Wed Aug 30 08:51:46 2006 From: jryates at lbl.gov (Jonathan Yates) Date: Tue, 29 Aug 2006 23:51:46 -0700 (PDT) Subject: [Wannier] pw2wannier90.x In-Reply-To: References: Message-ID: On Tue, 29 Aug 2006, Tadashi Ogitsu wrote: > I have a memory space question on pw2wannier90.x. Shall I ask to pwscf forum? > or this list is ok? Let me know. Thanks. I think it is fine here. > #pw2wannier90.x seems to consume a larger memory space. This time, I see > clear message from system saying I have exhausted the memory space... pw2wannier90 needs to store two wavefunction copies (on the sphere of g-vectors). One at k, the other at k+b. If you are using ultrasoft pseudopotentials then you will also need to store the beta (non-local pseudopotential) projectors. I believe these arrays should account for most of the memory with a large system. You should thus be able to estimate the memory requirement for your system. pw2wannier90 can be run in parallel (distributing G and R vectors; not k-points) which will reduce the memory per node for a distributed memory machine. If you find the actual memory usage is significantly larger than expected; then you should give us some more details. Serial or parallel NCP or USP In which phase of the calculation does the crash occur (mmn, amn or write_unk) Of course if you can use a debugger to find which allocation causes the crash, that's even better... Yours Jonathan -- Dr Jonathan Yates: email: jryates at lbl.gov phone: 510-642-7302 Material Science Division, Lawrence Berkeley National Laboratory and Department of Physics, University of California, 366 Le Conte Hall #7300, Berkeley, CA 94720-7300, USA From ogitsu at llnl.gov Wed Aug 30 20:32:01 2006 From: ogitsu at llnl.gov (Tadashi Ogitsu) Date: Wed, 30 Aug 2006 11:32:01 -0700 Subject: [Wannier] pw2wannier90.x In-Reply-To: References: Message-ID: <719CB89D-92FC-423E-B137-4B4487A52DD6@llnl.gov> Dear Jonathan, Thanks for quick reply. Today, the machine is down, so, I'll check more in detail tomorrow. Today, I'm letting you know some detail. I was doing a parallel processing, and I know that the wannier90.x consume about 1GB with the same system. Serial Parallel: Parallel. The machine is IBM SP5 with 32 GB on each node. I used 1 node, i.e. 8 cpus. NCP or USP: NCP At this point, I do not have an access to the error log (I'll get back to you tomorrow) but I believe that it took place at write_unk. Do you know if there is a non-distributed array, which might get large if the system size gets large? Thanks. Tadashi On Aug 29, 2006, at 11:51 PM, Jonathan Yates wrote: > On Tue, 29 Aug 2006, Tadashi Ogitsu wrote: > >> I have a memory space question on pw2wannier90.x. Shall I ask to >> pwscf forum? or this list is ok? Let me know. Thanks. > > I think it is fine here. > >> #pw2wannier90.x seems to consume a larger memory space. This time, >> I see clear message from system saying I have exhausted the memory >> space... > > pw2wannier90 needs to store two wavefunction copies (on the sphere > of g-vectors). One at k, the other at k+b. > If you are using ultrasoft pseudopotentials then you will also > need to store the beta (non-local pseudopotential) projectors. > > I believe these arrays should account for most of the memory with > a large system. You should thus be able to estimate the memory > requirement for your system. > > pw2wannier90 can be run in parallel (distributing G and R vectors; > not k-points) which will reduce the memory per node for a > distributed memory machine. > > If you find the actual memory usage is significantly larger than > expected; then you should give us some more details. > Serial or parallel > NCP or USP > In which phase of the calculation does the crash occur (mmn, amn > or write_unk) > Of course if you can use a debugger to find which allocation > causes the crash, that's even better... > > Yours > Jonathan > > > -- > Dr Jonathan Yates: email: jryates at lbl.gov phone: 510-642-7302 > Material Science Division, Lawrence Berkeley National Laboratory and > Department of Physics, University of California, > 366 Le Conte Hall #7300, Berkeley, CA 94720-7300, USA > _______________________________________________ > Wannier mailing list > Wannier at quantum-espresso.org > http://www.democritos.it/mailman/listinfo/wannier