next up previous contents
Next: 8.7 Phonons Up: 8 Frequently Asked Questions Previous: 8.5 Frequent errors during Contents

Subsections

8.6 Self Consistency

8.6.0.1 ''What are the units for quantity XYZ?''

''A:''' Unless otherwise specified, all PWscf input and output quantities are in atomic "Rydberg" units, i.e. energies in Ry, lengths in Bohr radii, etc.. Note that CP uses instead atomic "Hartree" units: energies in Ha, lengths in Bohr radii.

8.6.0.2 ''Self-consistency is slow or does not converge at all''

'''A:''' Bad input data will often result in bad scf convergence. Please check your structure first.

Assuming that your input data is sensible :

  1. Verify if your system is metallic or is close to a metallic state, especially if you have few k-points. If the highest occupied and lowest unoccupied state(s) keep exchanging place during self-consistency, forget about reaching convergence. A typical sign of such behavior is that the self-consistency error goes down, down, down, than all of a sudden up again, and so on. Usually one can solve the problem by adding a few empty bands and a small broadening.
  2. Reduce mixing beta from the default value (0.7) to $ \sim$ 0.3 ÷ 0.1 or smaller. Try the mixing mode value that is more appropriate for your problem. For slab geometries used in surface problems or for elongated cells, mixing mode='local-TF' should be the better choice, dampening "charge sloshing". You may also try to increase mixing ndim to more than 8 (default value). Beware: the larger mixing ndim, the larger the amount of memory you need.
  3. Specific to US PP: the presence of negative charge density regions due to either the pseudization procedure of the augmentation part or to truncation at finite cutoff may give convergence problems. Raising the ecutrho cutoff for charge density will usually help, especially in gradient-corrected calculations.

8.6.0.3 ''How is the charge density (the potential, etc.) stored? What position in real space corresponds to an array value?''

'''A:''' The index of arrays used to store functions defined on 3D meshes is actually a shorthand for three indeces, following the FORTRAN convention ("leftmost index runs faster"). An example will explain this better. Suppose you have a 3D array of dimension (nr1,nr2,nr3), say psi(nr1,nr2,nr3). FORTRAN compilers store this array sequentially in the computer RAM in the following way:
        psi(1,1,1)
        psi(2,1,1)
        ...
        psi(nr1,1,1)
        psi(1,2,1)
        psi(2,2,1)
        ...
        psi(nr1,2,1)
        ...
        psi(nr1,nr2,1)
        psi(1,1,nr3)
etc
Let ind be the position of the (i,j,k) element in the above list: the relation between ind and (i,j,k) is:
        ind = i + (j + 1) * nr1 + (k + 1) *  nr2 * nr1
This should clarify the relation between 1D and 3D indexing. In real space, the (i,j,k) point of the mesh is

rijk = $\displaystyle {\frac{{i-1}}{{nr1}}}$$\displaystyle \tau_{1}^{}$ + $\displaystyle {\frac{{j-1}}{{nr2}}}$$\displaystyle \tau_{2}^{}$ + $\displaystyle {\frac{{k-1}}{{nr3}}}$$\displaystyle \tau_{3}^{}$

where the $ \tau_{i}^{}$ are the basis vectors of the Bravais lattice. The latter are stored row-wise in the "AT" array:

$ \tau_{1}^{}$ = at(:, 1), tau2 = at(:, 2), $ \tau_{3}^{}$ = at(:, 3)

(info by Stefano Baroni)

8.6.0.4 ''What is the difference between total and absolute magnetization?''

'''A:''' The total magnetization is the integral of the magnetization in the cell:

MT = $\displaystyle \int$(nup - ndown)d3r.

The absolute magnetization is the integral of the absolute value of the magnetization in the cell:

MA = $\displaystyle \int$| nup - ndown| d3r.

In a simple ferromagnetic material they should be equal (except possibly for an overall sign)`. In simple antiferromagnets (like FeO, NiO) MT is zero and MA is twice the magnetization of each of the two atoms. (info by Stefano de Gironcoli)

8.6.0.5 ''How can I calculate magnetic moments for each atom?''

'''A:''' There is no 'right' way of defining the local magnetic moment around an atom in a multi-atom system. However an approximate way to define it is via the projected density of states on the atomic orbitals (code projwfc.x, see example08 for its use as a postprocessing tool). This code generate many files with the density of states projected on each atomic wavefunction of each atom and a BIG amount of data on the standard output, the last few lines of which contain the decomposition of Lowdin charges on angular momentum and spin component of each atom.

8.6.0.6 ''What is the order of Ylm components in projected DOS / projection of atomic wavefunctions?''

'''A:''' "The order is, I think:
    1   $P_{0,0}(t)$
    2   $P_{1,0}(t)$
    3   $P_{1,1}(t)cos\phi$
    4   $P_{1,1}(t)sin\phi$ 
    5   $P_{2,0}(t)$
    6   $P_{2,1}(t)cos\phi$ 
    7   $P_{2,1}(t)sin\phi$
    8   $P_{2,2}(t)cos2\phi$
    9   $P_{2,2}(t)sin2\phi$
and so on; Pl, m =Legendre Polynomials, t = cos$ \theta$ = z/r , $ \phi$ = atan(y/x) . No warranty. Anybody really interested in knowing ''for sure'' which spherical harmonic combination is which should look into routine ylmr2 in flib/ylmr2.f90".

8.6.0.7 ''Why is the sum of partial Lowdin charges not equal to the total charge?''

"Lowdin charges (as well as other conventional atomic charges) do not satisfy any sum rule. You can easily convince yourself that ths is the case because the atomic orbitals that are used to calculate them are arbitrary to some extent. If yu like, you can think that the missing charge is "delocalized" or "bonding" charge, but this would be another way of naming the conventional (to some extent) character of Lowdin charge." (Stefano Baroni, Sept. 2008).

See also the definition of "spilling parameter": Sanchez-Portal et al., Sol. State Commun. 95, 685 (1995). The spilling parameter measures the ability of the basis provided by the pseudo-atomic wfc to represent the PW eigenstates, by measuring how much of the subspace of the Hamiltonian eigenstates falls outside the subspace spanned by the atomic basis.

8.6.0.8 ''Why do I get a strange value of the Fermi energy?''

"The value of the Fermi energy (as well as of any energy, for that matter) depends of the reference level. What you are referring to is probably the "Fermi energy referred to the vacuum level" (i.e. the work function). In order to obtain that, you need to know what the vacuum level is, which cannot be said from a bulk calculation only" (Stefano Baroni, Sept. 2008).

8.6.0.9 ''Why I don't get zero pressure/stress at equilibrium?''

It depends. If you make a calculation with fixed cell parameters, you will never get exactly zero pressure/stress, unless you use the cell that yields perfect equilibrium for your pseudopotentials, cutoffs, k-points, etc.. Such cell will anyway be slightly different from the experimental one. Note however that pressures/stresses in the order of a few KBar correspond to very small differences in terms of lattice parameters.

If you obtain the equilibrium cell from a variable-cell optimization, do not forget that the pressure/stress calculated with the modified kinetic energy functional (very useful for variable-cell calculations) slightly differ from those calculated without it.

8.6.0.10 ''Why do I get "negative starting charge"?''

Self-consistency requires an initial guess for the charge density in order to bootstrap the iterative algorithm. This first guess is usually built from a superposition of atomic charges, constructed from pseudopotential data.

More often than not, this charges are a slightly too hard to be expanded very accurately in plane waves, hence some aliasing error will be introduced. Especially if the unit cell is big and mostly empty, some local low negative charge density will be produced.

''This is NOT harmful at all, the negative charge density is handled properly by the code and will disappear during the self-consistent cycles'', but if it is very high (let's say more than 0.001*number of electrons) it may be a symptom that your charge density cutoff is too low. (L. Paulatto - November 2008)

8.6.0.11 ''How do I calculate the work function?''

Work function = (average potential in the vacuum) - (Fermi Energy). The former is estimated in a supercell with the slab geometry, by looking at the average of the electrostatic potential (typically without the XC part). See the example in examples/WorkFct_example.


next up previous contents
Next: 8.7 Phonons Up: 8 Frequently Asked Questions Previous: 8.5 Frequent errors during Contents
Paolo Giannozzi 2009-10-01