SMTG-Bham / sumo

Heavyweight plotting tools for ab initio calculations
https://smtg-bham.github.io/sumo/
MIT License
192 stars 77 forks source link

sumo-bandstats #167

Closed isabelmoib closed 2 years ago

isabelmoib commented 2 years ago

Hi,

what is the function of sumo-bandstats -s

I read that the default is samples 3 k-points when determining the effective masses. what does it mean? if I change that number I got different effective mass values.

Best regards, ibra

isabelmoib commented 2 years ago

Also, for the example: Hole effective masses: m_h: -0.641 | band 34 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.50, 0.50] (L) m_h: -0.516 | band 34 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.00, 0.50] (X) m_h: -0.641 | band 35 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.50, 0.50] (L) m_h: -0.516 | band 35 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.00, 0.50] (X) m_h: -1.234 | band 36 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.50, 0.50] (L) m_h: -15.158 | band 36 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.00, 0.50] (X)

Electron effective masses: m_e: 0.207 | band 37 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.50, 0.50] (L) m_e: 0.211 | band 37 | [0.00, 0.00, 0.00] (\Gamma) -> [0.50, 0.00, 0.50] (X)

There are degenerate bands for the hole with different masses and paths (G-L and G-X). Which band and path could be selected?

Best regards, Ibra

isabelmoib commented 2 years ago

Sorry one thing more about k-point indices.

In my example the band gap is direct at gamma and I have 3 gamma zero weight points, however sumo give indices for 5 points and even I can not follow the indices (other things are OK, band indices, bandgap values and so on). same like the previous example at 0 , 113 however, when I checked the kpoints it is 0 and 110.

here my example: Kpoint 0.00000000000000 0.00000000000000 0.00000000000000 0 \Gamma 0.00000000000000 0.12500000000000 0.00000000000000 0 0.00000000000000 0.25000000000000 0.00000000000000 0 0.00000000000000 0.37500000000000 0.00000000000000 0 0.00000000000000 0.50000000000000 0.00000000000000 0 X 0.00000000000000 0.50000000000000 0.00000000000000 0 X 0.12500000000000 0.50000000000000 0.00000000000000 0 0.25000000000000 0.50000000000000 0.00000000000000 0 0.37500000000000 0.50000000000000 0.00000000000000 0 0.50000000000000 0.50000000000000 0.00000000000000 0 M 0.50000000000000 0.50000000000000 0.00000000000000 0 M 0.42857142857143 0.42857142857143 0.00000000000000 0 0.35714285714286 0.35714285714286 0.00000000000000 0 0.28571428571429 0.28571428571429 0.00000000000000 0 0.21428571428571 0.21428571428571 0.00000000000000 0 0.14285714285714 0.14285714285714 0.00000000000000 0 0.07142857142857 0.07142857142857 0.00000000000000 0 0.00000000000000 0.00000000000000 0.00000000000000 0 \Gamma 0.00000000000000 0.00000000000000 0.00000000000000 0 \Gamma 0.00000000000000 0.00000000000000 0.12500000000000 0 0.00000000000000 0.00000000000000 0.25000000000000 0 0.00000000000000 0.00000000000000 0.37500000000000 0 0.00000000000000 0.00000000000000 0.50000000000000 0 Z

Sumo output: Direct band gap: 1.021 eV k-point: [0.00, 0.00, 0.00] k-point indices: 0, 21, 22, 23, 24 Band indices: 285, 287

ajjackson commented 2 years ago

Hi,

what is the function of sumo-bandstats -s

I read that the default is samples 3 k-points when determining the effective masses. what does it mean? if I change that number I got different effective mass values.

Best regards, ibra

Hi Ibra,

the effective mass is related to the curvature of the band structure. VASP give us gradient information directly, so we have to estimate the second-derivative from the points we have. The approach used in bandstats is to fit a quadratic function to a few of the calculated points, then use the second-derivative of this function. The default (3 points) is the minimum required so the fit line will pass through all of them. If you increase the range with -s, more points will be considered. This could have the benefit of averaging out some noise, but will also bring in data that is further away from the turning-point and so less representative. I would only recommend to increase -s when employing a very fine k-point sampling. (And at that point it would also be worth looking at the sensitivity to DFT convergence parameters...)

