Coder Social home page Coder Social logo

vasp_fermisurface's Introduction

Fermi Surface from VASP calculation

Fermi Surface

In condensed matter physics, the Fermi Surface is the surface of iso-energy in the reciprocal space, the energy of which is referred to as the Fermi energy or Fermi level. To visualize the Fermi surface, first you have to obtain the band energies in the reciprocal space. For example, one can sample the reciprocal space primitive cell using a uniform k-points grid and then use any ab initio code, e.g. VASP, to generate the band energies on these uniform grid points. With the band energies on the uniform grid, one can either plot the iso-surface with some coding or just use Xcrysden to do the plotting work.

Prerequisites

The following python library must be installed to run the script

Steps to visualize the Fermi surface

1. Calculate the band energies using VASP.

Note that Gamma-centered KPOINTS is required.

Monkhorst-Pack
0
Gamma
21 21 21
 0  0  0

Moreover, there is no need to turn off the symmetry in the INCAR file. As is well-known, VASP utilize the symmetry to fold the k-points grid to symmetry-irreducible k-points in the BZ, which will significantly reduce the computation cost. The script use spglib to unfold the irreducible k-points in BZ to the uniform k-points grid.

2. Visualizing the Fermi surface

At this step, use the script fs.py to process the VASP output files.

usage: fs.py [-h] [-i EIGVENVAL] [--poscar POSCAR] [--kpoints KPOINTS]
             [--plot {xcrys,mpl,mayavi}] [--cell {uc,bz}] [--efermi EFERMI]
             [--symprec SYMPREC] [--kmesh KMESH KMESH KMESH]

optional arguments:
  -h, --help            show this help message and exit
  -i EIGVENVAL          Location of the EIGENVAL file. By default, the
                        KPOINTS/POSCAR are also read from the directory where


  --kpoints KPOINTS     location of VASP KPOINTS
  --plot {xcrys,mpl,mayavi}
                        Fermi surface plotting method

  --efermi EFERMI       the Fermi energy
  --symprec SYMPREC     the symmetry precision used in spglib
  --kmesh KMESH KMESH KMESH
                        the kmesh in the KPOINTS
  --interp NEW_KMESH NEW_KMESH NEW_KMESH
                        the new grid size

There are three different ways to visualize the Fermi surface:

  • Using Xcrysden

First, you need to generate the bxsf file as input for xcrysden

fs.py -i EIGENVAL

then, launch xcrysden

xcrysden --bxsf ebands3d.bxsf

For example, below is the the Fermi surface of fcc Cu

  • Using Matplotlib
fs.py --plot mpl

  • Using Mayavi

    fs.py --plot mayavi               # Fermi Surface in Brillouin Zone
    fs.py --plot mayavi --cell uc     # Fermi Surface in primitive cell

You can also use vaspkit (tutorial) to generate KPOINTS with given k-spacing. Since the content in KPOINTS is quiet different, the script requires to input kmesh manually.

fs.py --kmesh 42 42 24 -i EIGENVAL
fs.py --kmesh 42 42 24 --interp 210 210 120 --plot mayavi --efermi 9.05973773


This file was generated by Remarkable on Thursday, 27. February 2020 04:45PM

vasp_fermisurface's People

Contributors

cloudiiink avatar qijingzheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vasp_fermisurface's Issues

VASP 5.4.4 with spin?

In EIGENVAL file generated by VASP 5.4.4, the eigenvalues of different spins are listed on the same line, with the form
"NumE Eup Edown OccupationUP OccupationDOWN"
for example:

0.0000000E+00 0.0000000E+00 0.0000000E+00 0.2267574E-02
1 -15.682996 -15.699935 1.000000 1.000000
2 -15.365257 -15.387651 1.000000 1.000000
3 -9.365086 -9.363467 1.000000 1.000000
4 -7.596234 -7.623737 1.000000 1.000000
5 -3.977048 -3.612688 1.000000 1.000000

it leads to significant misleading at the subroutine read_eigenval().
May the python file fs.py be modified so that the Fermi Surface can be generated in this eigenval file? The file is attached.
Thank you.
EIGENVAL.zip

Some Error happens

Hi, thanks for the great scripts. Now I try to run the script on a magnetic system with ISPIN=2, but it reminds me the error :AssertionError: Irreducible k-points generated by Spglib and VASP inconsistent!Try to reduce symprec, e.g. 1E-4. even though I have altered the sympre to 1E-4. And sometimes error is "Not automatic k-mesh generation in KPOINTS!".Do you have any suggestion on it?

Also, I want to know whether the correct VASP calculation process of fermi surface is:
1.Optimize structure and do scf .
2.Then generate kpoints in the format of :
k-points for fermi-surface. K-mesh of 9x9x9
1000
Reciprocal
0.0000 0.0000 0.0000 1
0.0000 0.0000 0.1111 1
0.0000 0.0000 0.2222 1
...
then do the nonscf.

I am looking forward to your response. Thank you very much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.