sisl icon indicating copy to clipboard operation
sisl copied to clipboard

Comparison with Denchar and sisl

Open zerothi opened this issue 4 years ago • 8 comments

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.

zerothi avatar Aug 16 '19 11:08 zerothi

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

pfebrer avatar May 29 '21 22:05 pfebrer

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.

zerothi avatar May 30 '21 14:05 zerothi

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

pfebrer avatar May 30 '21 19:05 pfebrer

Yes, that would be the easiest option!

zerothi avatar May 31 '21 05:05 zerothi

Also some comparison of different origin would be great.

zerothi avatar May 31 '21 05:05 zerothi

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

zerothi avatar May 31 '21 07:05 zerothi

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

pfebrer avatar May 31 '21 09:05 pfebrer

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.

zerothi avatar May 31 '21 09:05 zerothi