Skip to content

non collinear case ADV

Chengcheng Xiao edited this page Jun 30, 2021 · 6 revisions

This page describes the advanced workflow of using the VASP2WANNIER90 interface to generate Wannier functions. Please make sure you have already read the basic one.

⚠️NOTE: For non-collinear case (and calculations with SOC), ISYM=-1 is highly recommended.

Wannierization step

Write UNK files

unformatted UNK files

  • keywords needed:
ISTART = 1
LNONCOLLINEAR = .TRUE.
ICHARG = 2
LWANNIER90 = .TRUE.
LWRITE_UNK = .TRUE.
LUNK_FMTED = .FALSE.
  • files needed:
  • wannier90.win
  • WAVECAR
  • CHGCAR
  • INCAR
  • KPOINTS
  • POSCAR
  • POTCAR

The wannier90.win file should at least contain:

num_wann        =  ??

begin projections
??
end projections

ISTART=1 and ICHARG=2 tell VASP to read in the Bloch wavefunctions and charge density files. LNONCOLLINEAR = .TRUE. tells VASP to run non-collinear calculations. LWANNIER90=.TRUE. tells VASP to run the interface with default specs. LWRITE_UNK = .TRUE. tells VASP to write periodic part of the wavefunctions (UNK files) LUNK_FMTED = .FALSE. tells VASP to write unformatted UNK files.

formatted UNK files

  • keywords needed:
ISTART = 1
LNONCOLLINEAR = .TRUE.
ICHARG = 2
LWANNIER90 = .TRUE.
LWRITE_UNK = .TRUE.
LUNK_FMTED = .TRUE.
  • files needed:
    • wannier90.up.win
    • wannier90.dn.win
    • WAVECAR
    • CHGCAR
    • INCAR
    • KPOINTS
    • POSCAR
    • POTCAR

The wannier90.up.win and wannier90.dn.win files should at least contain:

num_wann        =  ??

begin projections
??
end projections

ISTART=1 and ICHARG=2 tell VASP to read in the Bloch wavefunctions and charge density files. LNONCOLLINEAR = .TRUE. tells VASP to run non-collinear calculations. LWANNIER90=.TRUE. tells VASP to run the interface with default specs. LWRITE_UNK = .TRUE. tells VASP to write periodic part of the wavefunctions (UNK files) LUNK_FMTED = .TRUE. tells VASP to write formatted UNK files.

After the job is done, there should be a block in the stdout look like:

 *---------------------------------------*
 *             VASP2WANNIER90            *
 *---------------------------------------*
 *          Non-collinear spin           *
 *            MMN calculated.            *
 *          Projection   1 done.         *
 *          Projection   2 done.         *
 *          Projection   3 done.         *
 *          Projection   4 done.         *
 *          Projection   5 done.         *
 *          Projection   6 done.         *
 *          Projection   7 done.         *
 *          Projection   8 done.         *
 *          Projection   9 done.         *
 *          Projection  10 done.         *
 *          Projection  11 done.         *
 *          Projection  12 done.         *
 *            AMN calculated.            *
 *            EIG written.               *
 *            UNK written.               *
 *---------------------------------------*

And you should have:

  • UNKxxxxx.NC in your directory.

Control AMN and MMN

  • keywords needed:
ISTART = 1
LNONCOLLINEAR = .TRUE.
ICHARG = 2
LWANNIER90 = .TRUE.
LCALC_MMN  = .FALSE.
LCALC_AMN  = .FALSE.
LWRITE_MMN = .FALSE.
LWRITE_AMN = .FALSE.
  • files needed:
    • wannier90.win
    • WAVECAR
    • CHGCAR
    • INCAR
    • KPOINTS
    • POSCAR
    • POTCAR

The wannier90.win file should at least contain:

num_wann        =  ??

begin projections
??
end projections

ISTART=1 and ICHARG=2 tell VASP to read in the Bloch wavefunctions and charge density files. LWANNIER90=.TRUE. tells VASP to run the interface with default specs. LNONCOLLINEAR = .TRUE. tells VASP to run non-collinear calculations. LCALC_MMN = .FALSE. tells VASP to NOT to compute the MMN matrix LCALC_AMN = .FALSE. tells VASP to NOT to write the MMN matrix LWRITE_MMN = .FALSE. tells VASP to NOT tocompute the AMN matrix LWRITE_AMN = .FALSE. tells VASP to NOT towrite the AMN matrix

