minushalf execute

This command automates the use of the DFT -1/2. It uses the Nelder-Mead algorithm [1] to find the optimal values of CUT(S) and generates a text file with all the respective CUTS and the final value of the gap.

$ minushalf execute --help
Usage: minushalf execute [OPTIONS]

Uses the Nelder-Mead method to find the optimal values for the CUT(S) and,
finally, find the corrected Gap value. This command uses external software
to perform ab initio calculations, so it must be installed in order to
perform the command. Check the docs for an list of the softwares supported
by the CLI.

    Requires:

        minushalf.yaml : Parameters file. Check the docs
        for a more detailed description.

        ab_initio_files: Files needed to perform the ab initio
                         calculations. They must be in the same
                         directory as the input file minushalf.yaml

        potential_folder: Folder with the potential files for each atom in
                          the crystal. The files must be named in the following pattern
                          ${POTENTIAL_FILE_NAME}.${LOWERCASE_CHEMICAL_SYMBOL}

    Returns:

        minushalf_results.dat : File that contains the optimal
                                values of the cuts and the final
                                value of the Gap.

        corrected_valence_potfiles: Potential files corrected with opti-mum valence cuts.

        corrected_conduction_potfiles: Potential files corrected with optimum conduction cuts.

Options:
--quiet
--help   Show this message and exit.

minushalf.yaml

minushalf.yaml is the input file for the command execute, each of its tags and default values are described below.

software tag

This tag specifies the software that to perform ab initio calculations. For now, the command supports the following values for the software tag:

  • VASP (Default value)

Currently, minushalf only supports one software, but one hope to add more soon.

software: VASP

vasp tag

The vasp tag specifies the command needed to perform first principles calculations. This tag has the following fields:

  • command: Command used to perform first principles calculations. (Default: [‘mpirun’,’vasp’])

The mpirun command is used for convenience and can be overridden depending on the local settings of the user's machine. The example below shows an use of the vasp tag in the minushalf.yaml file:

vasp:
    command: ['mpirun','-np','6','vasp']

atomic_program tag

The atomic_program tag is a set of various informations that specifies the settings for the atomic program execution. The informations are:

  • exchange_correlation_code: Functional of exchange and correlation (Default: pb)

  • calculation_code: Calculation code for the atomic program (Default: ae)

  • max_iterations: Maximum number of iterations performed by the atomic program (Default: 100)

The values that the exchange_correlation_code and calculation_code tags can assume are listed below:

exchange_correlation_code

  • ca: Ceperley-Alder

  • wi: Wigner

  • hl: Hedin-Lundqvist

  • gl: Gunnarson-Lundqvist

  • bh: Von Barth-Hedin

  • pb: PBE scheme by Perdew, Burke, and Ernzerhof

  • rp: RPBE scheme by Hammer, Hansen, and Norskov

  • rv: revPBE scheme by Zhang and Yang

  • bl: BLYP (Becke-Lee-Yang-Parr) scheme

calculation_code

  • ae: All electrons

Below follows an example of the atomic_program tag in the minushalf.yaml file:

atomic_program:
    exchange_correlation_code: wi
    calculation_code: ae
    max_iterations: 200

correction tag

The correction tag specifies how the DFT -1/2