The feature is mostly there for testing sensitivity/convergence; if switching from 3 to 5 points makes a negligible difference, you can be more confident that your k-points sampling is dense enough.

ajjackson commented 2 years ago

Also, for the example: ... There are degenerate bands for the hole with different masses and paths (G-L and G-X).

Yes

Which band and path could be selected?

Selected for what?

ajjackson commented 2 years ago

In my example the band gap is direct at gamma and I have 3 gamma zero weight points, however sumo give indices for 5 points and even I can not follow the indices (other things are OK, band indices, bandgap values and so on). same like the previous example at 0 , 113 however, when I checked the kpoints it is 0 and 110.

...

Sumo output: Direct band gap: 1.021 eV k-point: [0.00, 0.00, 0.00] k-point indices: 0, 21, 22, 23, 24 Band indices: 285, 287

That is odd, it refers to index 24 but your KPOINTS list doesn't even have 24 points in it. Is this the full band structure path you used? The k-point spacing is too coarse, you need to have much finer steps than this to get sensible results from bandstats. To get more k-points, try varying the value of the --density argument to sumo-kgen.

You mentioned in the other post that there was a defect involved. Is this a huge unit cell? That would explain the large default step size. (Large cells are small in reciprocal space.) Band stuctures of supercells are quite difficult to interpret, you may be better-served by a band-unfolding approach (e.g. BANDUP or easyunfold) that projects onto the underlying lattice.

isabelmoib commented 2 years ago

Hi, what is the function of sumo-bandstats -s I read that the default is samples 3 k-points when determining the effective masses. what does it mean? if I change that number I got different effective mass values. Best regards, ibra

Hi Ibra,

the effective mass is related to the curvature of the band structure. VASP give us gradient information directly, so we have to estimate the second-derivative from the points we have. The approach used in bandstats is to fit a quadratic function to a few of the calculated points, then use the second-derivative of this function. The default (3 points) is the minimum required so the fit line will pass through all of them. If you increase the range with -s, more points will be considered. This could have the benefit of averaging out some noise, but will also bring in data that is further away from the turning-point and so less representative. I would only recommend to increase -s when employing a very fine k-point sampling. (And at that point it would also be worth looking at the sensitivity to DFT convergence parameters...)

The feature is mostly there for testing sensitivity/convergence; if switching from 3 to 5 points makes a negligible difference, you can be more confident that your k-points sampling is dense enough.

Thanks

isabelmoib commented 2 years ago

In my example the band gap is direct at gamma and I have 3 gamma zero weight points, however sumo give indices for 5 points and even I can not follow the indices (other things are OK, band indices, bandgap values and so on). same like the previous example at 0 , 113 however, when I checked the kpoints it is 0 and 110. ... Sumo output: Direct band gap: 1.021 eV k-point: [0.00, 0.00, 0.00] k-point indices: 0, 21, 22, 23, 24 Band indices: 285, 287

That is odd, it refers to index 24 but your KPOINTS list doesn't even have 24 points in it. Is this the full band structure path you used? The k-point spacing is too coarse, you need to have much finer steps than this to get sensible results from bandstats. To get more k-points, try varying the value of the --density argument to sumo-kgen.

You mentioned in the other post that there was a defect involved. Is this a huge unit cell? That would explain the large default step size. (Large cells are small in reciprocal space.) Band stuctures of supercells are quite difficult to interpret, you may be better-served by a band-unfolding approach (e.g. BANDUP or easyunfold) that projects onto the underlying lattice.

I posted the top part of KPOINTS file with zero weight and contains the gamma point (because the code detected the bandgap at that point, so I think k-point indices are for the gamma point, is it true?), however there more kpoints with zero weight.

The code detects everything correct including the bandgap, band indices, and so on. Only my concern about k-point indices, what does it mean? In my case the bandgap at gamma, and I have three gamma points with zero weight as I posted, however I got five indices.

isabelmoib commented 2 years ago

Also, for the example: ... There are degenerate bands for the hole with different masses and paths (G-L and G-X).

Yes

Which band and path could be selected?

Selected for what?

In case of different effective masses at degenerate bands or different paths (anisotropic), which value could be used and presented? could be the lightest or average?

ajjackson commented 2 years ago

I posted the top part of KPOINTS file with zero weight and contains the gamma point (because the code detected the bandgap at that point, so I think k-point indices are for the gamma point, is it true?), however there more kpoints with zero weight.

Unless you deleted lines from inside the block shown, there is still reason to be concerned about the sampling density.

The code detects everything correct including the bandgap, band indices, and so on. Only my concern about k-point indices, what does it mean? In my case the bandgap at gamma, and I have three gamma points with zero weight as I posted, however I got five indices.

Have a look at the k-point values at the corresponding indices, and the corresponding place in the band structure. Probably you will find that the band edges at that point are also equal to the VBM/CBM? You may find that due to band-folding there are Gamma-point features repeated at all the high-symmetry points.

In case of different effective masses at degenerate bands or different paths (anisotropic), which value could be used and presented? could be the lightest or average?

The degenerate bands and various directions (including as-yet-uncalculated directions) are all valid conduction pathways if the doping can be achieved. I would initially present all the calculated directions as a table; anisotropy is an interesting property. Then perhaps refer to effective masses "as low as X" when discussing potential of material. It depends on context.

isabelmoib commented 2 years ago

I posted the top part of KPOINTS file with zero weight and contains the gamma point (because the code detected the bandgap at that point, so I think k-point indices are for the gamma point, is it true?), however there more kpoints with zero weight.

Unless you deleted lines from inside the block shown, there is still reason to be concerned about the sampling density.

The code detects everything correct including the bandgap, band indices, and so on. Only my concern about k-point indices, what does it mean? In my case the bandgap at gamma, and I have three gamma points with zero weight as I posted, however I got five indices.

Have a look at the k-point values at the corresponding indices, and the corresponding place in the band structure. Probably you will find that the band edges at that point are also equal to the VBM/CBM? You may find that due to band-folding there are Gamma-point features repeated at all the high-symmetry points.

In case of different effective masses at degenerate bands or different paths (anisotropic), which value could be used and presented? could be the lightest or average?

The degenerate bands and various directions (including as-yet-uncalculated directions) are all valid conduction pathways if the doping can be achieved. I would initially present all the calculated directions as a table; anisotropy is an interesting property. Then perhaps refer to effective masses "as low as X" when discussing potential of material. It depends on context.

Thanks. but why k-point indices do not match with the KPOINTS file? in my case 5 indices and 3 gamma points

utf commented 2 years ago

Please can you post the full KPOINTS and vasprun.xml

isabelmoib commented 2 years ago

OK, because this is SOC calculation, vasprun.xml is very big so I will try to send it.

isabelmoib commented 2 years ago

Please can you post the full KPOINTS and vasprun.xml

Also for example on sumo website, k-point indices at 0 , 113 however, when I checked the kpoints it is 0 and 110.

utf commented 2 years ago

While you are uploading the vasprun, please can you upload the full k-points file.

ajjackson commented 2 years ago

Looking at sumo/tests/data/Cs2SnI6/bandstructure there does indeed seem to be something odd going on. I make it 111 zero-weighted k-points split over the two files, but a CBM is found at k-point 113. Is there some duplication going on in the data processing before bandstats are calculated?

utf commented 2 years ago

I think I understand. The pymatgen logic for extracting branches in the band structure requires duplicating the high-symmetry points. To avoid wasting compute resources on these extra points, sumo-bandplot/bandstats adds this points dynamically rather than including them in the DFT calculation.

We will need to remove these extra points to get the proper band indices.

utf commented 2 years ago

The duplicating is done by this function: https://github.com/SMTG-UCL/sumo/blob/7a7e44f0d91a51e827d68a8e9cc6322c9ac69a2c/sumo/electronic_structure/bandstructure.py#L250

I'm not sure of the best way to account for this in band stats!

utf commented 2 years ago

I figured out a simple fix! #169

isabelmoib commented 2 years ago

OK. Thank you.

utf commented 2 years ago

If you update sumo it should fix your problem.

Thank you very much for raising this issue!

isabelmoib commented 2 years ago

Thank you. It works.