From 1f6bc8c1cdf3122474f11b753f937c6d9ef1940c Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Wed, 7 Aug 2024 12:14:33 -0400 Subject: [PATCH] Notes and minor cleanup --- docs/Dev_ToDo.md | 4 +++- docs/Future_ToDo.md | 2 +- doped/thermodynamics.py | 2 +- tests/test_chemical_potentials.py | 10 +++++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/Dev_ToDo.md b/docs/Dev_ToDo.md index cd299b06..0895d4d7 100644 --- a/docs/Dev_ToDo.md +++ b/docs/Dev_ToDo.md @@ -1,6 +1,6 @@ # `doped` Development To-Do List ## Chemical potential -- Check through chemical potential TO-DOs. Need to recheck validity of approximations used for extrinsic competing phases (and code for this). Proper `vasp_std` setup (with `NKRED` folders like for defect calcs) and `vasp_ncl` generation. +- Need to recheck validity of approximations used for extrinsic competing phases (and code for this). Proper `vasp_std` setup (with `NKRED` folders like for defect calcs) and `vasp_ncl` generation. - Efficient generation of competing phases for which there are many polymorphs? See SK notes from CdTe competing phases. - Publication ready chemical potential diagram plotting tool as in Adam Jackson's `plot-cplap-ternary` (3D) and Sungyhun's `cplapy` (4D) (see `doped_chempot_plotting_example.ipynb`; code there, just needs to be implemented in module functions). `ChemicalPotentialGrid` in `py-sc-fermi` interface could be quite useful for this? (Worth moving that part of code out of `interface` subpackage?) Also can see https://github.com/materialsproject/pymatgen-analysis-defects/blob/main/pymatgen/analysis/defects/plotting/phases.py for 2D chempot plotting. - Also see `Cs2SnTiI6` notebooks for template code for this. @@ -15,6 +15,8 @@ - Could also add an optional right-hand-side y-axis for defect concentration (for a chosen anneal temp) to our TLD plotting (e.g. `concentration_T = None`) as done for thesis, noting in docstring that this obvs doesn't account for degeneracy! - Separate `dist_tol` for interstitials vs (inequivalent) vacancies/substitutions? (See Xinwei chat) Any other options on this front? - Also see Fig. 6a of the `AiiDA-defects` preprint, want plotting tools like this +- Kumagai GKFO and CC diagram corrections. Implemented in `pydefect` and relatively easy to port? +- 2D corrections; like `pydefect_2d`, or recommended to use SCPC in VASP? - Can we add an option to give the `pydefect` defect-structure-info output (shown here https://kumagai-group.github.io/pydefect/tutorial.html#check-defect-structures) – seems quite useful tbf ## Housekeeping diff --git a/docs/Future_ToDo.md b/docs/Future_ToDo.md index 875579b6..cfb1bbfe 100644 --- a/docs/Future_ToDo.md +++ b/docs/Future_ToDo.md @@ -84,9 +84,9 @@ - In these cases, will also want to be able to plot these in a smart manner on the defect TLD. Separate lines to the stoichiometrically-equivalent (unperturbed) point defect, but with the same colour just different linestyles? (or something similar) -- `doped` functions should be equally applicable to the base `pymatgen` `Defect`/`DefectEntry` objects (as well as the corresponding `doped` subclasses) as much as possible. Can we add some quick tests for this? - Implement shallow donor/acceptor binding estimation functions (via effective mass theory) - Kasamatsu formula for defect concentrations at high concentrations (accounts for lattice site competition), as shown in DefAP paper +- Eigenvalue corrections for the eigenvalue plots, like shown in 10.1103/PhysRevB.109.054106? ## Docs - Add LDOS plotting, big selling point for defects and disorder! diff --git a/doped/thermodynamics.py b/doped/thermodynamics.py index 75b0694d..bc04de88 100644 --- a/doped/thermodynamics.py +++ b/doped/thermodynamics.py @@ -430,7 +430,7 @@ def __init__( plots. Args: - defect_entries ([DefectEntry] or {str: DefectEntry}): + defect_entries (list[DefectEntry] or dict[str, DefectEntry]): A list or dict of DefectEntry objects. Note that ``DefectEntry.name`` attributes are used for grouping and plotting purposes! These should be in the format "{defect_name}_{optional_site_info}_{charge_state}". diff --git a/tests/test_chemical_potentials.py b/tests/test_chemical_potentials.py index e455a342..e2387543 100644 --- a/tests/test_chemical_potentials.py +++ b/tests/test_chemical_potentials.py @@ -529,11 +529,11 @@ def test_structure_input(self, api_key): _check_structure_input(cp, cp_struct_input, struct, name, w, api_key, extrinsic=True) - for entries_list in [cp_struct_input.entries, cp.entries]: - assert len(entries_list) >= 1 - for extrinsic_entry in entries_list: - assert "K" in extrinsic_entry.data["doped_name"] - assert "K" in extrinsic_entry.name + for entries_list in [cp_struct_input.entries, cp.entries]: + assert len(entries_list) >= 1 + for extrinsic_entry in entries_list: + assert "K" in extrinsic_entry.data["doped_name"] + assert "K" in extrinsic_entry.name class ChemPotAnalyzerTestCase(unittest.TestCase):