Database

WfBase computer package includes a database of the density functional theory (DFT) calculations on some simple solids.

Here are three approaches to accessing the database. In each of these three approaches, you should get in the end a folder with the name data containing several files with the .wf extension. Each of these .wf files corresponds to one density functional theory (DFT) calculation.

  1. Following this link you can download the entire database from your browser

    or you can get the same file using wget in the terminal (if you have wget installed on your machine):

    wget https://coh.ucr.edu/wfbase/latest/data.zip
    

    After downloading this file you should unzip it using a command such as:

    unzip data.zip
    
  2. Alternatively, you can download the same data directly from your python script using the function download_data_if_needed,

    import wfbase as wf
    wf.download_data_if_needed()
    
  3. The third option to get the database is to first install WfBase and then run the following command from your terminal:

    python -c "import wfbase as wf; wf.download_data_if_needed()"
    

Database entries, which are files with extension .wf in folder data, contain a nearly complete description of the first-principles electronic band structure. Due to the exponential localization of the Wannier functions, and symmetry capabilities implemented in the Wannier Berri package, these files are relatively small in size.

Other materials

At this point, WfBase has a rather small set of materials in its database. If you wish to study material that is currently not in the database, you will have to run the density-functional theory (DFT) calculations on your own. The example here provides input files for one of the entries in the database. Your material will likely need a different set of parameters. Once you run your DFT calculation and obtain the needed output files, you can see the following example of how to load that calculation into WfBase.

Information

Database file with extension .wf contains results of the DFT calculations. Information about these calculations can be accessed using the info function. Below is an example code that uses the info function to access information about the database.

# Copyright under GNU General Public License 2024
# by Sinisa Coh (see gpl-wfbase.txt)

import wfbase as wf

db = wf.load("data/au_fcc.wf")

db.info()

Below is the output generated by the python code above.

================================
 Database file *data/au_fcc.wf*
================================

:The version of this database file:

    2024_03_22


:Created using WfBase version:

    0.0.2


:Currently loaded WfBase version by this script:

    0.0.2


:Created using Wannier Berri version:

    0.15.0


:Currently loaded Wannier Berri version:

    0.15.0


:Input file for the SCF computation using pw.x from Quantum ESPRESSO:

##################################################################
    &control
      calculation = 'scf'
      restart_mode = 'from_scratch'
      pseudo_dir = '.'
      outdir = '_work'
      prefix = 'pref'
      tstress = .true.
      tprnfor = .true.
    /
    &system
      ibrav = 0
      celldm(1) = 1.0
      nat = 1
      ntyp = 1
      ecutwfc = 75.0
      noncolin = .true.
      lspinorb = .true.
      occupations = 'smearing'
      smearing = 'cold'
      degauss = 0.03
      starting_magnetization(1) = 0
    /
    &electrons
      conv_thr = 1.0e-12
    /
    ATOMIC_SPECIES
    Au 1.0 Au.upf
    ATOMIC_POSITIONS crystal
    Au         0.0000000000      0.0000000000      0.0000000000
    CELL_PARAMETERS alat
        -3.9246034918     -0.0000000000      3.9246034918
         0.0000000000      3.9246034918      3.9246034918
        -3.9246034918      3.9246034918      0.0000000000
    K_POINTS automatic
    14 14 14  0 0 0
##################################################################


:Input file for the NSCF computation using pw.x from Quantum ESPRESSO:

#######################################################################################
    &control
      calculation = 'nscf'
      restart_mode = 'from_scratch'
      pseudo_dir = '.'
      outdir = '_work'
      prefix = 'pref'
      tstress = .true.
      tprnfor = .true.
      wf_collect = .true.
      verbosity = 'high'
    /
    &system
      ibrav = 0
      celldm(1) = 1.0
      nat = 1
      ntyp = 1
      ecutwfc = 75.0
      nbnd = 69
      noncolin = .true.
      lspinorb = .true.
      occupations = 'smearing'
      smearing = 'cold'
      degauss = 0.03
      starting_magnetization(1) = 0
      nosym = .true.
    /
    &electrons
      conv_thr = 1.0e-10
      diago_full_acc = .true.
      diago_thr_init = 1.0d-10
      diagonalization = 'david'
    /
    ATOMIC_SPECIES
    Au 1.0 Au.upf
    ATOMIC_POSITIONS crystal
    Au         0.0000000000      0.0000000000      0.0000000000
    CELL_PARAMETERS alat
        -3.9246034918     -0.0000000000      3.9246034918
         0.0000000000      3.9246034918      3.9246034918
        -3.9246034918      3.9246034918      0.0000000000
    K_POINTS crystal
    512
         0.0000000000      0.0000000000      0.0000000000      0.0019531250
         0.0000000000      0.0000000000      0.1250000000      0.0019531250
         0.0000000000      0.0000000000      0.2500000000      0.0019531250
         0.0000000000      0.0000000000      0.3750000000      0.0019531250
         0.0000000000      0.0000000000      0.5000000000      0.0019531250
         0.0000000000      0.0000000000      0.6250000000      0.0019531250
         0.0000000000      0.0000000000      0.7500000000      0.0019531250
         0.0000000000      0.0000000000      0.8750000000      0.0019531250
    ... cutting long output ... set parameter "full" to True to get complete output.
#######################################################################################


:Pseudopotentials used in the calculation:

    https://coh.ucr.edu/wfbase/2024_03_22/psp/Au.upf


:Input file for pw2wannier90.x from Quantum ESPRESSO:

#############################
    &inputpp
       outdir = '_work'
       prefix = 'pref'
       seedname = 'x'
       write_mmn = .true.
       write_amn = .true.
       write_spn = .true.
       write_unk = .false.
       write_uHu = .false.
    /
#############################


:Input file for Wannier90:

#######################################################################################
    num_bands = 69
    num_wann = 18
    dis_win_min  = 4.41
    dis_win_max  = 74.09
    dis_froz_min = 4.41
    dis_froz_max = 30.37

    dis_num_iter = 3000
    num_iter = 0

    spinors = T
    begin projections
    Au:sp3d2;dxz;dyz;dxy
    end projections

    write_hr = true

    begin unit_cell_cart
    bohr
        -3.9246034918     -0.0000000000      3.9246034918
         0.0000000000      3.9246034918      3.9246034918
        -3.9246034918      3.9246034918      0.0000000000
    end unit_cell_cart

    begin atoms_frac
    Au         0.0000000000      0.0000000000      0.0000000000
    end atoms_frac

    mp_grid = 8 8 8

    begin kpoints
         0.0000000000      0.0000000000      0.0000000000
         0.0000000000      0.0000000000      0.1250000000
         0.0000000000      0.0000000000      0.2500000000
         0.0000000000      0.0000000000      0.3750000000
         0.0000000000      0.0000000000      0.5000000000
         0.0000000000      0.0000000000      0.6250000000
         0.0000000000      0.0000000000      0.7500000000
         0.0000000000      0.0000000000      0.8750000000
         0.0000000000      0.1250000000      0.0000000000
         0.0000000000      0.1250000000      0.1250000000
         0.0000000000      0.1250000000      0.2500000000
         0.0000000000      0.1250000000      0.3750000000
         0.0000000000      0.1250000000      0.5000000000
         0.0000000000      0.1250000000      0.6250000000
         0.0000000000      0.1250000000      0.7500000000
         0.0000000000      0.1250000000      0.8750000000
         0.0000000000      0.2500000000      0.0000000000
         0.0000000000      0.2500000000      0.1250000000
         0.0000000000      0.2500000000      0.2500000000
    ... cutting long output ... set parameter "full" to True to get complete output.
#######################################################################################