[Pw_forum] Problems with Polarization calculations
Paolo Giannozzi
giannozz at nest.sns.it
Fri Oct 19 10:24:18 CEST 2007
On Oct 19, 2007, at 5:01 , Sohrab Ismail-Beigi wrote:
> from ylm_q : error # 181312304
> not programmed for L>
> OK, that is a bit cryptic.
it depends for whom :-) It means that spherical harmonics for N > M,
M=what is printed, are not programmed. Actually Nmax =(Lmax+1)**2
because spherical harmonics are calculated and stored with a
combined index (l,m), running from 1 to (Lmax+1)**2 . This is done
consistently everywhere, even if sometimes it is not reflected in the
name of variables (for instance, "lmax" in PW/bp_ylm_q.f is misleading).
Spherical harmonics used in the Berry phase calculation are
implemented only up to L=4 (i.e. projectors up to l=2): see
PW/bp_ylm_q.f, unlike those used in the rest of the code
(see flib/ylmr2.f90) that work for any L. It shouldn't be difficult
to use the same spherical harmonics everywhere, though.
The message would have been less cryptic if N was a sensible
number (like 49=(2*3+1)**2...) instead of a funny number. The
likely reason is that something is going out of bounds BEFORE
the check in ylm_q is performed. This is obviously a bug. You can
verify this by compiling with bound check enabled (-g -C on most
compilers, -g -fbounds-check on gfortran).
> Apparently no elements with f projectors (e.g. transition metals)
> were ever used for Berry phase...!??!
apparently not. I would try to avoid f projectors in transition metals:
they are a mess even without them.
> Therefore, does the bp_c_phase.f90 code implicitly assume ultra-soft
> psps?
coming from David Vanderbilt's group, I guess so! Norm-conserving
pseudopotentials in the separable form are a special case of ultrasoft
pseudopotentials, so if it works for the latter, it works for the former
as well.
Paolo
---
Paolo Giannozzi, Dept of Physics, University of Udine
via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
More information about the users
mailing list