Znn3bq.jpeg
²é¿´: 478  |  »Ø¸´: 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 µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 304Çóµ÷¼Á +7 castLight 2026-04-16 7/350 2026-04-17 20:05 by ¹ØÒ»ÕµµÆcd
[¿¼²©] Ç󲩵¼£üÉúÎïÖÊ»ù¶à¿×̼/³¬¼¶µçÈÝ·½Ïò£¬ÒÑÓÐÏà¹Ø³É¹û£¬Ñ°ÄÜÔ´²ÄÁÏ/̼²ÄÁÏ·½ÏòÀÏʦ +3 ÖíÖíÈËZzz 2026-04-12 3/150 2026-04-17 19:10 by ÑôÑôÑô^_^
[¿¼ÑÐ] 271Çóµ÷¼Á +37 2261744733 2026-04-11 39/1950 2026-04-17 10:11 by ºÚ¿Æ¼¼¿óÒµ
[¿¼ÑÐ] ¿ÒÇëÓÐѧУÊÕÁô +8 ¿Â»´È» 2026-04-12 8/400 2026-04-17 09:34 by Öí»á·É
[¿¼ÑÐ] 307ÖÐÒ½¿¼Ñе÷¼Á +6 ÓÚÒÔ²ÉÞÀ 2026-04-14 6/300 2026-04-16 16:20 by qingfeng258
[¿¼ÑÐ] 26ҩѧר˶105500Çóµ÷¼Á +6 à¶¹þ¼ÓÓÍ 2026-04-13 7/350 2026-04-16 14:31 by zhouxiaoyu
[¿¼²©] É격×Ô¼ö +3 LinxiaÁÖÏÄ 2026-04-13 3/150 2026-04-16 12:55 by Ä«ºÉ֮¶
[¿¼ÑÐ] ҩѧÇóµ÷¼Á +14 à¶¹þ¼ÓÓÍ 2026-04-14 16/800 2026-04-16 10:15 by beilsong20
[¿¼ÑÐ] ҩѧÇóµ÷¼Á +11 RussHu 2026-04-12 13/650 2026-04-15 19:07 by zhuwenxu
[¿¼ÑÐ] 366Çóµ÷¼Á +11 ²»ÖªÃûµÄСئ 2026-04-11 11/550 2026-04-14 15:50 by zs92450
[¿¼ÑÐ] ¿¼ÑÐÇóµ÷¼Á +6 ban°àСÆß 2026-04-11 6/300 2026-04-14 14:06 by ¶ßÀ²AÃÎÖ»ÊǸöÃÎ
[¿¼ÑÐ] 085408¹âµçÐÅÏ¢¹¤³Ìר˶355Ò»Ö¾Ô¸³¤´º¹â»úËùµ÷¼Á +6 Íõymaa 2026-04-13 13/650 2026-04-14 11:33 by Íõymaa
[¿¼ÑÐ] ũѧ0904 312Çóµ÷¼Á +4 Say Never 2026-04-11 4/200 2026-04-14 09:10 by zs92450
[¿¼ÑÐ] Çóµ÷¼Á +3 ÎÒ°®¸ßÊý¸ßÊý°®Î 2026-04-12 3/150 2026-04-14 01:00 by Íõ¬Bè±
[¿¼ÑÐ] Çóµ÷¼Á£¬985²ÄÁÏÓ뻯¹¤348·Ö +9 º­ÖñÁõ 2026-04-11 14/700 2026-04-13 22:26 by º­ÖñÁõ
[¿¼ÑÐ] Ò»Ö¾Ô¸085802 323·ÖÇóµ÷¼Á +13 drizzle_9 2026-04-12 14/700 2026-04-13 10:26 by Faiz5552
[¿¼ÑÐ] ¡£ +10 Àî¶àÃ×lee. 2026-04-12 11/550 2026-04-12 22:58 by yuyin1233
[¿¼ÑÐ] 291Çóµ÷¼Á +8 ¹ØÒä±±. 2026-04-11 8/400 2026-04-12 09:32 by ÄæË®³Ë·ç
[¿¼ÑÐ] Çóµ÷¼Á£¬Ò»Ö¾Ô¸²ÄÁÏ¿ÆÑ§Ó빤³Ì985£¬365·Ö£¬ +8 ²Ä»¯Àî¿É 2026-04-11 10/500 2026-04-12 08:42 by 852137818
[¿¼ÑÐ] Çóµ÷¼Á +3 θ¾·ÂÎÀÛÁË 2026-04-11 5/250 2026-04-11 14:13 by luhong1990
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û