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

Comparison with Denchar and sisl #137

Open
zerothi opened this issue Aug 16, 2019 · 8 comments
Open

Comparison with Denchar and sisl #137

zerothi opened this issue Aug 16, 2019 · 8 comments

Comments

@zerothi
Copy link
Owner

zerothi commented Aug 16, 2019

Describe the feature
Now Denchar allows spin-orbit calculations which means that we can now compare the two!

It would be really nice to actually do this comparison and possibly create a workbook.

@pfebrer
Copy link
Contributor

pfebrer commented May 29, 2021

I've been comparing denchar with sisl for density and wavefunctions. I have created a folder with all the things necessary, and I will keep adding other structures/calculations. Let me know if you want to add something in particular.

Right now there's only orthogonal and non orthogonal graphene, but I've done this because I've seen differences in a system that I'm studying, so I plan to add it to see exactly what's happening.

Here are the results for graphene in an html file:

Comparing sisl with denchar.zip

Everything seems to be fine except the imaginary part of the wavefunctions at k=(0.5, 0, 0), which is always positive in the denchar version, but not in sisl (the 16 first wavefunctions are shown in each case).

Here is the folder to reproduce all the results, with a run_all.sh script that runs siesta and denchar and the jupyter notebook to analyze the results:

denchar_benchmark.zip

@zerothi
Copy link
Owner Author

zerothi commented May 30, 2021

I am not on my comp, but one thing to notice is that wavefunctions may be rotated by an arbitrary phase factor. So one should really use the same coefficients to compare correctly.

@pfebrer
Copy link
Contributor

pfebrer commented May 30, 2021

Ok, so you mean that I should generate wavefunctions in sisl from the .WFSX file, right?

@zerothi
Copy link
Owner Author

zerothi commented May 31, 2021

Yes, that would be the easiest option!

@zerothi
Copy link
Owner Author

zerothi commented May 31, 2021

Also some comparison of different origin would be great.

@zerothi
Copy link
Owner Author

zerothi commented May 31, 2021

So there is something different in the non-orthorhombic system, something like an offset or something? Hmm...

@pfebrer
Copy link
Contributor

pfebrer commented May 31, 2021

Yes, the structure is shifted there, but still you can see if the wfn is the same or not.

@zerothi
Copy link
Owner Author

zerothi commented May 31, 2021

Ok, so they were not the same thing, probably the easiest way to compare is to subtract the two grids to ensure direct comparison:

  1. Use the same number of grid-points in sisl and denchar, you can manually add them in sisl.
  2. Convert denchar output to e/Ang**3 so you can compare values.
  3. Do a final check that the normalization is complete int rho == n_elec for RHO, and int wave^2 == 1 for wavefunctions. These of course can only be done if the same simulation cell is used.

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

2 participants