LWANNIER90: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(25 intermediate revisions by 5 users not shown)
Line 3: Line 3:
Description: {{TAG|LWANNIER90}}=.TRUE. switches on the interface between VASP and [http://www.wannier.org WANNIER90].
Description: {{TAG|LWANNIER90}}=.TRUE. switches on the interface between VASP and [http://www.wannier.org WANNIER90].


'''N.B.''': This feature is only present if VASP is compiled with [[Precompiler_flags#Optional|-DVASP2WANNIER90 or -DVASP2WANNIER90v2]].
----
----
For {{TAG|LWANNIER90}}=.TRUE., VASP will run <tt>wannier_setup</tt> in library mode (see Chapter 6 of the [http://www.wannier.org/doc/user_guide.pdf WANNIER90 manual]).


The VASP2WANNIER90 interface will write the following files that WANNIER90 needs as input:
For {{TAG|LWANNIER90}}=.TRUE., VASP will write the input files for a WANNIER90 run: '''wannier90.win''', '''wannier90.mmn''', '''wannier90.eig''', '''wannier90.amn''', and if {{TAG|LWRITE_UNK}}=.TRUE. '''wannier90.UNKp.s'''. This is done by running <tt>wannier_setup</tt> in library mode as described in Chapter 6 of the [http://www.wannier.org/doc/user_guide.pdf WANNIER90 manual]. For documentation of these files and tags therein, please refer to the [http://www.wannier.org/doc/user_guide.pdf WANNIER90 manual].


*{{FILE|wannier90.win}}
The following cases may occur:
:'''1'''. If this file does not exist, VASP will create it and write the following information onto it:
 
* If '''wannier90.win''' does not exist, VASP will write the following template


  num_wann = {{TAG|NBANDS}}
  num_wann = {{TAG|NBANDS}}
Line 34: Line 35:
     ... ... ...
     ... ... ...
  end kpoints
  end kpoints
:Where the <tt>unit_cell_cart</tt>, <tt>atoms_cart</tt>, and <tt>kpoints</tt> blocks, and <tt>mp_grid</tt> array, will be set in accordance with the setup of the VASP calculation (''i.e.'', basically the information from the {{FILE|POSCAR}} and {{FILE|KPOINTS}} files). For the meaning of the tags and blocks please refer to the [http://www.wannier.org/doc/user_guide.pdf WANNIER90 manual].
:Here, the <tt>unit_cell_cart</tt>, <tt>atoms_cart</tt>, and <tt>kpoints</tt> blocks, and <tt>mp_grid</tt> array, will be set in accordance with the setup of the VASP calculation. This basically corresponds to the information given in the {{FILE|POSCAR}} and {{FILE|KPOINTS}} files.  
:'''2'''. If the {{FILE|wannier90.win}} file already exists, VASP will only add the the aforementioned information insofar it is not already present. This means that VASP will check, for instance, whether or not the {{FILE|wannier90.win}} file contains a <tt>kpoints</tt>-block, and add one if not. If it finds a <tt>kpoints</tt>-block, however, it will not check whether this block tallies with the present set of '''k'''-points used in the VASP calculation!
* If the '''wannier90.win''' file already exists, VASP will only add the aforementioned information if it is not already present. This means that VASP will check, for instance, whether or not the '''wannier90.win''' file contains a <tt>kpoints</tt> block, and add one if not. '''Mind''': If it finds a <tt>kpoints</tt> block, VASP will not check whether this block agrees with the k points used in the VASP calculation!
:'''3'''. The user may specify any tag and/or block in the {{FILE|wannier90.win}} file that is understood by <tt>wannier_setup</tt> and/or <tt>wannier_run</tt> prior to running VASP and executing the VASP2WANNIER90 interface. The most common example of this is probably the <tt>projections</tt>-block that specifies the initial guess for the maximally localized Wannier functions (see Chapter 3 of the [http://www.wannier.org/doc/user_guide.pdf WANNIER90 manual]).
*{{FILE|wannier90.mmn}}
*{{FILE|wannier90.eig}}
*{{FILE|wannier90.amn}}: if <tt>projections</tt> have been specified in {{FILE|wannier90.win}}.
*{{FILE|wannier90.unk}}: if {{TAG|LWRITE_UNK}}=.TRUE. is set in the {{FILE|INCAR}} file.
----
'''Mind''': VASP needs to be compiled with the following additional precompiler flag:
 
-DVASP2WANNIER90
 
and the variable <tt>LIB</tt> in the [[Installing VASP|makefile]] must contain an entry that points to <tt>libwannier.a</tt>.


For instance:
The user may create a '''wannier90.win''' file prior to running VASP with {{TAG|LWANNIER90}}=.TRUE., and specify any tag and/or block that is understood by <tt>wannier_setup</tt> and/or <tt>wannier_run</tt>. For instance, one can specify the <tt>projections</tt> block in the '''wannier90.win''' file that controls the initial guess for the maximally localized Wannier functions.
Then, VASP writes the projections of the Bloch functions onto the relevant projectors to the '''wannier90.amn''' file. See Chapter 3 of the [http://www.wannier.org/doc/user_guide.pdf WANNIER90 manual] for more information.


LIB    = -L../vasp.5.lib -ldmy  \
== Related tags and articles ==
      ../vasp.5.lib/linpack_double.o $(SCA) $(LAPACK) $(BLAS)
 
might be changed to
 
LIB    = -L../vasp.5.lib -ldmy  \
      ../vasp.5.lib/linpack_double.o ../wannier90-1.2/libwannier.a $(SCA) $(LAPACK) $(BLAS)
 
depending on where you have installed WANNIER90, obviously.
 
 
 
== Related Tags and Sections ==
{{TAG|LWRITE_UNK}},
{{TAG|LWRITE_UNK}},
{{TAG|LWRITE_MMN_AMN}},
{{TAG|LWRITE_SPN}},
{{TAG|LWANNIER90_RUN}},
{{TAG|LWANNIER90_RUN}},
[[Installing VASP|Compiling VASP]]
{{TAG|NUM_WANN}}
 
{{sc|LWANNIER90|Examples|Examples that use this tag}}
----
----
[[The_VASP_Manual|Contents]]


[[Category:INCAR]]
[[Category:INCAR tag]][[Category:Wannier functions]]

Latest revision as of 13:49, 26 May 2024

LWANNIER90 = .TRUE. | .FALSE.
Default: LWANNIER90 = .FALSE. 

Description: LWANNIER90=.TRUE. switches on the interface between VASP and WANNIER90.

N.B.: This feature is only present if VASP is compiled with -DVASP2WANNIER90 or -DVASP2WANNIER90v2.


For LWANNIER90=.TRUE., VASP will write the input files for a WANNIER90 run: wannier90.win, wannier90.mmn, wannier90.eig, wannier90.amn, and if LWRITE_UNK=.TRUE. wannier90.UNKp.s. This is done by running wannier_setup in library mode as described in Chapter 6 of the WANNIER90 manual. For documentation of these files and tags therein, please refer to the WANNIER90 manual.

The following cases may occur:

  • If wannier90.win does not exist, VASP will write the following template
num_wann = NBANDS

begin unit_cell_cart
  ... ... ...
  ... ... ...
  ... ... ...
end unit_cell_cart

begin atoms_cart
   ... ... ...
   ... ... ...
   ... ... ...
   ... ... ...  
end atoms_cart

mp_grid = .. .. ..

begin kpoints
   ... ... ...
   ... ... ...
   ... ... ...
   ... ... ...
end kpoints
Here, the unit_cell_cart, atoms_cart, and kpoints blocks, and mp_grid array, will be set in accordance with the setup of the VASP calculation. This basically corresponds to the information given in the POSCAR and KPOINTS files.
  • If the wannier90.win file already exists, VASP will only add the aforementioned information if it is not already present. This means that VASP will check, for instance, whether or not the wannier90.win file contains a kpoints block, and add one if not. Mind: If it finds a kpoints block, VASP will not check whether this block agrees with the k points used in the VASP calculation!

The user may create a wannier90.win file prior to running VASP with LWANNIER90=.TRUE., and specify any tag and/or block that is understood by wannier_setup and/or wannier_run. For instance, one can specify the projections block in the wannier90.win file that controls the initial guess for the maximally localized Wannier functions. Then, VASP writes the projections of the Bloch functions onto the relevant projectors to the wannier90.amn file. See Chapter 3 of the WANNIER90 manual for more information.

Related tags and articles

LWRITE_UNK, LWRITE_MMN_AMN, LWRITE_SPN, LWANNIER90_RUN, NUM_WANN

Examples that use this tag