After the job is done, there should be a block in the stdout that looks like:

 *---------------------------------------*
 *             VASP2WANNIER90            *
 *---------------------------------------*
 *          Non-collinear spin           * 
 *---------------------------------------*

and you should have NO new files in you directory.

Write spn file

IMPORTANT: LWRITE_SPN only works in serial!!

  • keywords needed:
ISTART = 1
LNONCOLLINEAR = .TRUE.
ICHARG = 2
LWANNIER90 = .TRUE.
LWRITE_SPN = .TRUE.
LSPN_FMTED = .FALSE.
  • files needed:
    • wannier90.win
    • WAVECAR
    • CHGCAR
    • INCAR
    • KPOINTS
    • POSCAR
    • POTCAR

The wannier90.up.win file should at least contain:

num_wann        =  ??

begin projections
??
end projections

ISTART=1 and ICHARG=2 tell VASP to read in the Bloch wavefunctions and charge density files. LNONCOLLINEAR = .TRUE. tells VASP to run non-collinear calculations. LWANNIER90=.TRUE. tells VASP to run the interface with default specs. LWRITE_SPN = .TRUE. tells VASP to compute the expectation of the Pauli matrix LSPN_FMTED = .FALSE. tells VASP to write the spn matrix in binary.

After the job is done, there should be a block in the stdout look like:

 *---------------------------------------*
 *             VASP2WANNIER90            *
 *---------------------------------------*
 *          Non-collinear spin           *
 *            MMN calculated.            *
 *            SPN calculated.            *
 *          Projection   1 done.         *
 *          Projection   2 done.         *
 *          Projection   3 done.         *
 *          Projection   4 done.         *
 *          Projection   5 done.         *
 *          Projection   6 done.         *
 *          Projection   7 done.         *
 *          Projection   8 done.         *
 *          Projection   9 done.         *
 *          Projection  10 done.         *
 *          Projection  11 done.         *
 *          Projection  12 done.         *
 *            AMN calculated.            *
 *            EIG written.               *
 *---------------------------------------*

Only write spn file

For now, LWRITE_SPN only works in serial (no way to collect distributed bands from multiple CPUs without more tedious code digging.). Running everything (including amn, mmn calculations) can take a long time in serial. To avoid this, we can only calculate the spn matrix in serial, leaving other tasks in parallel.

To do this, we need to turn off the all calculations except spn:

  • keywords needed:
ISTART = 1
LNONCOLLINEAR = .TRUE.
ICHARG = 2
LWANNIER90 = .TRUE.
LCALC_MMN = .FALSE.	
LCALC_AMN = .FALSE.
LWRITE_EIG = .FALSE.
LWRITE_UNK = .FALSE.
LWRITE_SPN = .TRUE.
LSPN_FMTED = .FALSE.
  • files needed:
    • wannier90.win
    • WAVECAR
    • CHGCAR
    • INCAR
    • KPOINTS
    • POSCAR
    • POTCAR

ISTART=1 and ICHARG=2 tell VASP to read in the Bloch wavefunctions and charge density files. LNONCOLLINEAR = .TRUE. tells VASP to run non-collinear calculations. LWANNIER90=.TRUE. tells VASP to run the interface with default specs. LCALC_MMN=.F. tells the interface not to compute mmn matrix. LCALC_AMN=.F. tells the interface not to compute amn matrix. LWRITE_EIG=.F. tells the interface not to write eig matrix. LWRITE_UNK=.F. tells the interface not to write UNK files. LWRITE_SPN = .TRUE. tells VASP to compute the expectation of the Pauli matrix LSPN_FMTED = .FALSE. tells VASP to write the spn matrix in binary.

After the job is done, there should be a block in the stdout look like:

 *---------------------------------------*
 *             VASP2WANNIER90            *
 *---------------------------------------*
 *          Non-collinear spin           *
 *            SPN calculated.            *
 *---------------------------------------*