Re: [Wien] CHARGE DENSITY --> TOTAL CHARGE
Dear Prof Laurence Marks, Elias Assmann and Prof Víctor Luaña Cabal, Thank you very much for your responses. I Have carefully thought about your suggestions. I completely agree with the fact that the integration of the charge density is, and should be dependent on the density of the mesh. As I understood, your suggestion is that the accuracy of integration increases with a denser mesh. A proper weight factor might help, but I do not know how it can be implemented during the integration of the charge density file. According to my knowledge, the mesh is created to make tiny volumes of equal size, within the unit cell. And the charge density is actually the small charge within that tiny volume. If the above is true, I have two inquiries. First, what is the scale of the charge density plot as drawn in Xcrysden. Secondly, as the integration of the charge density mesh can not lead to the total charge contained within the unit cell; what can be the size of a reasonably dense mesh that produce an acceptable image of charge density plot {specially around the core}. This is very much important for drawing the charge density difference of almost exactly similar unitcell with a tiny shift of a single atom in real space. P.S. As Alias Assmann predicted some scale factor, I think this is not just the volume (the unitcell I used has volume 213.81 Å^3). Thank you very much, with kind regards, Prasenjit Prasenjit Roy Electronic Structures of Materials Radboud University Nijmegen +31 (0) 24 36 52805 On Thu, Oct 8, 2015 at 7:34 PM, prasenjit roywrote: > Dear Prof. Laurence Marks and Dr. Gavin Abo, > > I want to obtain the total number of electron in the > unit cell, by summing over the total charge density within that unitcell > and then match that number to the "atomic numbers times the respective > multiplicity". Since WIen2K is full electron code, I expect these two be > equal. > > I actually used wien2venus.py and generated > case.rho3d already (with -S option). The system I worked on is : > Mn6Fe6Si2P4 (total electron 394 in unitcell). When I summed up all the > densities over the mesh (I chose 74*74*80 points), I obtained ~257050. So, > what exactly I need to do in order to get 394 electrons? The answer totally > depends on how Wien2K (and in this case wien2venus.py) write this > case.rho3d, in which format. > > I am copying the head of the case.rho3d file. > > -- > > cell > > 11.577350 11.577350 12.430392 > > 90.00 90.00 120.10 > > 74 74 80 11.577350 11.577350 12.430392 > > 1.53087370e+04 1.07070090e+02 1.59715700e+01 4.54635570e+00 > 3.16747870e+00 > > 1.98851650e+00 1.10770850e+00 5.92331460e-01 3.20779160e-01 > 1.82854040e-01 > > 1.12909070e-01 7.67608340e-02 5.74585830e-02 4.66722780e-02 > 4.02846880e-02 > > .. > It is a hexagonal unitcell, and the lattice parameters are given in Ry. > > I hope, the problem is clear. Kindly help me solve it. Thank > you again, with kind regards, > Prasenjit Roy > Electronic Structures of Materials > Radboud University > Nijmegen > +31 (0) 24 36 52805 > ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
Re: [Wien] CHARGE DENSITY --> TOTAL CHARGE
Rather than giving the answer to the original question, I think it is better to try and encourage people to solve problems themselves -- perhaps I am being too much of an teacher, but that is my approach. So, let me pose a question in response to the original question. What is the relationship between summing a set of values on a grid and the integral of a function sampled at a set of grid points. Think about this, and the reason why the numbers are very different will be obvious. If they still do not completely agree (they wont), then think about the accuracy of numerical integration. It is quite important in DFT codes to remember that numerical integrations are never exact, and this leads to many small limitations. On Mon, Oct 12, 2015 at 3:39 AM, Elias Assmannwrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/08/2015 07:34 PM, prasenjit roy wrote: > > I want to obtain the total number of electron in the unit cell, by > > summing over the total charge density within that unitcell and then > > match that number to the "atomic numbers times the respective > > multiplicity". Since WIen2K is full electron code, I expect these > > two be equal. > > I have never tried that, but I would expect the number to depend quite > sensitively on your mesh of r-points. At least, this is what I saw > when I looked at normalization of Wannier functions on an r-grid. > Since you want also the core electrons, you could actually expect even > larger spikes. > > > The system I worked on is : Mn6Fe6Si2P4 (total electron 394 in > > unitcell). When I summed up all the densities over the mesh (I > > chose 74*74*80 points), I obtained ~257050. > > However, this I would say sounds more like some missing factor … > Units? dV? > > > Elias > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > Comment: Using GnuPG with Icedove - http://www.enigmail.net/ > > iQIcBAEBAgAGBQJWG3HAAAoJEE/4gtQZfOqPmxoP/2pSiQe7vm2b5q9eyjN9X5VN > pQvq+RUE8F5pjgSK8W86YlRCFK34TIw3b8g7OvRW6noaeUGLqszWpFArfF0ToRE7 > +kS9+YcVLzoogCSoan5demVARHdP5oyKcv08NOpQBwndPYgvCAlPm+nN+Wg9T/m+ > b6znR2WzoXdLaMxK3uQW94fK+D/T2k4fDRSrd0rU5BU7FztzJ/qnbiywtZqnJbZ5 > mXUJCQuC+E5Uw1XGEvWR8XIisW5n/ZY1d27PHRStSG3utFbZxfdhxYpHHSAWX0di > SIO/DSfp1UGte3sfcjmtc41QFNBod1El6frLxNehmEhY4jMgsJRWST4qEblLdfk4 > fSz0cSRplff4WAQkiNUnFK2wiHtB/ZceiXDM1dxZmo76ItkyBMu0oDUpwpw75r3f > s+otHS2XPsMnd9knD0D7SXf5Ko3qNNR/Sj0hWBfpdPwHmDpg8k0clu23vGc6srWK > ISJrtABNcSDBuJp9IhURLc7VpbUCfKJ0WFXSLLorTXM5eb2oNJT+MPm4EDxK9zyQ > gaMcnV3nxoYYsNjgVwG4Du8XZO90T+Zc8AAdP7t1VW88QAMy85g9q1CH21AS3nnk > HSna4W7R3vTd2XP2cTQ2UYIKBzyBQYj/9HbNV7F0e5FlzMfirgPj3j2HVvTJLVYm > murT9xCL6Q8O0PH6SZHw > =Gwas > -END PGP SIGNATURE- > ___ > Wien mailing list > Wien@zeus.theochem.tuwien.ac.at > http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien > SEARCH the MAILING-LIST at: > http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html > -- Professor Laurence Marks Department of Materials Science and Engineering Northwestern University www.numis.northwestern.edu Corrosion in 4D: MURI4D.numis.northwestern.edu Co-Editor, Acta Cryst A "Research is to see what everybody else has seen, and to think what nobody else has thought" Albert Szent-Gyorgi ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
Re: [Wien] CHARGE DENSITY --> TOTAL CHARGE
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/08/2015 07:34 PM, prasenjit roy wrote: > I want to obtain the total number of electron in the unit cell, by > summing over the total charge density within that unitcell and then > match that number to the "atomic numbers times the respective > multiplicity". Since WIen2K is full electron code, I expect these > two be equal. I have never tried that, but I would expect the number to depend quite sensitively on your mesh of r-points. At least, this is what I saw when I looked at normalization of Wannier functions on an r-grid. Since you want also the core electrons, you could actually expect even larger spikes. > The system I worked on is : Mn6Fe6Si2P4 (total electron 394 in > unitcell). When I summed up all the densities over the mesh (I > chose 74*74*80 points), I obtained ~257050. However, this I would say sounds more like some missing factor … Units? dV? Elias -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQIcBAEBAgAGBQJWG3HAAAoJEE/4gtQZfOqPmxoP/2pSiQe7vm2b5q9eyjN9X5VN pQvq+RUE8F5pjgSK8W86YlRCFK34TIw3b8g7OvRW6noaeUGLqszWpFArfF0ToRE7 +kS9+YcVLzoogCSoan5demVARHdP5oyKcv08NOpQBwndPYgvCAlPm+nN+Wg9T/m+ b6znR2WzoXdLaMxK3uQW94fK+D/T2k4fDRSrd0rU5BU7FztzJ/qnbiywtZqnJbZ5 mXUJCQuC+E5Uw1XGEvWR8XIisW5n/ZY1d27PHRStSG3utFbZxfdhxYpHHSAWX0di SIO/DSfp1UGte3sfcjmtc41QFNBod1El6frLxNehmEhY4jMgsJRWST4qEblLdfk4 fSz0cSRplff4WAQkiNUnFK2wiHtB/ZceiXDM1dxZmo76ItkyBMu0oDUpwpw75r3f s+otHS2XPsMnd9knD0D7SXf5Ko3qNNR/Sj0hWBfpdPwHmDpg8k0clu23vGc6srWK ISJrtABNcSDBuJp9IhURLc7VpbUCfKJ0WFXSLLorTXM5eb2oNJT+MPm4EDxK9zyQ gaMcnV3nxoYYsNjgVwG4Du8XZO90T+Zc8AAdP7t1VW88QAMy85g9q1CH21AS3nnk HSna4W7R3vTd2XP2cTQ2UYIKBzyBQYj/9HbNV7F0e5FlzMfirgPj3j2HVvTJLVYm murT9xCL6Q8O0PH6SZHw =Gwas -END PGP SIGNATURE- ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
Re: [Wien] CHARGE DENSITY --> TOTAL CHARGE
On Mon, Oct 12, 2015 at 04:43:24AM -0500, Laurence Marks wrote: > Rather than giving the answer to the original question, I think it is > better to try and encourage people to solve problems themselves -- perhaps > I am being too much of an teacher, but that is my approach. > > So, let me pose a question in response to the original question. What is > the relationship between summing a set of values on a grid and the integral > of a function sampled at a set of grid points. Think about this, and the > reason why the numbers are very different will be obvious. > > If they still do not completely agree (they wont), then think about the > accuracy of numerical integration. It is quite important in DFT codes to > remember that numerical integrations are never exact, and this leads to > many small limitations. Laurence, I love your approach. May I continue? There are two main strategies in doing a numerical integration. The first is designing the geometry of the grid by simplicity and providing each grid point an equal weight. The alternative approach is far more complex, but it can also be more successful. The position and weight of grid points can be used to improve the quality of the integration. Best regards, Víctor Luaña ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
[Wien] CHARGE DENSITY --> TOTAL CHARGE
Dear Prof. Blaha and WIEN2K users. I want to obtain the total number of electrons within the unitcell from charge density. So I think I have to sum up all the charge density within the unit cell. How to do that? As far I understood from the Wien2K forum is that: first plot the 3D charge density using XCRYSDEN or VESTA(using wien2venus.py). Then save the file and sum up those values, and obtain the total charge. I am interested in total charge, not the valence charge. The problem is, after seeing the isosurface plots using xcrysden following a lapw5 run, I dont know which file the 3D charge density was written. Kindly help me to solve the problems. Thank you very much, with kind regards Prasenjit Roy Electronic Structures of Materials Radboud University Nijmegen +31 (0) 24 36 52805 ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
Re: [Wien] CHARGE DENSITY --> TOTAL CHARGE
If you really just want to know the total number of electrons, it is the sum of the atomic numbers times the respective multiplicity -- no need to do anything more. It is printed out in mixer, do a grep on :NEC. I suspect that you want to do something else. On Thu, Oct 8, 2015 at 11:23 AM, Gavin Abowrote: > For XCrySDen, you should be able to save the 3D density as an xsf file > [1-3]. You should be able to change the Norm. Flag in XCrySDen from > valence (VAL) to total (TOT) [4]. > > If you use wien2venus.py: > > If you run "wien2venus.py -h" in a terminal, it should show you that the > -S flag is needed for the total density. > > usage: venus.py [-h] [-v] [-p] [-S|V|C|R|T] nx ny nz > -h print help. > -c complex version of lapw5. > -t trigonal case. > -v verbose mode. > -p preserve intermediate files > -S generate total density map from case.clmsum (default) > -V generate valence density map from case.clmval > -C generate coulomb potential map from case.vcoul > -R generate exchange-correlation potential map from case.r2v > -T generate total potential map from case.vtotal > > The 3D density should be written to case.rho3d [5]. > > [1] > http://www.mail-archive.com/wien%40zeus.theochem.tuwien.ac.at/msg07128.html > [2] http://www.democritos.it/pipermail/xcrysden/2012-June/001208.html > [3] http://www.xcrysden.org/doc/density.html > [4] http://www.xcrysden.org/doc/wien.html#__toc__9 > [5] > http://www.mail-archive.com/wien%40zeus.theochem.tuwien.ac.at/msg09042.html > > On 10/8/2015 6:43 AM, prasenjit roy wrote: > > Dear Prof. Blaha and WIEN2K users. > > I want to obtain the total number of electrons within > the unitcell from charge density. So I think I have to sum up all the > charge density within the unit cell. How to do that? > > As far I understood from the Wien2K forum is that: > first plot the 3D charge density using XCRYSDEN or VESTA(using > wien2venus.py). Then save the file and sum up those values, and obtain the > total charge. I am interested in total charge, not the valence charge. > > The problem is, after seeing the isosurface plots > using xcrysden following a lapw5 run, I dont know which file the 3D charge > density was written. > > Kindly help me to solve the problems. Thank you very much, with kind > regards > > Prasenjit Roy > Electronic Structures of Materials > Radboud University > Nijmegen > +31 (0) 24 36 52805 > > -- Professor Laurence Marks Department of Materials Science and Engineering Northwestern University www.numis.northwestern.edu Corrosion in 4D: MURI4D.numis.northwestern.edu Co-Editor, Acta Cryst A "Research is to see what everybody else has seen, and to think what nobody else has thought" Albert Szent-Gyorgi ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
Re: [Wien] CHARGE DENSITY --> TOTAL CHARGE
For XCrySDen, you should be able to save the 3D density as an xsf file [1-3]. You should be able to change the Norm. Flag in XCrySDen from valence (VAL) to total (TOT) [4]. If you use wien2venus.py: If you run "wien2venus.py -h" in a terminal, it should show you that the -S flag is needed for the total density. usage: venus.py [-h] [-v] [-p] [-S|V|C|R|T] nx ny nz -h print help. -c complex version of lapw5. -t trigonal case. -v verbose mode. -p preserve intermediate files -S generate total density map from case.clmsum (default) -V generate valence density map from case.clmval -C generate coulomb potential map from case.vcoul -R generate exchange-correlation potential map from case.r2v -T generate total potential map from case.vtotal The 3D density should be written to case.rho3d [5]. [1] http://www.mail-archive.com/wien%40zeus.theochem.tuwien.ac.at/msg07128.html [2] http://www.democritos.it/pipermail/xcrysden/2012-June/001208.html [3] http://www.xcrysden.org/doc/density.html [4] http://www.xcrysden.org/doc/wien.html#__toc__9 [5] http://www.mail-archive.com/wien%40zeus.theochem.tuwien.ac.at/msg09042.html On 10/8/2015 6:43 AM, prasenjit roy wrote: Dear Prof. Blaha and WIEN2K users. I want to obtain the total number of electrons within the unitcell from charge density. So I think I have to sum up all the charge density within the unit cell. How to do that? As far I understood from the Wien2K forum is that: first plot the 3D charge density using XCRYSDEN or VESTA(using wien2venus.py). Then save the file and sum up those values, and obtain the total charge. I am interested in total charge, not the valence charge. The problem is, after seeing the isosurface plots using xcrysden following a lapw5 run, I dont know which file the 3D charge density was written. Kindly help me to solve the problems. Thank you very much, with kind regards Prasenjit Roy Electronic Structures of Materials Radboud University Nijmegen +31 (0) 24 36 52805 ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
Re: [Wien] CHARGE DENSITY --> TOTAL CHARGE
Dear Prof. Laurence Marks and Dr. Gavin Abo, I want to obtain the total number of electron in the unit cell, by summing over the total charge density within that unitcell and then match that number to the "atomic numbers times the respective multiplicity". Since WIen2K is full electron code, I expect these two be equal. I actually used wien2venus.py and generated case.rho3d already (with -S option). The system I worked on is : Mn6Fe6Si2P4 (total electron 394 in unitcell). When I summed up all the densities over the mesh (I chose 74*74*80 points), I obtained ~257050. So, what exactly I need to do in order to get 394 electrons? The answer totally depends on how Wien2K (and in this case wien2venus.py) write this case.rho3d, in which format. I am copying the head of the case.rho3d file. -- cell 11.577350 11.577350 12.430392 90.00 90.00 120.10 74 74 80 11.577350 11.577350 12.430392 1.53087370e+04 1.07070090e+02 1.59715700e+01 4.54635570e+00 3.16747870e+00 1.98851650e+00 1.10770850e+00 5.92331460e-01 3.20779160e-01 1.82854040e-01 1.12909070e-01 7.67608340e-02 5.74585830e-02 4.66722780e-02 4.02846880e-02 .. It is a hexagonal unitcell, and the lattice parameters are given in Ry. I hope, the problem is clear. Kindly help me solve it. Thank you again, with kind regards, Prasenjit Roy Electronic Structures of Materials Radboud University Nijmegen +31 (0) 24 36 52805 ___ Wien mailing list Wien@zeus.theochem.tuwien.ac.at http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html