-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enable spin orbit calculation #35
Conversation
e47b1db
to
181b13f
Compare
Main changes include: * Adjust the selection of bands and semicores in `get_wannier_number_of_bands` and `get_semicore_list` respectively, when `spin_type` is set to `SpinType.SPIN_ORBIT`. * Add support for `PseudoDojo/0.4/PBE/FR/standard/upf`, and `PSlibrary` (should be installed by user).
2. minor fix in `Wannier90WorkChain` and `Wannier90BandsWorkChain`.
@@ -132,7 +140,8 @@ def get_semicore_list(structure: orm.StructureData, pseudo_orbitals: dict) -> li | |||
site_semicores = deepcopy(pseudo_orbitals[site.kind_name]["semicores"]) | |||
|
|||
for orb in site_pswfcs: | |||
num_orbs = label2num[orb[-1]] | |||
nspin = 2 if spin_orbit_coupling else 1 |
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.
you can move this line outside of the for loop, after the comment line at 132, to avoid repeated assignments
@@ -0,0 +1,1456 @@ | |||
{ | |||
"H": { | |||
"filename": "pseudo_install/H.rel-pbe-kjpaw_psl.1.0.0.UPF", |
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.
is the path pseudo_install/
really needed? If not, should be removed
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, all look good! I think this can be merged once the previous two comments are resolved.
1. Update the pslibrary installation script and the pslibrary semicore file. Now the 'filename' in the semicore file is pure filename without path information. 2. Change the location where values are assigned to nspin to avoid repeat assignments.
Update for reviewer's comment
We made the following changes to enable spin-orbit coupling in the workflows
get_wannier_number_of_bands
andget_semicore_list
respectively, whenspin_type
is set toSpinType.SPIN_ORBIT
.PseudoDojo/0.4/PBE/FR/standard/upf
, andPSlibrary
(should be installed by user).spin_type=SpinType.SPIN_ORBIT
.a. In
Wannier90WorkChain
: Setoverrides
fromNone
to an empty dict{}
to avoid errors inrecursive_merge
.b. In
Wannier90BandsWorkChain
: Fix mismatch between type and value.