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

Issue in formatted spn format #293

Closed
giovannipizzi opened this issue Sep 30, 2019 · 5 comments
Closed

Issue in formatted spn format #293

giovannipizzi opened this issue Sep 30, 2019 · 5 comments
Milestone

Comments

@giovannipizzi
Copy link
Member

From an email to the mailing list by Marten Richter:

Dear Wannier90 list,

for some reasons, I tried to use gw stuff from yambo with wannier and I
also needed spins.
I need to use the spn formatted option, since I am too stupid (or lazy)
to install the python package for FortranFile on the cluster.
So I tried to run gw2wannier90.py from the utility folder using spn
output with spn_formatted.

I ran into several issues and I am really wondering, if the spn
formatted output was tested.
Anyway I made a patch and I would be glad, if someone can look over it
(who has reference data for the unformatted option for testing)
and could integrate it.
(Special care necessary, since I can write in several programming
languages but not in python and I do not have really much data to check
the correct behaviour).

spnfix.patch.txt

@giovannipizzi
Copy link
Member Author

Note: I didn't test if this applies to the latest version too.

@martenrichter
Copy link

I used the wannier90 shipped with quantum espresso 6.4.1, so 3.0.0. But it did not appear to be different to the recent git.

Marten

@qiaojunfeng
Copy link
Collaborator

Hi Marten, thanks for your patch!
I checked and tested on the example23 (with spin-orbit coupling included), the patched gw2wannier90.py worked correctly when transforming spn files, both formatted and unformatted.

A minor suggestion: it's better not print the large SPN matrix: in your patch line 17, print(SPN)
Could you please create a pull request so the patch can be merged? Or I can help create the pull request if you prefer.

Other issues related to gw2wannier90.py:

  1. The script uses tab and space simutaneously, we should only use space or tab.
  2. It worked correctly on unformatted file in my test case. But the scipy.io.FortranFile module doesn't guarranteed to work in all cases. The w90spn2spn.x program (the corresponding documentation locates in the last of this Tex file) can be used to handle those cases. We can update the documentation of gw2wannier90.py.
  3. Since python 2 will be deprecated, the script should be updated to python 3, k_mapper.py should be updated as well.

@martenrichter
Copy link

Hi Junfeng,
it would be nice, if you could create the pull request. The print(SPN) was included by accident, it was used for debugging.

Marten

@qiaojunfeng
Copy link
Collaborator

Fixed in #294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants