[Pw_forum] implementation of variation of occupations and Fermi level with perturbations

2011-04-08 Thread David Strubbe
Dear developers, I am trying to understand how the variation of occupations and Fermi level is implemented in density-functional perturbation theory for metals. In the Baroni, de Gironcoli, and Dal Corso Rev Mod Phys paper on DFPT, this issue appears in equations 68 and 75-79. I see that routine e

[Pw_forum] implementation of variation of occupations and Fermi level with perturbations

2011-04-17 Thread David Strubbe
Hello, I am still wondering about this question and haven't gotten any response. Can anyone help clarify the relation between the equations in the Rev Mod Phys paper and the code? Thanks, David Strubbe UC Berkeley On Fri, Apr 8, 2011 at 11:39 AM, David Strubbe wrote: > Dear developers, > > I am

[Pw_forum] implementation of variation of occupations and Fermi level with perturbations

2011-04-19 Thread Paolo Giannozzi
On Apr 8, 2011, at 20:39 , David Strubbe wrote: > Eq. 79 refers to a quantity \Delta n_{ext} and an integral of the LDOS > with \Delta V_{SCF} to calculate the shift in Fermi level. However in > ef_shift it appears that the density response drhoscf is used instead > of these quantities in the num

[Pw_forum] implementation of variation of occupations and Fermi level with perturbations

2011-04-19 Thread David Strubbe
Paolo, Thanks for the response. This gives me some more insight into what is going on, but I still don't understand. As far as I can tell, the drhoscf in ef_shift is still the change in the density rather than the change in the potential, because the calls in solve_linter to dv_of_drho are using

[Pw_forum] implementation of variation of occupations and Fermi level with perturbations

2011-04-20 Thread Stefano de Gironcoli
Dear David Strubbe, eq. 79 is a general formula; in the phonon code Delta n_ext(q=0) is always vanishing because the perturbation is neutral (atoms are displaced but their charge is not changed), still Delta Vscf is in general non zero so one has to do something Let's look at the scf variation

[Pw_forum] implementation of variation of occupations and Fermi level with perturbations

2011-04-20 Thread David Strubbe
Stefano, Thank you for the explanation. Things are clear now. Is there a circumstance in which Delta n_ext(q=0) is nonzero? David Strubbe UC Berkeley On Wed, Apr 20, 2011 at 1:12 AM, Stefano de Gironcoli wrote: > Dear David Strubbe, > > eq. 79 is a general formula; in the phonon code Delta n_e

[Pw_forum] implementation of variation of occupations and Fermi level with perturbations

2011-04-20 Thread Stefano de Gironcoli
It might happen if you transform one atom into another like in the "computational alchemy" approach [PRL 66 2116( 1991)] stefano On 04/20/2011 09:51 PM, David Strubbe wrote: > Stefano, > > Thank you for the explanation. Things are clear now. Is there a circumstance > in which Delta n_ext(q=0) is