method is executed. It contains the following parameters:

  • correction_code: Code thar specifies the potential correction (Default: v)

  • potfiles_folder: Path to folder that holds the potential files for each atom. The files must be named in the following pattern ${POTENTIAL_FILE_NAME}.${LOWERCASE_CHEMICAL_SYMBOL} (Default: minushalf_potfiles)

  • amplitude: Scaling factor to be used to correct the artificially generated potential. In the vast majority of cases, the amplitude value is 1.0. However, there are some special cases where this value needs to be adjusted [5]. Therefore, we recommend that you do not change this value unless you know exactly what you are doing (Default: 1.0)

  • valence_cut_guess: Initial Guess for the Nelder-Mead algorithm for cut in valence correction. If not provided, the default value of \(0.15 + 0.84d\) [6] will be used for each optimization, where \(d\) is the distance of the nearest neighbor in the unit cell. (Default: \(0.15 + 0.84d\))

  • conduction_cut_guess: Initial Guess for the Nelder-Mead algorithm for cut in valence correction. If not provided, the default value of \(0.15 + 0.84d\) will be used will be used for each optimization, where \(d\) is the distance of the nearest neighbor in the unit cell. (Default: \(0.15 + 0.84d\))

  • tolerance: Absolute tolerance for the result of the Nelder-Mead algorithm (Default: 0.01)

  • fractional_valence_treshold: Treshold \(\epsilon\) for fractional valence correction (Default: 10).

  • fractional_conduction_treshold: Treshold \(\epsilon\) for fractional conduction correction (Default: 10).

  • overwrite_vbm: In some special cases [6], it is necessary to consider another band as the VBM. This tag is made for these situations. It is necessary to inform the kpoint and the band number that specifies the band location. The program immediately overwrites the old projection values and uses the new values for DFT -1/2 calculations (Default: No overwrite)

  • overwrite_cbm: In some special cases [6], it is necessary to consider another band as the CBM. This tag is made for these situations. It is necessary to inform the kpoint and the band number that specifies the band location. The program immediately overwrites the old projection values and uses the new values for DFT -1/2 calculations (Default: No overwrite)

  • inplace: This tag allows you to decide whether all calculations will be done in the root folder or not. It is recommended to pass it as True if non-self-consistent calculations are being performed for the Gap calculation, since the program only copies the input files, the output files needed for the non-self-consistent calculation will not be considered (Default: False)

  • divide_character: Factor that divides the character of each atom. It is used in cases where all the bonds of an atom are with atoms of the same chemical element, as in crystals of germanium and silicon. This factor is automatically calculated by the program, however this tag will overwrite these values. So use with caution.

  • vbm_characters: This tag allows the character values of the last valence band to be provided manually. It is recommended that this tag be used with caution as it can severely impact your results.

  • cbm_characters: This tag allows the character values of the first conduction band to be provided manually. It is recommended that this tag be used with caution as it can severely impact your results.

The values that the correction_code tag can assume are listed below:

correction_code

  • v: Simple valence correction

  • vf: Fractional valence correction

  • c: Simple conduction correction

  • cf: Fractional conduction correction

  • vc: Simple valence and simple conduction corrections

  • vfc: Fractional valence and simple conduction corrections

  • vcf: Simple valence and fractional conduction corrections

  • vfcf: Fractional valence and fractional conduction corrections

The example below shows an use of correction tag in the minushalf.yaml file:

correction:
    correction_code: vf
    potfiles_folder: ../potcar
    amplitude: 3.0
    valence_cut_guess:  [["C","p",2.0],["C","s",1.5]]  # initial guesses for each orbital that contributes to the valence band
    conduction_cut_guess:  [["Si","s",1.0],["Si","p",3.5]]
    tolerance: 0.01
    fractional_valence_treshold: 15
    fractional_conduction_treshold: 23
    overwrite_vbm: [4,9] # Kpoint and band number, respectively
    overwrite_cbm: [1,3] # Kpoint and band number, respectively
    inplace: False
    divide_character: [["C",p,1]] # divide the p character of C with one more atom
    vbm_characters: [["C","s",34],["C","s",50]] # Overwrite the characters mannualy
    cbm_characters: [["C","s",34],["C","s",50]]

Examples

To demonstrate the command usage, one apply the simple valence and simple conduction correction on SiC-2d .

VASP

To execute the command, the files must be provided in the following structure:

.
├── INCAR
├── KPOINTS
├── minushalf.yaml
├── POSCAR
├── POTCAR
└── potcars
    ├── POTCAR.c
    └── POTCAR.si

For the input file, the following initial settings were chosen:

software: VASP
vasp:
    command: ['mpirun','-np','4','vasp']

correction:
    correction_code: vc
    potfiles_folder: ./potcars
    valence_cut_guess: [["C","p" 3.20]]
    conduction_cut_guess: [["Si","p", 3.0]]

After executing the command, one can view the result in the file minushalf_results.dat. he file contains information on the values obtained in the optimization of the CUT and the resulting band energy Gap (in eV).

Valence correction cuts:
        (C,p):3.13 a.u
----------------------------------------------------------------
Conduction correction cuts:
        (Si,p):2.77 a.u
----------------------------------------------------------------
GAP: 4.37eV

For comparison purposes, the table below shows the values obtained by the method compared with Pure GGA, functional hybrids and GW.

SiC-2D band energy gap (in eV)

GGA

Hybrid

GW

DFT -1/2

2.54

3.35,3.46 [2]

4.19 [3],4.42 [4]

4.37

References