[Pw_forum] using pp.x to calculate psi^2

Robert Hembree hembreerofphysics at gmail.com
Sat Apr 6 02:33:57 CEST 2013


Dear Hongze Xia,

Maybe someone can suggest an easier way to extract he individual c(n,k), but
I have done this by using pw_export.x to export the wave function
information and then I wrote a pythonscript to pull pull them out of the
exported xml file. 

 

Here is an example input file I use for pw_export.x that works

 

&INPUTPP

        prefix='Si',

        pseudo_dir='./',

        outdir ='./tmp',

        single_file=.true. ,

        ascii=.true.

/

 

Out of this I get a subdirectory in my outdir called Si.export which
contains a single xml file. 

I then processed the file using "import xml.etree.ElementTree as etree" for
the xml library in python. 

This file contains all of the information needed to reconstruct the wave
function. Someone please correct me if I am wrong in my following
description as I had to do a bit of guess work to get it to work.

 

So first in the file 

 The node Kmesh can be used to give you the number of k points stored as nk

And the weights stored as a text list called weights. 

 

There is also a subnode called k which will contain the actual kpoints. 

Then in the node Wfc_grid there are subnodes for each kpoint which contain a
subnode grid which contains the indices of each C(n,G,K) in the where
psi_n,k = sum_G C(n,G,K)exp(-i(k+g)*r)

And the indices refer to the multiplicative factor on each of the reciprocal
lattice vectors. For example if we have 3 reciprocal latticevectors v1,v2,v3
and the grid specifies a point 1 2 3 then we reconstruct  our G vector as
G=1*v1+2*v2+3*v3

After this the eigenvalues node  and subnodes should be rather self
explanatory. 

 

Finally comes the eigenvectors node

It is divided into subnodes of the form Eigenvectors->Kpoint.#k->Wfc.#n

 

Here #k is the index of the kpoint. Can get the coordinate of this in
crystal coordinates from Wfc_grid->Kpoint.#k->Kcrys

 

The #n is the band index. Then under Wfc.#n is another text list This list
is the complex coefficient C(#n,G,#k) and the coefficients are listed in the
same order as the grid indicies I mentioned for Wfc_grid. So to give an
example of what I mean. In one of my files  I have the Kpoint.1 at the gamma
point 0.000000d+000 0.000000d+000 0.000000d+000.

The first two lines I have listed in the Wfc_grid for kpoint.1 text is 

 

    0    0    0

   -1   -1   -1

 

And the first two coefficients I have listed for kpoint.1  and wfc.1 are

-7.287747620844023E-001, 6.805607924738541E-001

-1.270428376371229E-001,-4.334151291990817E-003

 

So that tells me that C(1,(0,0,0),(0,0,0))= -7.287747620844023E-001+i*
6.805607924738541E-001 at k = (0,0,0), G=(0,0,0) and n=1

The next coefficient is at C(1,(-1,-1,-1), (0,0,0)) =
-1.270428376371229E-001+i*-4.334151291990817E-003 at k=(0,0,0), G=(-1,-1,-1)
and n=1 

 

And so on like that. Check through the output file and all of the
information you should need make sense of my longwinded explanation is
there.

 

There may be an easier way using pp, but I don't know it. 

 

I hope it helps

Robert Hembree

 

 

 

From: pw_forum-bounces at pwscf.org [mailto:pw_forum-bounces at pwscf.org] On
Behalf Of Hongze Xia
Sent: Friday, April 05, 2013 8:00 PM
To: PWSCF Forum
Subject: Re: [Pw_forum] using pp.x to calculate psi^2

 

Dear Paolo,

 

Thanks so much for your kind help. Currently we are looking for the
eigenvectors from diagonalizing the Hermitian matrix which gives the
electron band structure. It seems to me now tha |psi(r)|^2 does not contain
information about individual c(n,k) but only the sum of that. It is also
true for the charge density at r.

 

Can I ask: is that possible to extract individual c(n,k) out from the
calculations or is that possible that I could print the Hermitian matrix
which yields the electron band structure?

 

Thank you for your time and effort.

 

Best Regards,
Hongze Xia
PhD candidate in Photovoltaics Engineering
University of New South Wales
Sydney 2052 Australia 

 

On 03/04/2013, at 11:45 PM, Paolo Giannozzi <paolo.giannozzi at uniud.it>
wrote:





On Wed, 2013-04-03 at 22:32 +1100, Hongze Xia wrote:




As far as I know, psi can be defined as psi = c(n,k)*exp(-i r*k)
where c(n,k) is not a function of position r


No: psi(r) = \sum_k c(n,k)*exp(-i r*k)




By this definition, psi^2 = c*(n,k)c(n,k) is a real number 
independent of r. 


No: what is calculated is |psi(r)|^2, not what you have written.




Can anyone tell me what is the unit of psi (or c(n,k)) in QE? 


all quantities are in atomic (Rydberg) units unless explicitly
specified, so psi(r) is in (bohr radii)^(-3/2)




Another question is that if I plot a 1D plot of the spherical average
of psi^2, does it matter if choosing a different starting point and
plotting line?


the starting point matters, the plotting line doesn't




The last question is that where I can find the total number of kband
and kpoint? 


in the output of pw.x




If kpoint is manually set up in pwscf input file instead of using a k
mesh-grid, does it have the same sequence as the one in that input
file?


the index "kpoint" refers to the sequence of k-points as it appears in
the output

P.
-- 
Paolo Giannozzi, Dept. Chemistry&Physics&Environment, 
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222 

_______________________________________________
Pw_forum mailing list
Pw_forum at pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20130405/16b4397d/attachment.html>


More information about the users mailing list