sisl
sisl copied to clipboard
Comparison with Denchar and sisl
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.
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:
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.
Ok, so you mean that I should generate wavefunctions in sisl
from the .WFSX
file, right?
Yes, that would be the easiest option!
Also some comparison of different origin would be great.
So there is something different in the non-orthorhombic system, something like an offset or something? Hmm...
Yes, the structure is shifted there, but still you can see if the wfn is the same or not.
Ok, so they were not the same thing, probably the easiest way to compare is to subtract the two grids to ensure direct comparison:
- Use the same number of grid-points in sisl and denchar, you can manually add them in sisl.
- Convert denchar output to e/Ang**3 so you can compare values.
- Do a final check that the normalization is complete
int rho == n_elec
for RHO, andint wave^2 == 1
for wavefunctions. These of course can only be done if the same simulation cell is used.