[Pw_forum] question about PWCOND

2009-08-16 Thread Manoj Srivastava
Dear Alexander and PWSCF users,
 I have a question about an expression in the scatter_forw.f90 subroutine,
specifically about the following expression - 
 IF (ABS(AIMAG(zk(lam, kp))).LT.eps) THEN
   f1(lam,iorb)=-ezk(lam)*CONJG(di(iorb,lam))*zk2(lam)
   f2(lam,iorb)=-ezk(lam)*CONJG(ci(iorb,lam))*zk2(lam)
  ELSE
   f1(lam,iorb)=-CONJG(ci(iorb,lam))*zk2(lam)
   f2(lam,iorb)=-CONJG(di(iorb,lam))*zk2(lam)
  ENDIF 
 Why does this expression have if/else statement depending on imaginary
part of zk? I did some algebra and realized that f1 for (ABS(AIMAG(zk(lam,
kp))).LT.eps) is related with f1 for (ABS(AIMAG(zk(lam, kp))).GT.eps) by
changing zk to -zk. Same is true for f2. It is defined in previous
subroutine that
  zk=sqrt(E-E_lambda)
where E is given energy and E_lambda is eigenvalue of 2D problem. 
Square root gives us two solution, one would be zk and
another -zk, and I dont understand how do you choose which solution to use
in the expression for f1 and f2, depending on imaginary part of zk. 
Would anyone mind to explain? 

Regards, 
Manoj



[Pw_forum] About zero point energy

2009-08-16 Thread Stefano Baroni
> Dear all,

Hi Lihui:

>   I have a question about zero point energy calculation. According  
> to a article called "Tutorial on calculating phonons: comparing the  
> linear response and the small displacement methods", author states  
> that we can calculate zero point energy use the results obtained  
> with linear response method, i.e phonon code in pwscf. Calculated  
> steps as follows(for example Al):
> (1) > pw.x < Al.scf (This generates the self-consistent wave-function)
> (2) > ph.x < Al.ph.in (This generate the dynamic matrices)
> (3) > q2r.x < q2r.in (Obtaining force constant matrix)
> (4) > matdyn.x < matdyn.in (Calculating the phonon dispersions)
> (5) > matdyn.x < phdos.in (Calculating phonon density of states)
> and this will produce a file called "Al.phdos" which contains the  
> phonon density of states. Now by typing:
> awk '{e=e+2*1/2}END{print e/33.357*4.1357/1000}' Al.phdos

I am close to null in AWK, nor did I know anything about ".phdos"  
files and it took me a while to understand what's going on here.

1) I see that ".phdos" files contain two columns of data, both  
starting from zero, both positive, data in the first column equally  
spaced. Let's assume the first column is a table of frequencies, the  
second the corresponding dos.

2) You did not say what article you are referring to. You could have,  
but in any case GOOGLE helps. Here is, I think, the source of your  
troubles ...
http://www.mcc.uiuc.edu/summerschool/2007/qmc/tutorials/Tutorial_phonons_alfe.pdf

3) AWK parses text files line by line: "$1" and "$2" is the name that  
AWK givs to the first and second text fields it encounters (I did not  
remember this: I re-learn AWK once every 5 years, the last time was 5  
mins ago here:
http://www.gnu.org/software/gawk/manual/gawk.html

> and you should see that the zero point energy. The question is, I do  
> not understand the meaning of "{e=e+2*1/2}END{print e/ 
> 33.357*4.1357/1000}", is this appropriate for the calculation of  
> zero point energy?

the awk line reported in the lecture notes you are reading is supposed  
to make an integral (sum) over frequency of the product of the  
frequency (first column, "$1"), and dos (second column, "$2"). (see  
Eq. 7 in the lecture notes and take the T->0 limit). can you see now  
what happened? (HINT the lecture notes contain a typo: dollars "$" are  
not displayed ...; the instruction in curly brackets following "print"  
must be a change of variables / normalization ...

> In addition, In mail list, by calculating phonons all over the  
> Brillouin zone (in practice, on a regular grid), and zero point  
> energy by calculating {\hbar\over 2} \sum_{{\bf q},\nu} \omega_{{\bf  
> q},\nu}. I do not understand the meaning of {\hbar\over 2}  
> \sum_{{\bf q},\nu} \omega_{{\bf q},\nu} well. Anyone who help me  
> will be appreciated.

I do not understand if what you do not understand are basic concepts  
(how the zero-point energy is related to the dos, how BZ integrals are  
related to frequency integrals ...) or details, such as the syntax of  
AWK/LaTeX ... Please, try to clarify this to yourself in the frst  
place. If it is physics concepts that you do not understand, make an  
effort to formulate a specific question for each specific point you do  
not understand, and then revert to us with a specific question. If it  
is AWK/LaTeX, do like me: browse the net with google and/or take a  
walk to the nearest library and learn the tools you need  
(occasionally, we would also be pleased to help for such matters, but  
the help is in this case even less guaranteed the with physics).

SB

---
Stefano Baroni - SISSA  &  DEMOCRITOS National Simulation Center -  
Trieste
http://stefano.baroni.me [+39] 040 3787 406 (tel) -528 (fax) /  
stefanobaroni (skype)

La morale est une logique de l'action comme la logique est une morale  
de la pens?e - Jean Piaget

Please, if possible, don't  send me MS Word or PowerPoint attachments
Why? See:  http://www.gnu.org/philosophy/no-word-attachments.html







-- next part --
An HTML attachment was scrubbed...
URL: 
http://www.democritos.it/pipermail/pw_forum/attachments/20090816/18958a92/attachment.htm
 


[Pw_forum] About zero point energy

2009-08-16 Thread oulihui666
Dear all,
  I have a question about zero point energy calculation. According to a article 
called "Tutorial on calculating phonons: comparing the linear response and the 
small displacement methods", author states that we can calculate zero point 
energy use the results obtained with linear response method, i.e phonon code in 
pwscf. Calculated steps as follows(for example Al):
(1) > pw.x < Al.scf (This generates the self-consistent wave-function)
(2) > ph.x < Al.ph.in (This generate the dynamic matrices)
(3) > q2r.x < q2r.in (Obtaining force constant matrix)
(4) > matdyn.x < matdyn.in (Calculating the phonon dispersions)
(5) > matdyn.x < phdos.in (Calculating phonon density of states)
and this will produce a file called "Al.phdos" which contains the phonon 
density of states. Now by typing:
awk '{e=e+2*1/2}END{print e/33.357*4.1357/1000}' Al.phdos
and you should see that the zero point energy. The question is, I do not 
understand the meaning of "{e=e+2*1/2}END{print e/33.357*4.1357/1000}", is this 
appropriate for the calculation of zero point energy? 
In addition, In mail list, by calculating phonons all over the Brillouin 
zone (in practice, on a regular grid), and zero point energy by calculating 
{\hbar\over 2} \sum_{{\bf q},\nu} \omega_{{\bf q},\nu}. I do not understand the 
meaning of {\hbar\over 2} \sum_{{\bf q},\nu} \omega_{{\bf q},\nu} well. Anyone 
who help me will be appreciated.
 
Many thanks 
Best regards
Lihui

--

==
Lihui Ou
PH.D Candidate in Electrochemistry  
College of Chemistry and Molecular Science
Wuhan University,430072,Hubei Province,China 
E-mail:oulihui666 at 126.com
==
-- next part --
An HTML attachment was scrubbed...
URL: 
http://www.democritos.it/pipermail/pw_forum/attachments/20090816/a3e20a7e/attachment.htm