[Q-e-developers] Fwd: [Pw_forum] implementation of variation of occupations and Fermi level with perturbations

Paolo Giannozzi giannozz at democritos.it
Wed Apr 20 09:01:21 CEST 2011


Any comment anybody?

> From: David Strubbe <dstrubbe at berkeley.edu>
> Date: April 20, 2011 12:08:09  GMT+02:00
> To: PWSCF Forum <pw_forum at pwscf.org>
> Subject: Re: [Pw_forum] implementation of variation of occupations  
> and Fermi level with perturbations
> Reply-To: PWSCF Forum <pw_forum at pwscf.org>
>
> 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 a copy of the density  
> response rather than drhoscf itself:
>
>         call zcopy (nrxx*nspin_mag,drhoscfh(1,1,ipert),1,dvscfout 
> (1,1,ipert),1)
>         call dv_of_drho (imode0+ipert, dvscfout(1,1,ipert), .true.)
>
> The heart of the matter is the lines in ef_shift:
>
> delta_n = delta_n + omega*drhoscf(nl(1),is,ipert)
> def (ipert) = - delta_n / dos_ef
>
> delta_n does not seem to refer to \Delta n_{ext} or the integral of  
> the LDOS with \Delta V_{SCF}, as in the numerator of Eq. 79. Do  
> those quantities exist in the calculation here?
>
> Thanks,
> David Strubbe
> UC Berkeley
>
> On Tue, Apr 19, 2011 at 1:44 PM, Paolo Giannozzi  
> <giannozz at democritos.it> wrote:
>
> 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 numerator, which doesn't seem like the
> > same thing.
>
> it doesn't, but it is. The (dirty) trick is well hidden in the call
> to routine dv_of_drho:
> it accepts in input the variation of the charge density, returns in
> output the
> variation of the potential, overwritten on the former. It was done a
> looong time
> ago in order to spare some memory, when machines had much less ram and
> the code was much simpler and smaller (occasional dirty tricks were
> under
> control, sort of). A comment in the code would have spared you (and  
> me)
> some time. Unfortunately comments in code tend to belong to one of the
> following categories: 1) useless, 2) misleading, 3) obsolete, 4)
> nonexistent
>
> P.
> ---
> Paolo Giannozzi, Dept of 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://www.democritos.it/mailman/listinfo/pw_forum
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum

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







More information about the developers mailing list