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

Questions for using pyw90 eig command for spinful system #9

Open
zc994646659 opened this issue Nov 1, 2023 · 2 comments
Open

Questions for using pyw90 eig command for spinful system #9

zc994646659 opened this issue Nov 1, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zc994646659
Copy link

Dear Sir

I hope this email finds you well. I am writing to seek guidance regarding the determination of an appropriate fitting window for my analysis.

After carefully studying the relevant materials, I am still uncertain about how to determine the fitting window. Specifically, I have encountered difficulties in understanding how to generate a suggested interval for fitting.

Allow me to provide some context. Currently, I am working with a set of 32 Wannier functions, and I would like to fit a band within an energy range of 2eV above and below the Fermi level. However, I am unsure about the steps involved in generating a suitable interval for fitting.

Could you please provide me with some advice or guidance on how to proceed in determining the suggested window?

Thank you very much for your attention and support. I look forward to your response.

Sincerely,
zhouchao

@Cloudiiink
Copy link
Owner

It seems like you may have questions about how to use Wannier90 instead of pyw90. To gain a better understanding of the initial projection and energy window (pyw90 aims to analyze and test input parameters easily.), I suggest running the Wannier90 Tutorial examples (https://wannier.org/support/) and example of GaAs in pyw90 before you run your project.

The review article by Marzari et al. (2012) on maximally localized Wannier functions (MLWF) also provides a comprehensive overview of the theory and applications of MLWF. Hope this helps!

Marzari, N., Mostofi, A.A., Yates, J.R., Souza, I., Vanderbilt, D., 2012. Reviews of Modern Physics 84, 1419–1475.

@Cloudiiink
Copy link
Owner

Upon private consultation, it was determined that the current version of pyw90 doesn't support spinful system.
Here is a typical error output using command pyw90 eig suggest -e 5 15 to generate a possible energy window:

Traceback (most recent call last):
  File "/public/home/baokuo28/magus/bin/pyw90", line 8, in <module>
    sys.exit(main_cli())
  File "/public/home/baokuo28/magus/lib/python3.9/site-packages/pyw90/pyw90_cli.py", line 352, in main_cli
    args.func(args)
  File "/public/home/baokuo28/magus/lib/python3.9/site-packages/pyw90/pyw90_cli.py", line 273, in eig
    w90 = W90(eig=args.eig,
  File "/public/home/baokuo28/magus/lib/python3.9/site-packages/pyw90/lib/w90.py", line 58, in __init__
    self.read_eigenval()
  File "/public/home/baokuo28/magus/lib/python3.9/site-packages/pyw90/lib/w90.py", line 86, in read_eigenval
    dump = np.array(
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (603,) + inhomogeneous part.

This problem comes from the new columns introduced in EIGENVAL file for spinful system. Here is a typical EIGENVAL for spinful system:

   12   12    1    2
  0.9361768E+01  0.5188856E-09  0.5064479E-09  0.4274967E-09  0.1000000E-15
  1.000000000000000E-004
  CAR 
 unknown system                          
    116   1200    120
 
  0.0000000E+00  0.0000000E+00  0.0000000E+00  0.8333333E-03
    1      -40.483756    -40.483756   1.000000   1.000000
    2      -40.480183    -40.480183   1.000000   1.000000
    3      -40.437503    -40.437503   1.000000   1.000000
    4      -40.426142    -40.426142   1.000000   1.000000
    5      -40.347259    -40.347259   1.000000   1.000000
...

But for non-spinful system, e.g. GaAs in tests folder, the data in EIGENVAL file looks like:

    2    2    1    1
  0.2376593E+02  0.4065993E-09  0.4065993E-09  0.4065993E-09  0.5000000E-15
  1.000000000000000E-004
  CAR 
 GaAs                                    
     18    120     16
 
  0.0000000E+00  0.0000000E+00  0.0000000E+00  0.2962963E-03
    1      -11.255844   1.000000
    2      -11.255843   1.000000
...

@Cloudiiink Cloudiiink added the bug Something isn't working label Nov 6, 2023
@Cloudiiink Cloudiiink self-assigned this Nov 6, 2023
@Cloudiiink Cloudiiink changed the title some questions Questions for using pyw90 eig command for spinful system Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants