Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remake dopedxpy-sc-fermi #46

Open
wants to merge 117 commits into
base: develop
Choose a base branch
from
Open

remake dopedxpy-sc-fermi #46

wants to merge 117 commits into from

Conversation

alexsquires
Copy link
Member

@alexsquires alexsquires commented Jan 10, 2024

  • rename bulk_vasprun, not clear that this needs to be for a high quality dos
  • use _format_defect_name() in examples (is this still a private function? If it's externally useful, should it be changed?).
  • remove ..._and_save() from FermiSolver methods
  • defect_levels argument when annealing becomes a boolean
  • docstrings
  • multiprocessings
  • tests
  • suppress noisy warnings
  • tutorials
  • grid-searching
  • effective dopant response
  • "exceptions" for FermiSolverPyScFermi

@kavanase
Copy link
Member

Looking good @alexsquires. I like the mix-in/abstract class approach.

The _interpolate_chempots() function is quite nice, and I think will likely be one of the mostly-used features from these additions. From what we were discussing before in the #doped Slack, would it be possible to also integrate a grid-scanning approach too? As in, the current function linearly interpolates between two points (chem pot limits), which is nice and v useful in many cases, but if for instance we have a 3D chemical potential space, our min/max of the property of interest could also lie somewhere in the middle of this space, rather than along any linear path between two vertices/limits.

Ofc the user could iterate over all possible vertex/limit combinations if they knew what they were doing, which would be a good stab at this and get you most of the way there I imagine (kind of like a 'band structure path' approach), but still is only covering certain 'high-symmetry' paths in chem pot space. So if a grid approach was also possible (where e.g. the user can just set the chempot spacing in eV, or total number of grid points), that would also be v nice I think – should be doable with some of the scipy grid space interpolation functions I think? And/or pymatgen chemical potential diagram methods maybe?
If it was possible to implement relatively painlessly, could we add these two options? ☝️ 🙏

Sorry to be piling on the requests, but I guess the other main use case I'd imagine for this part of the code would be for the more complex defect thermodynamics analysis that py-sc-fermi allows, where you want to fix certain defect/species etc concentrations and perform some constrained solutions. Is it possible to integrate this to the fermi_solver code?

Also just fyi, about your earlier _format_defect_name() question, yes it is actually quite externally useful and I'll make it a public function in the next (minor) release.

@alexsquires
Copy link
Member Author

alexsquires commented Feb 15, 2024 via email

@alexsquires
Copy link
Member Author

@adair-nicolson , could you re-parse your Cu2SiSe3 data now that everything is relatively final and I can add the grid searching stuff back in?

@alexsquires
Copy link
Member Author

@kavanase proposing this as the full functionality - do you want to take a look at the example ipynb while I finish off the tests before I get to comfortable?

@alexsquires alexsquires marked this pull request as ready for review February 27, 2024 17:17
# Conflicts:
#	examples/CdTe/CdTe_example_thermo.json
@alexsquires
Copy link
Member Author

This covers the bug features and feature requests. Do you want to consider the merge into thermodynamics?

@kavanase
Copy link
Member

Ok great! Yes let's merge to doped.thermodynamics – and for the ChemicalPotentialGrid code, does it make sense to put it in doped.chemical_potentials?

@alexsquires
Copy link
Member Author

Migration finished! Just updating the tests.

alexsquires and others added 25 commits October 17, 2024 17:08
# Conflicts:
#	.github/workflows/pip_install_test.yml
#	.github/workflows/test.yml
#	docs/Dev_ToDo.md
#	examples/CompetingPhases/MgO/MgO_Fm-3m_EaH_0/vasp_std/vasprun.xml
#	examples/CompetingPhases/MgO/MgO_Fm-3m_EaH_0/vasp_std/vasprun.xml.gz
#	examples/CompetingPhases/MgO/Mg_Fm-3m_EaH_0/vasp_std/vasprun.xml
#	examples/CompetingPhases/MgO/Mg_Fm-3m_EaH_0/vasp_std/vasprun.xml.gz
#	examples/CompetingPhases/MgO/Mg_P6_3mmc_EaH_0.009/vasp_std/vasprun.xml
#	examples/CompetingPhases/MgO/Mg_P6_3mmc_EaH_0.009/vasp_std/vasprun.xml.gz
#	examples/CompetingPhases/MgO/Mg_R-3m_EaH_0.003/vasp_std/vasprun.xml
#	examples/CompetingPhases/MgO/Mg_R-3m_EaH_0.003/vasp_std/vasprun.xml.gz
#	examples/CompetingPhases/MgO/O2_mmm_EaH_0/vasp_std/vasprun.xml
#	examples/CompetingPhases/MgO/O2_mmm_EaH_0/vasp_std/vasprun.xml.gz
… concentration functions (`bulk_dos, temperature, chempots, limit, el_refs, fermi_level`), except if chempots is what we're scanning over (then `chempots > temperature`)
…s (relevant for total and constrained equilibrium)
… unphysical bounds (+/-0.1 eV), now uses midpoints as for grid function, and `return target_df` placed in `while` loop but should be outside)
… in `doped` concentration functions, matching symmetry and transition level outputs
…ity, and use `tqdm` in `scan_chempots` too
…docstrings order to match expected popularity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants