Skip to content

Commit

Permalink
[docs]: Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hentt30 committed Jul 12, 2021
1 parent 5c5f601 commit 9e384b8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 24 deletions.
6 changes: 3 additions & 3 deletions docs/source/_build/html/_sources/execute.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ correction tag
- ]_ will be used for each optimization, where :math:`d` is the distance of the nearest neighbor in the unit cell. (Default: :math:`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 :math:`0.15 + 0.84d` will be used will be used for each optimization, where :math:`d` is the distance of the nearest neighbor in the unit cell. (Default: :math:`0.15 + 0.84d`)
- tolerance: Minimum level of precision for the result of the Nelder-Mead algorithm (Default: 0.01)
- fractionary_valence_treshold: :ref:`Treshold <frac_correction>` :math:`\epsilon` for fractionary valence correction (Default: 10).
- fractional_valence_treshold: :ref:`Treshold <frac_correction>` :math:`\epsilon` for fractionary valence correction (Default: 10).
- overwrite_vbm: In some special cases [6]_, it is necessary to overwrite the value of band projection in a given orbital and ion. This tag is made for these situations. It is necessary to inform the chemical element symbol of the corresponding ion, the orbital and the value to be replaced. The program immediately overwrites the old projection values for the last valence band and use the new values for DFT -1/2 calculations (Default: No overwrite)
- overwrite_vbm: In some special cases [6]_, it is necessary to overwrite the value of band projection in a given orbital and ion. This tag is made for these situations. It is necessary to inform the chemical element symbol of the corresponding ion, the orbital and the value to be replaced. The program immediately overwrites the old projection values for the first conduction band and use the new values for DFT -1/2 calculations (Default: No overwrite)

Expand Down Expand Up @@ -169,8 +169,8 @@ The example below shows an use of correction tag in the :code:`minushalf.yaml` f
valence_cut_guess: 2.0
conduction_cut_guess: 1.0
tolerance: 0.01
fractionary_valence_treshold: 15
fractionary_conduction_treshold: 23
fractional_valence_treshold: 15
fractional_conduction_treshold: 23
overwrite_vbm:
- [C, p, 23.4]
- [Si, d, 11]
Expand Down
9 changes: 6 additions & 3 deletions docs/source/execute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ correction tag
- valence_cut_guess: Initial Guess for the Nelder-Mead algorithm for cut in valence correction. If not provided, the default value of :math:`0.15 + 0.84d` [6]_ will be used for each optimization, where :math:`d` is the distance of the nearest neighbor in the unit cell. (Default: :math:`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 :math:`0.15 + 0.84d` will be used will be used for each optimization, where :math:`d` is the distance of the nearest neighbor in the unit cell. (Default: :math:`0.15 + 0.84d`)
- tolerance: Absolute tolerance for the result of the Nelder-Mead algorithm (Default: 0.01)
- fractionary_valence_treshold: :ref:`Treshold <frac_correction>` :math:`\epsilon` for fractional valence correction (Default: 10).
- fractional_valence_treshold: :ref:`Treshold <frac_correction>` :math:`\epsilon` for fractional valence correction (Default: 10).
- fractional_conduction_treshold: :ref:`Treshold <frac_correction>` :math:`\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)

Expand All @@ -148,6 +149,8 @@ The values that the correction_code tag can assume are listed below:

- 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
Expand All @@ -165,8 +168,8 @@ The example below shows an use of correction tag in the :code:`minushalf.yaml` f
valence_cut_guess: 2.0
conduction_cut_guess: 1.0
tolerance: 0.01
fractionary_valence_treshold: 15
fractionary_conduction_treshold: 23
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
Expand Down
12 changes: 6 additions & 6 deletions minushalf/commands/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def execute(quiet: bool):
"correction_indexes"] = get_fractionary_correction_indexes(
vbm_projection,
treshold=minushalf_yaml.
correction["fractionary_valence_treshold"])
correction["fractional_valence_treshold"])

valence_fractionary_correction = correction(**valence_options)
valence_cuts, valence_gap = valence_fractionary_correction.execute()
Expand Down Expand Up @@ -262,7 +262,7 @@ def execute(quiet: bool):
"correction_indexes"] = get_fractionary_correction_indexes(
vbm_projection,
treshold=minushalf_yaml.
correction["fractionary_valence_treshold"])
correction["fractional_valence_treshold"])

conduction_options[
"correction_indexes"] = get_simple_correction_indexes(
Expand All @@ -283,13 +283,13 @@ def execute(quiet: bool):
"correction_indexes"] = get_fractionary_correction_indexes(
vbm_projection,
treshold=minushalf_yaml.
correction["fractionary_valence_treshold"])
correction["fractional_valence_treshold"])

conduction_options[
"correction_indexes"] = get_fractionary_correction_indexes(
cbm_projection,
treshold=minushalf_yaml.
correction["fractionary_conduction_treshold"])
correction["fractional_conduction_treshold"])

valence_fractionary_correction = correction(**valence_options)
valence_cuts, _ = valence_fractionary_correction.execute()
Expand All @@ -309,7 +309,7 @@ def execute(quiet: bool):
"correction_indexes"] = get_fractionary_correction_indexes(
cbm_projection,
treshold=minushalf_yaml.
correction["fractionary_conduction_treshold"])
correction["fractional_conduction_treshold"])

valence_correction = correction(**valence_options)
valence_cuts, _ = valence_correction.execute()
Expand All @@ -336,7 +336,7 @@ def execute(quiet: bool):
"correction_indexes"] = get_fractionary_correction_indexes(
cbm_projection,
treshold=minushalf_yaml.
correction["fractionary_conduction_treshold"])
correction["fractional_conduction_treshold"])
conduction_options["only_conduction"] = True

conduction_fractionary_correction = correction(**conduction_options)
Expand Down
4 changes: 2 additions & 2 deletions minushalf/data/minushalf_yaml_default_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class CorrectionDefaultParams(aenum.Enum, settings=aenum.NoAlias):
valence_cut_guess = None
conduction_cut_guess = None
tolerance = 0.01
fractionary_valence_treshold = 10
fractionary_conduction_treshold = 9
fractional_valence_treshold = 10
fractional_conduction_treshold = 9
overwrite_vbm = []
overwrite_cbm = []

Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/minushalf_yaml/minushalf_filled_out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ correction:
valence_cut_guess: 2.0
conduction_cut_guess: 1.0
tolerance: 0.001
fractionary_valence_treshold: 15
fractionary_conduction_treshold: 23
fractional_valence_treshold: 15
fractional_conduction_treshold: 23
overwrite_vbm: [1,3]
overwrite_cbm: [1,4]
4 changes: 2 additions & 2 deletions tests/unit/data/test_minushalf_yaml_default_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def test_to_dict_correction():
assert params_list["valence_cut_guess"] is None
assert params_list["conduction_cut_guess"] is None
assert np.isclose(params_list["tolerance"], 0.01)
assert np.isclose(params_list["fractionary_valence_treshold"], 10)
assert np.isclose(params_list["fractionary_conduction_treshold"], 9)
assert np.isclose(params_list["fractional_valence_treshold"], 10)
assert np.isclose(params_list["fractional_conduction_treshold"], 9)
assert isinstance(params_list["overwrite_vbm"], list)
assert isinstance(params_list["overwrite_cbm"], list)

Expand Down
12 changes: 6 additions & 6 deletions tests/unit/utils/test_minushalf_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def test_default_parameters():
CorrectionDefaultParams.conduction_cut_guess)] is None
assert file.correction[str(CorrectionDefaultParams.tolerance)] == 0.01
assert file.correction[str(
CorrectionDefaultParams.fractionary_conduction_treshold)] == 9
CorrectionDefaultParams.fractional_conduction_treshold)] == 9
assert file.correction[str(
CorrectionDefaultParams.fractionary_valence_treshold)] == 10
CorrectionDefaultParams.fractional_valence_treshold)] == 10
assert len(file.correction[str(
CorrectionDefaultParams.overwrite_vbm)]) == 0
assert isinstance(
Expand Down Expand Up @@ -78,9 +78,9 @@ def test_minushalf_without_filling_correction(file_path):
CorrectionDefaultParams.conduction_cut_guess)] is None
assert file.correction[str(CorrectionDefaultParams.tolerance)] == 0.01
assert file.correction[str(
CorrectionDefaultParams.fractionary_conduction_treshold)] == 9
CorrectionDefaultParams.fractional_conduction_treshold)] == 9
assert file.correction[str(
CorrectionDefaultParams.fractionary_valence_treshold)] == 10
CorrectionDefaultParams.fractional_valence_treshold)] == 10
assert len(file.correction[str(
CorrectionDefaultParams.overwrite_vbm)]) == 0
assert isinstance(
Expand Down Expand Up @@ -118,9 +118,9 @@ def test_minushalf_filled_out(file_path):
CorrectionDefaultParams.conduction_cut_guess)] == 1.0
assert file.correction[str(CorrectionDefaultParams.tolerance)] == 0.001
assert file.correction[str(
CorrectionDefaultParams.fractionary_conduction_treshold)] == 23
CorrectionDefaultParams.fractional_conduction_treshold)] == 23
assert file.correction[str(
CorrectionDefaultParams.fractionary_valence_treshold)] == 15
CorrectionDefaultParams.fractional_valence_treshold)] == 15
assert len(file.correction[str(
CorrectionDefaultParams.overwrite_vbm)]) == 2
assert file.correction[str(
Expand Down

0 comments on commit 9e384b8

Please sign in to comment.