24小时热门版块排行榜    

查看: 529  |  回复: 0
当前主题已经存档。

xirainbow

木虫 (正式写手)

[交流] 【分享】How to get G-vectors and eigenvectors

原帖网址:http://blog.sina.com.cn/s/blog_5f15ead20100gfrd.html

I am very interested in get the detailed information of basic vectors and their coefficients (that is wavefunction). The reason is very simple: basic vector and their coefficients are directly related with KS equation. Unfortunately, these dates are all stored in binary files. Although I can plot electronic density in Xcrysden, I can not get the wavefunction. Today, I notice a discussion in PWscf Forum, which is concerned with how to convert binary date to readable format. Although I still do not know the transformation detail,I know I can do it

     The following is quoted from PWscf Forum.      
in general you can convert all the .dat files from the $prefix.save directory (or subdirectories) into xml using the iotk conversion tool (which is linked in ~espresso/bin )
1: ~espresso/bin/iotk convert  file.dat  file.xml

I think this utility is particularly useful to understand which  and how are the data stored in the QE save directory.

Then, you can parse the xml file if you like.  My personal suggestion would be to do that only if you need this piece of
information for a very simple postprocessing code, because parsing xml from fortran, even if not impossible, is not simple...

Instead, I think the easiest way to go is to use the qexml library  (distributed with QE in ~espresso/PP/qexml.f90) which is exactly meant to provide tools to read (and in principles also write) QE datafiles...

The library must be initialized specifying the output directory, prefix,  and few other informations, and then it directly provides routines to read all the piece of data you need. Some examples about how to use it are given in the WanT code(www.wannier-transport.org); just grep qexml_ in the sources.

2:In terms of the usage of the library, you can have a look at a simple example at http://web.mit.edu/~ferretti/www/Test_QEXML.tgz instructions to compile, run and check the test are given inside the tarball.
There is a proble in the Makefile,
change the lines
$(espresso_home)/PP/qexml.o:
       cd $(espresso_home)/PP
       make qexml.o
into
$(espresso_home)/PP/qexml.o:
       cd $(espresso_home)/PP; make qexml.o
Then the code of Test_QEXML work well. But it only give a brief information about G-vector and eigenvector. Therefore, the full information can only be obtained by espresso/bin/iotk convert  file.dat  file.xml
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 xirainbow 的主题更新
普通表情 龙 兔 虎 猫 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考博] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +3 TZqyNTBa07NP 2026-11-13 3/150 2026-11-15 11:47 by xSrQNSSjcgoX
[硕博家园] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 TZqyNTBa07NP 2026-11-13 3/150 2026-11-15 10:52 by xSrQNSSjcgoX
[考博] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +4 FChKX8meu1ds 2026-11-09 8/400 2026-11-14 22:04 by Equinoxhua
[公派出国] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +4 G2rhSvqvhNzl 2026-11-10 5/250 2026-11-13 11:37 by Equinoxhua
[硕博家园] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +5 C6CRn66RYYXS 2026-11-10 9/450 2026-11-13 11:02 by Equinoxhua
[考博] 27博士申请 +5 白白白ly 2026-11-09 5/250 2026-11-13 05:01 by wlf1982
[基金申请] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +4 Z7qfCsdIiD1T 2026-11-11 5/250 2026-11-12 11:44 by HajghKOMynmz
[公派出国] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 Z7qfCsdIiD1T 2026-11-10 7/350 2026-11-12 11:31 by HajghKOMynmz
[硕博家园] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +5 Z7qfCsdIiD1T 2026-11-10 8/400 2026-11-12 11:20 by HajghKOMynmz
[教师之家] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +4 Z7qfCsdIiD1T 2026-11-10 5/250 2026-11-12 11:14 by HajghKOMynmz
[基金申请] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +5 czAiolzR0IJC 2026-11-10 9/450 2026-11-12 11:11 by HajghKOMynmz
[硕博家园] 售SCI文章,我:8O.5.5.1O.54,科目全,可十急 +4 czAiolzR0IJC 2026-11-10 8/400 2026-11-12 10:49 by HajghKOMynmz
[考研] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +4 G2rhSvqvhNzl 2026-11-10 6/300 2026-11-12 10:36 by HajghKOMynmz
[硕博家园] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +4 C6CRn66RYYXS 2026-11-10 6/300 2026-11-12 10:16 by HajghKOMynmz
[考博] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +5 FChKX8meu1ds 2026-11-09 8/400 2026-11-12 09:46 by HajghKOMynmz
[教师之家] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +7 FChKX8meu1ds 2026-11-09 12/600 2026-11-12 09:43 by HajghKOMynmz
[考研] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +6 FChKX8meu1ds 2026-11-09 8/400 2026-11-12 09:41 by HajghKOMynmz
[论文投稿] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 cdqGD6ftHmbl 2026-11-11 3/150 2026-11-12 07:53 by HajghKOMynmz
[教师之家] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +5 FChKX8meu1ds 2026-11-09 10/500 2026-11-12 05:19 by 9fOTqj074tIg
[考研] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 Z7qfCsdIiD1T 2026-11-10 4/200 2026-11-12 02:23 by 9fOTqj074tIg
信息提示
请填处理意见