### Install and Install Pre-commit Hooks Source: https://github.com/wannier-developers/wannier90/wiki/ContributorsGuide Install the pre-commit package and then install the pre-commit hooks into the local Git repository. These hooks will automatically run at every commit to format code. ```bash pip install --user pre-commit pre-commit install ``` -------------------------------- ### Example PL_assess.x Execution Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/appendices/utilities.md An example command for running the PL_assess.x utility with specific values for k-points and number of wannier functions. ```bash ./PL_assess.x 1 1 20 16 ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/README.md Installs project dependencies using pip. Ensure requirements.txt is present. ```bash pip install -r requirements.txt ``` -------------------------------- ### Build Full Wannier90 Documentation Source: https://github.com/wannier-developers/wannier90/blob/develop/autodoc/README.txt Install FORD and run this command to generate the complete documentation, including graphs and search indices. ```bash ford project.md ``` -------------------------------- ### Install Package Configuration Files Source: https://github.com/wannier-developers/wannier90/blob/develop/CMakeLists.txt Configures and installs pkgconfig files, package version files, and CMake configuration files for external projects to find and use the Wannier90 library. ```cmake if (WANNIER90_INSTALL) set(WANNIER90_PKGCONFIG_FILE "${WANNIER90_LIBRARY_NAME}.pc") configure_file(cmake/wannier90.pc.in ${WANNIER90_PKGCONFIG_FILE} @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${WANNIER90_PKGCONFIG_FILE} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT Wannier90_Development ) write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/Wannier90ConfigVersion.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion ) configure_package_config_file( cmake/Wannier90Config.cmake.in Wannier90Config.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Wannier90 ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Wannier90ConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/Wannier90Config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Wannier90 COMPONENT Spglib_Development ) install(EXPORT Wannier90Targets FILE Wannier90Targets.cmake NAMESPACE Wannier90:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Wannier90 COMPONENT Wannier90_Development ) export(EXPORT Wannier90Targets FILE Wannier90Targets.cmake NAMESPACE Wannier90:: ) endif () ``` -------------------------------- ### Project Setup and C++ Standard Source: https://github.com/wannier-developers/wannier90/blob/develop/test-suite/library-mode-test-C-interface/CMakeLists.txt Configures the minimum CMake version, project name, and C++ standard. Ensures C++17 is required. ```cmake cmake_minimum_required(VERSION 3.25...3.29) project(demo_Wannier90 LANGUAGES CXX Fortran) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) ``` -------------------------------- ### seedname_qc.dat Output Example Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md Example content of the seedname_qc.dat file, showing energy values and corresponding quantum conductance. This file is written if transport is set to .TRUE. ```vi ## written on 14Dec2007 at 11:30:17 -3.000000 8.999999 -2.990000 8.999999 -2.980000 8.999999 -2.970000 8.999999 . . . ``` -------------------------------- ### Example of DOS projection onto specific WFs Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/postw90/postw90params.md This example shows how to project the DOS onto a specified set of Wannier functions (WFs). The WFs are numbered according to the 'seedname.wout' file. This is useful for analyzing the contribution of specific orbitals to the total DOS. ```fortran dos_project = 2, 6-8, 12 ``` -------------------------------- ### Install Wannier90 Post-processing Target Source: https://github.com/wannier-developers/wannier90/blob/develop/src/postw90/CMakeLists.txt Installs the Wannier90_post target if the WANNIER90_INSTALL flag is enabled, making the executable available for use. ```cmake if (WANNIER90_INSTALL) install(TARGETS Wannier90_post EXPORT Wannier90Targets ) endif () ``` -------------------------------- ### seedname_dos.dat Output Example Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md Example content of the seedname_dos.dat file, displaying energy values and their corresponding density of states. This file is written if transport is set to .TRUE. ```vi ## written on 14Dec2007 at 11:30:17 -3.000000 6.801199 -2.990000 6.717692 -2.980000 6.640828 -2.970000 6.569910 . . . ``` -------------------------------- ### Quantum ESPRESSO Input for IBZ k-points Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/postproc.md Example of a Quantum ESPRESSO input file specifying k-points for an irreducible Brillouin Zone calculation. Ensure the k-point grid is set appropriately for your IBZ. ```vi K_POINTS {automatic} 4 4 4 0 0 0 ``` -------------------------------- ### Run pwscf for Bloch states Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_11.md Run pw.x to get Bloch states on a k-point grid, requesting the lower 4 valence bands. Input is provided via the silicon.nscf file. ```bash pw.x < silicon.nscf > nscf.out ``` -------------------------------- ### Compute Overlap and Projections with pw2wannier90.x Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_7.md Execute pw2wannier90.x with the silane.pw2wan input file to compute the overlap between Bloch states and projections for the starting guess. The results are written to silane.mmn and silane.amn files, and output is redirected to pw2wan.out. ```bash pw2wannier90.x < silane.pw2wan > pw2wan.out ``` -------------------------------- ### Compute Overlaps and Symmetry Information with pw2wannier90.x Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_21.md Execute pw2wannier90.x to compute the overlap between Bloch states, starting guess projections, and symmetry information for symmetry-adapted mode. The results are written to GaAs.mmn, GaAs.amn, and GaAs.dmn files. ```bash pw2wannier90.x < GaAs.pw2wan > pw2wan.out ``` -------------------------------- ### Define k-point Path for Bandstructure Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_4.md Specify a path in k-space within the wannier90 input file to plot the interpolated bandstructure. This example defines a path starting from G and going through X, W, L, and back to G, then to K. ```vi begin kpoint_path G 0.00 0.00 0.00 X 0.50 0.50 0.00 X 0.50 0.50 0.00 W 0.50 0.75 0.25 W 0.50 0.75 0.25 L 0.00 0.50 0.00 L 0.00 0.50 0.00 G 0.00 0.00 0.00 G 0.00 0.00 0.00 K 0.00 0.50 -0.50 end kpoint_path ``` -------------------------------- ### Setting up post-processing in wannier90 Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/postproc.md To initiate the post-processing step, either set `postproc_setup` to `.true.` in the `seedname.win` input file or use the `-pp` command-line option. This generates the `seedname.nnkp` file. ```bash wannier90 -pp ``` -------------------------------- ### gw2wannier90.py Available Options Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/appendices/utilities.md Lists the available options for the gw2wannier90.py utility, including formatted and unformatted file handling. ```bash mmn, amn, spn, unk, uhu, uiu, spn_formatted, unk_formatted, uhu_formatted, uiu_formatted, write_formatted ``` -------------------------------- ### Open Xmgrace Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_32.md Launches the Xmgrace visualization and analysis tool. ```bash xmgrace ``` -------------------------------- ### Wannier90 Projection Examples for Cu and O Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/projections.md Example of specifying s, p, and d projections on Copper (Cu) and sp^3 hybrid projections on Oxygen (O). ```vi Cu:l=0;l=1;l=2 O:l=-3 or O:sp3 ``` -------------------------------- ### Run pw.x for Ground State Calculation Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_20.md Execute the Quantum ESPRESSO pw.x code to compute the ground state of LaVO3. This is the initial step in the workflow. ```bash pw.x < LaVO3.scf > scf.out ``` -------------------------------- ### Wannier90 Projection Example for pz Orbital Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/projections.md Example of a single projection onto a pz orbital, with its z-axis oriented in the (1,1,1) direction, centered at the origin. ```vi c=0,0,0:l=1,mr=1:z=1,1,1 or c=0,0,0:pz:z=1,1,1 ``` -------------------------------- ### Setting Library Options in Fortran Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/library_mode.md Demonstrates how to set essential options for the Wannier90 library using Fortran. This includes setting the number of bands and specifying how k-points are distributed across MPI ranks. ```Fortran integer :: ierr call wannier90_set_num_bands(100, ierr) call wannier90_set_distk(distk, ierr) ``` -------------------------------- ### Execute Wannier90 C executable with lead.win Source: https://github.com/wannier-developers/wannier90/blob/develop/test-suite/library-mode-test-C-interface/readme.md This snippet shows how to set the executable path and run the wannier_c.x program with the 'lead.win' input file in the testw90_example02 directory. ```bash (export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example02; eval $EXE lead.win ) ``` -------------------------------- ### seedname_wsvec.dat Output Example Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md Example content of the seedname_wsvec.dat file, which details lattice vectors and superlattice vectors for Wannier function separation. This file is written if write_hr, write_rmn, or write_tb is true. ```vi ## written on 20Sep2016 at 18:12:37 with use_ws_distance=.true. 0 0 0 1 1 1 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 1 3 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 5 1 0 0 0 0 0 0 1 6 2 0 -1 -1 1 -1 -1 . . . ``` -------------------------------- ### Run pw.x for Band Structure Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_35.md Execute the pw.x code to calculate the band structure of silicon. ```bash pw.x < silicon.bands > bands.out ``` -------------------------------- ### Wannier90 Projection Examples for Silicon Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/projections.md Examples for Silicon (Si) showing projections onto s, p, and d orbitals without radial nodes, and onto s and p orbitals with one radial node. ```vi Si:l=0;l=1;l=2 Si:l=0;l=1:r=2 ``` -------------------------------- ### Example of Disentanglement Sphere in Output Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_20.md This snippet shows an example of how the output file indicates the number of spheres used for disentanglement and their centers and radii. It confirms that disentanglement was restricted to a specific region. ```text | Number of spheres in k-space : 1 | | center n. 1 : 0.500 0.500 0.500, radius = 0.200 | ``` -------------------------------- ### Run pwscf for ground state calculation Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_16.md Execute the pw.x command to obtain the ground state of silicon. This is the first step when using Quantum ESPRESSO. ```bash pw.x < Si.scf > scf.out ``` -------------------------------- ### Execute Wannier90 C executable with silicon.win Source: https://github.com/wannier-developers/wannier90/blob/develop/test-suite/library-mode-test-C-interface/readme.md This snippet shows how to set the executable path and run the wannier_c.x program with the 'silicon.win' input file in the testw90_example03 directory. ```bash (export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example03; eval $EXE silicon.win ) ``` -------------------------------- ### seedname_htB.dat Output Example Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md Example content of the seedname_htB.dat file, which contains Hamiltonian matrix elements for bulk transport calculations. This file is read if transport_mode is 'bulk' and tran_read_ht is .TRUE., and written if tran_write_ht is .TRUE. ```vi written on 14Dec2007 at 11:30:17 150 -1.737841 -2.941054 0.052673 -0.032926 0.010738 -0.009515 0.011737 -0.016325 0.051863 -0.170897 -2.170467 0.202254 . . . -0.057064 -0.571967 -0.691431 0.015155 -0.007859 0.000474 -0.000107 -0.001141 -0.002126 0.019188 -0.686423 -10.379876 150 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 . . . 0.000000 0.000000 0.000000 0.000000 0.000000 -0.001576 0.000255 -0.000143 -0.001264 0.002278 0.000000 0.000000 ``` -------------------------------- ### Execute Wannier90 C executable with gaas.win Source: https://github.com/wannier-developers/wannier90/blob/develop/test-suite/library-mode-test-C-interface/readme.md This snippet shows how to set the executable path and run the wannier_c.x program with the 'gaas.win' input file in the testw90_example01 directory. ```bash (export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example01; eval $EXE gaas.win ) ``` -------------------------------- ### Wannier90 Spinor Projections for Only Up States Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/projections.md Example for projecting only onto spin-up ('u') states for a specified set of orbitals. ```vi Fe:sp3d2;dxy;dxz;dyz(u) ``` -------------------------------- ### Run pw.x for Non-SCF calculation (12 bands) Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_27.md Execute pw.x to obtain Bloch states on a k-point grid, specifically calculating 12 bands for the non-self-consistent field calculation. ```bash pw.x < si_12bands.nscf > nscf.out ``` -------------------------------- ### Wannier90 Plotting Output Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md Example of the plotting section header in the Wannier90 output file when an interpolated band structure is calculated. ```text *---------------------------------------------------------------------------* | PLOTTING | *---------------------------------------------------------------------------* Calculating interpolated band-structure ``` -------------------------------- ### Build and Link Demo Executable Source: https://github.com/wannier-developers/wannier90/blob/develop/test-suite/library-mode-test/CMakeLists.txt Adds an executable target named 'demo' from the 'demo.f90' source file and links it against the Wannier90 and MPI Fortran libraries. ```cmake add_executable(demo demo.f90) target_link_libraries(demo PRIVATE Wannier90::wannier90 MPI::MPI_Fortran) ``` -------------------------------- ### Specify k-point for k.p Expansion Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_33.md Define the specific k-point around which the k.p expansion coefficients will be computed, for example, the S point. ```vi kdotp_kpoint = 0.5000 0.0000 0.5000 ``` -------------------------------- ### Run pwscf for Bloch States Calculation Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_21.md Execute the Quantum ESPRESSO pw.x executable to obtain Bloch states on a uniform k-point grid. The output is redirected to nscf.out. ```bash pw.x < GaAs.nscf > nscf.out ``` -------------------------------- ### Run pw.x for Graphene Ground State Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_34.md Execute the pw.x code to obtain the ground state of graphene. This is the initial step in the workflow. ```bash pw.x < graphene.scf > scf.out ``` -------------------------------- ### Compute Overlaps with pw2wannier90 Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_8.md Execute pw2wannier90.x to compute overlaps between Bloch states and projections for the starting guess, generating .mmn and .amn files. ```bash pw2wannier90.x < iron_up.pw2wan > pw2wan_up.out ``` ```bash pw2wannier90.x < iron_dn.pw2wan > pw2wan_dn.out ``` -------------------------------- ### Project Layout Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/README.md Shows the typical file structure for an mkdocs project. ```bash mkdocs.yml # The configuration file. docs/ index.md # The documentation homepage. ... # Other markdown pages, images and other files. ``` -------------------------------- ### seedname_tb.dat Lattice Vectors Example Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md This snippet illustrates the initial part of the seedname_tb.dat file, which includes the date, time, and lattice vectors in Angstrom units. ```vi written on 27Jan2020 at 18:08:42 -1.8050234585004898 0.0000000000000000 1.8050234585004898 0.0000000000000000 1.8050234585004898 1.8050234585004898 -1.8050234585004898 1.8050234585004898 0.0000000000000000 ``` -------------------------------- ### Execute Wannier90 C executable with silane.win Source: https://github.com/wannier-developers/wannier90/blob/develop/test-suite/library-mode-test-C-interface/readme.md This snippet shows how to set the executable path and run the wannier_c.x program with the 'silane.win' input file in the testw90_example07 directory. ```bash (export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example07; eval $EXE silane.win ) ``` -------------------------------- ### Wannier90 Timing Information Summary Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md Example of the timing summary section in the Wannier90 output file, detailing time spent on various calculation parts. ```text *===========================================================================* | TIMING INFORMATION | *===========================================================================* | Tag Ncalls Time (s)| |---------------------------------------------------------------------------| |kmesh: get : 1 0.212| |overlap: read : 1 0.060| |wann: main : 1 1.860| |plot: main : 1 0.168| *---------------------------------------------------------------------------* All done: wannier90 exiting ``` -------------------------------- ### Run pwscf for Ground State Calculation Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_21.md Execute the Quantum ESPRESSO pw.x executable to perform the ground state calculation for GaAs. The output is redirected to scf.out. ```bash pw.x < GaAs.scf > scf.out ``` -------------------------------- ### Initializing Wannier90 Library Input Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/library_mode.md Call w90_input_setopt after setting all options with w90_set_option to initialize the library. This function sets up filenames and streams for output and error handling. It must be called after all w90_set_option calls. ```Fortran subroutine w90_input_setopt(common_data, seedname, istdout, istderr, ierr) character(len=*), intent(in) :: seedname integer, intent(in) :: istdout, istderr integer, intent(out) :: ierr type(lib_common_type), intent(inout) :: common_data ``` -------------------------------- ### Wannier90 Spinor Projections for Up and Down States Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/projections.md Example demonstrating how to define projections for both spin-up ('u') and spin-down ('d') states for specific orbitals on a given site. ```vi Fe:sp3d2;dxy;dxx;dyz(u,d) ``` -------------------------------- ### Run postw90 for orbital magnetization (serial and parallel) Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_19.md Execute the postw90 code to compute the orbital magnetization. Examples for both serial and parallel execution are provided. ```bash postw90.x Fe # (1)! ``` ```bash mpirun -np 8 postw90.x Fe # (2)! ``` -------------------------------- ### Graphene ProjWFC Input File Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_34.md This is the projwfc.x input file for the projectability calculation. ```fortran --8<-- "tutorials/tutorial34/graphene.projwfc" ``` -------------------------------- ### Setting Input Parameters in seedname.win Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/parameters.md Demonstrates different ways to set the 'num_wann' keyword in the Wannier90 input file. Case is ignored, and comments start with ! or #. ```plaintext num_wann 4 num_wann = 4 num_wann : 4 ``` -------------------------------- ### Graphene WIN Input File (Partial) Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_34.md This is a partial wannier90.x input file for the graphene calculation. ```fortran --8<-- "tutorials/tutorial34/graphene.win::55" ... ... ``` -------------------------------- ### Compute Overlap and Projections with pw2wannier90.x Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_34.md Execute pw2wannier90.x to compute the overlap between Bloch states and projections for the starting guess. This generates graphene.mmn and graphene.amn files. ```bash pw2wannier90.x < graphene.pw2wan > pw2wan.out ``` -------------------------------- ### Compute Overlaps with pw2wannier90 Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_20.md Execute pw2wannier90 to compute the overlap between Bloch states and projections for the starting guess. The results are stored in LaVO3.mmn and LaVO3.amn files. ```bash pw2wannier90.x < LaVO3.pw2wan > pw2wan.out ``` -------------------------------- ### Run projwfc.x for Graphene Band Structure Projectability Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_34.md Execute the projwfc.x code to obtain the band structure projectability of graphene. This is used for projected band analysis. ```bash projwfc.x < graphene.projwfc > projwfc.out ``` -------------------------------- ### Run pw.x for Bloch States Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_35.md Execute the pw.x code to obtain Bloch states on a uniform k-point grid. ```bash pw.x < silicon.nscf > nscf.out ``` -------------------------------- ### Compute pw2wannier90 overlaps Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_11.md Run pw2wannier90.x to compute overlaps between Bloch states and projections for the starting guess. Results are written to silicon.mmn and silicon.amn files. ```bash pw2wannier90.x < silicon.pw2wan > pw2wan.out ``` -------------------------------- ### Run postw90.x in parallel Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/preliminaries.md Execute the postw90.x command in parallel using MPI. The exact mpirun command and its flags may vary based on your MPI installation. ```bash mpirun -np 8 postw90.x seedname ``` -------------------------------- ### Real Lattice Vectors in `seedname.nnkp` Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/postproc.md The `real_lattice` block in the `seedname.nnkp` file specifies the lattice vectors in Angstrom units. This block is automatically generated during the post-processing setup. ```text begin real_lattice 2.250000 0.000000 0.000000 0.000000 2.250000 0.000000 0.000000 0.000000 2.250000 end real_lattice ``` -------------------------------- ### Build Faster Wannier90 Documentation for Development Source: https://github.com/wannier-developers/wannier90/blob/develop/autodoc/README.txt Use this command for faster documentation builds during development, as it omits graphs and search indices. ```bash ford fast.md ``` -------------------------------- ### Define k-point path for band structure Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/parameters.md Specifies the path in k-space for band structure calculations. Each line defines a segment with start and end points and their labels. ```vi begin kpoint_path G 0.0 0.0 0.0 L 0.0 0.0 1.0 L 0.0 0.0 1.0 N 0.0 1.0 1.0 vdots end kpoint_path ``` -------------------------------- ### Run pw2wannier90.x Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_32.md Execute the pw2wannier90.x command with your W.pw2wan input file to compute overlaps and projections. The output is redirected to pw2wan.out. ```bash pw2wannier90.x -in W.pw2wan > pw2wan.out ``` -------------------------------- ### Run pwscf for Bloch states on a k-point grid Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_9.md Execute the pw.x command to obtain Bloch states on a uniform k-point grid. Input is from BaTiO3.nscf and output is redirected to nscf.out. ```bash pw.x < BaTiO3.nscf > nscf.out ``` -------------------------------- ### Compute overlaps and projections with pw2wannier90 Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_9.md Execute pw2wannier90.x to compute the overlap between Bloch states and projections for the starting guess. The results are stored in BaTiO3.mmn and BaTiO3.amn files. ```bash pw2wannier90.x < BaTiO3.pw2wan > pw2wan.out ``` -------------------------------- ### Compute Overlap with pw2wannier90 Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_37.md Execute pw2wannier90.x to compute the overlap between Bloch states and projections for the starting guess. The results are written to Fe.mmn, Fe.amn, and Fe.uHu files. ```bash pw2wannier90.x < Fe.pw2wan > Fe.out ``` -------------------------------- ### Run pw.x for Graphene Band Structure Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_34.md Execute the pw.x code to compute the band structure of graphene. This step follows the ground state calculation. ```bash pw.x < graphene.bands > bands.out ``` -------------------------------- ### Graphene PW2WAN Input File Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_34.md This is the input file for the pw2wannier90.x executable. ```fortran --8<-- "tutorials/tutorial34/graphene.pw2wan" ``` -------------------------------- ### Compute Overlap and Projections with pw2wannier90 Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/tutorials/tutorial_12.md Use pw2wannier90 to compute the overlap between Bloch states and projections for the starting guess. The results are saved in benzene.mmn and benzene.amn files. ```bash pw2wannier90.x < benzene.pw2wan > pw2wan.out ``` -------------------------------- ### seedname_hr.dat Output Example Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md This snippet shows the format of the seedname_hr.dat file, which is generated when write_hr is set to .TRUE. It contains Hamiltonian matrix elements in the Wannier function basis. ```vi Created on 24May2007 at 23:32:09 20 17 4 1 2 1 4 1 1 2 1 4 6 1 1 1 2 1 2 0 0 -2 1 1 -0.001013 0.000000 0 0 -2 2 1 0.000270 0.000000 0 0 -2 3 1 -0.000055 0.000000 0 0 -2 4 1 0.000093 0.000000 0 0 -2 5 1 -0.000055 0.000000 . . . ``` -------------------------------- ### Execute Wannier90 C executable with copper.win Source: https://github.com/wannier-developers/wannier90/blob/develop/test-suite/library-mode-test-C-interface/readme.md This snippet shows how to set the executable path and run the wannier_c.x program with the 'copper.win' input file in the testw90_example04 directory. ```bash (export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example04; eval $EXE copper.win ) ``` -------------------------------- ### seedname_tb.dat Hamiltonian Matrix Element Example Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/files.md This snippet shows a portion of the seedname_tb.dat file containing the number of Wannier functions, grid points, degeneracy, and Hamiltonian matrix elements. ```vi 7 93 4 6 2 2 2 1 2 2 1 1 2 6 2 2 2 6 2 2 4 1 1 1 4 1 1 1 1 2 1 1 1 2 2 1 1 2 4 2 1 2 1 1 1 1 2 1 1 1 2 1 1 1 1 2 1 2 4 2 1 1 2 2 1 1 1 2 1 1 1 1 4 1 1 1 4 2 2 6 2 2 2 6 2 1 1 2 2 1 2 2 2 6 4 -3 1 1 1 1 0.42351556E-02 -0.95722060E-07 2 1 0.69481480E-07 -0.20318638E-06 3 1 0.10966508E-06 -0.13983284E-06 . . . ``` -------------------------------- ### Compile w90spn2spn.x Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/appendices/utilities.md Compile the w90spn2spn.x executable by running 'make w90spn2spn' in the main wannier90 directory. This is necessary before using the utility. ```bash make w90spn2spn ``` -------------------------------- ### Example Output of Atomic Projectors Used Source: https://github.com/wannier-developers/wannier90/blob/develop/docs/docs/user_guide/wannier90/projections.md This output from `pw2wannier90` shows which atomic orbitals are being used for computing the `amn` file, indicating the states and their corresponding atoms and orbital types. ```output ------------------------------------- *** Compute A with atomic projectors ------------------------------------- Use atomic projectors from UPF (read from pseudopotential files): state # 1: atom 1 (C ), wfc 1 (l=0 m= 1) state # 2: atom 1 (C ), wfc 2 (l=1 m= 1) state # 3: atom 1 (C ), wfc 2 (l=1 m= 2) state # 4: atom 1 (C ), wfc 2 (l=1 m= 3) state # 5: atom 2 (C ), wfc 1 (l=0 m= 1) state # 6: atom 2 (C ), wfc 2 (l=1 m= 1) state # 7: atom 2 (C ), wfc 2 (l=1 m= 2) state # 8: atom 2 (C ), wfc 2 (l=1 m= 3) ```