-
Notifications
You must be signed in to change notification settings - Fork 1
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
New wan2skeaf in Julia with energy unit conversion from eV to Ry #6
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
npaulish
commented
Oct 31, 2023
•
edited
Loading
edited
- Implement wan2skeaf in Julia
- Convert energies from eV to Ry in skeaf input files to get correct values of the cyclotron masses
- Allow automatic conversion of user defined Fermi energy from eV to Ry
- Allow to change the occupation prefactor for Fermi energy calculation to support SOC calculations
- Enable increasing tolerance in number of electrons when bisection algorithm to find Fermi energy doesn't converge
- Separate exit code when Fermi energy didn't converge within the upper limit of tolerance in number of electrons (0.001)
- Parse additional wan2skeaf output parameters
- Update tests and examples
- Remove unnecessary files
Now to write bxsfs for all bands either do not specify band_index or set {"band_index" : -1}. Adapted aiida calculation and wan2skeaf.py (!) accordingly. New output parameters for energies closest to the Fermi level, if smearing specified, wan2skeaf.py will write -1.0 (not implemented). Command line arguments of wan2skeaf.py also changed to match the ones of wan2skeaf.jl: -n for --num_electrons, -b for --band_index, -s for --smearing_type, -w for --width_smearing (prev. smearing_value) Ensured compatibility of wan2skeaf.jl with the workflow. In wannierjl, added 2*pi factor for RUC vectors to match measured frequencies Added energy conversion from eV to Ry in wan2skeaf.jl; Added Fermi energy in eV to the output parameters; Modified the parser accordingly.
…f.py description Fix in wan2skeaf.jl: convergence tolerance for num_electrons set to 1e-6 (default)
…band degeneracy. `occupation_prefactor` should be 1 for SOC calculation, 2 for non SOC calculation without magnetisation
- Modify wan2skeaf.jl such that only the energies written to bxsfs for SKEAF inputs are converted from eV to Ry. - Fermi energy and min and max band energies are kept in eV in the output for convenience (the units of the original bxsf file). - Fermi enery in Ry is also printed to the output. - Add `convert_fermi_energy_eV_to_Ry` flag to the input parameters for the SkeafCalculation and set it to `True` for default protocols. - This will allow directly specifying Fermi energy in eV when setting up a SkeafWorkChain, then the conversion will be done when preparing the SKEAF input file. - If Fermi energy for SKEAF calculations is specified in Ry, `convert_fermi_energy_eV_to_Ry` should be set to `False` to skip conversion. Remove the setup file for the wan2skeaf.jl code
…n the tolerance in number of electrons - Catch the error in `wan2skeaf.jl` and print it to the output file - Parse the error message and add new exit code (304) to Wan2skeafCalculation - Pass `tol_n_elec` parameter to `wan2skeaf.jl` suth that the tolerance in number of electrons can be controlled - Make `wan2skeaf.jl` output more verbose, print also the parameters that are actually used in the calculation - Parse additional wan2skeaf output to the `output_parameters`
qiaojunfeng
reviewed
Jun 4, 2024
utils/wan2skeaf.jl/wan2skeaf.jl
Outdated
band_min = minimum(bxsf.E[ib:ib, :, :, :]) | ||
band_max = maximum(bxsf.E[ib:ib, :, :, :]) | ||
println("Min and max of band $ib : $band_min $band_max") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe fix the indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Should be fixed now
* When Fermi energy doesn't converge within provided tolerance in number of electrons, increase the tolerance by a factor of 2 up to 0.001. * Print a warning if the initial tolerance is higher than 0.001 * Adjust the parser accordingly, add new output parameters: - `tol_n_electrons_initial` - `tol_n_electrons_final` Fix reference test file for SKEAF input parameters * Put `convert_fermi_energy_eV_to_Ry` parameter in the right place
Fantastic, thanks! |
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.