24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 475  |  回复: 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 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 372分,材料与化工,一志愿湖南大学,求调剂 +3 蓝笺片 2026-04-01 3/150 2026-04-06 09:04 by 无际的草原
[考研] 化学0703-一志愿211-338分求调剂 +8 vants 2026-04-05 8/400 2026-04-06 06:17 by houyaoxu
[考研] 找调剂 +10 楚乔乔 2026-04-01 10/500 2026-04-05 22:19 by syh9288
[考研] 生物与医药086000调剂一志愿西北农林320分 +3 美美女士 2026-04-03 3/150 2026-04-05 21:55 by 学员8dgXkO
[考研] 求调剂 +7 张.1 2026-04-05 7/350 2026-04-05 20:40 by 啵啵啵0119
[考研] 材料调剂 +6 一样YWY 2026-04-05 6/300 2026-04-05 20:30 by 南航~万老师
[考研] 282求调剂 +7 aaa车辆 2026-04-02 11/550 2026-04-05 17:24 by yulian1987
[考研] 288求调剂,一志愿华南理工大学071005 +6 ioodiiij 2026-04-04 6/300 2026-04-05 10:09 by guoweigw
[考研] 考研调剂 +11 小sun要好运 2026-04-04 11/550 2026-04-05 08:02 by qlm5820
[考研] 求调剂 +6 朔朔话 2026-04-02 7/350 2026-04-04 19:16 by 蓝云思雨
[考研] 309求调剂 +6 刘刘刘1231 2026-04-02 7/350 2026-04-04 13:41 by liucky
[考研] 305求调剂 +3 77Qi 2026-04-03 3/150 2026-04-03 23:01 by qzxyhcsy
[考研] 085501一志愿天工大,机械专硕求调剂,跨材料 +3 33上 2026-04-03 3/150 2026-04-03 14:08 by 1753564080
[考研] 321求调剂 +17 y-yh 2026-04-01 20/1000 2026-04-03 12:57 by y-yh
[考研] 366求调剂 +7 sbdnd 2026-04-03 7/350 2026-04-03 12:40 by cymywx
[考研] 325分化学调剂 +5 15771691647 2026-04-02 5/250 2026-04-03 09:58 by ChemPharm
[考研] 26考研调剂 +4 Wnz.20030617 2026-04-01 5/250 2026-04-02 16:11 by 1939136013狗壮
[考研] 一志愿346上海大学生物学 +3 上海大学346调剂 2026-04-01 3/150 2026-04-02 08:36 by w虫虫123
[考研] 262求调剂 +9 励志一定发文章 2026-03-31 10/500 2026-04-01 12:22 by sunshine0013
[考研] 267求调剂 +13 uiybh 2026-03-31 13/650 2026-04-01 10:25 by 探123
信息提示
请填处理意见