[Wien] Weird wannier functions coming out from wien2wannier

Elias Assmann elias.assmann at gmail.com
Thu Apr 7 16:14:32 CEST 2016


On 04/06/2016 06:14 PM, Pablo Villar Arribi wrote:
>> 3. Did you check if the real-space representation of the WF is real
>> (i.e., case.psink should be 0 or ±π up to numerical precision)?  Because
>> the xsf format does not accomodate complex numbers, wplot2xsf by default
>> writes |w(r)|² sgn Re w(r).  This could lead to “strange” isosurfaces if
>> there is a phase.
> 
> When I open the *psink files I see something like this (this is only the
> head of the file)

Sorry, I see I made a mistake there — it is case.psiarg that gives you
the phase, case.psink is the magnitude.

> "rephase case" but it does not work, I get an error of the type

Unfortunately, ‘rephase’ is broken.  There is a “dephasing” option in
case.inwplot (inherited from lapw7), which has also been deactivated,
but may be reactivated next release.  For a quick fix, you could modify
wplot2xsf_lapw, l. 384 ff.

    if args.do_phase:
        verbalize("   reading `"+psiarg.name+"'")
        data *= np.sign(np.cos(np.fromfile(psiarg, sep=' ')))
        psiarg.close()

    if args.do_sqrt:
        data = np.sqrt(data)

You can easily add a global phase,

        data *= np.sign(np.cos(np.fromfile(psiarg, sep=' ') + PHI))

should work.  Or try the -abs option to ignore the phase.

> I've been using the 14.1 version, not 14.2. Should I change to 14.2 or
> is it OK with 14.1?

In general, yes, I would recommend that users of wien2wannier use
version 14.2.  However, I think the differences in wplot are minor.
Rather, I would recommend that you try with the current version from
GitHub (or wait for the next Wien2k release which, rumor has it, should
not be long).


	Elias


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 880 bytes
Desc: OpenPGP digital signature
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20160407/4bed89a9/attachment.asc>


More information about the Wien mailing list