Is this a bug in deformation potential tensor calculation module?

i Alex,

Recently I met with a problem when checking the output of deformation potential tensor calculation and the output of amset run. I found that the band indice of VBM and CBM in output of deformation calculation are always one number smaller than those in the output of amset run.

As you can see, in my deformation output, the VBM is #83 and CBM is #84

Valence band maximum:

  • band: 83 k-point: [ 0.00 -0.19 -0.43 ]
  • deformation potential:
    [[ 0.70 0.03 4.88]
    [ 0.03 1.76 0.07]
    [ 4.88 0.07 2.39]]

Conduction band minimum:

  • band: 84 k-point: [ 0.50 0.00 0.00 ]
  • deformation potential:
    [[ 3.52 0.07 6.50]
    [ 0.07 3.50 0.07]
    [ 6.50 0.07 0.28]]

Including bands 69—88

but in amset run output, the VBM is #84 and CBM is #85


 Input band structure information:
   ├── # bands: 100
   ├── # k-points: 602
   ├── Fermi level: 4.942 eV
   ├── spin polarized: False
   └── metallic: False

 Band gap:
   ├── indirect band gap: 0.723 eV
   ├── direct band gap: 1.029 eV
   └── direct k-point: [0.17, 0.00, -0.00]

 Valence band maximum:
   ├── energy: 4.561 eV
   ├── k-point: [0.00, 0.19, 0.43]
   └── band indices: 84

 Conduction band minimum:
   ├── energy: 5.284 eV
   ├── k-point: [0.50, 0.00, -0.00]
   └── band indices: 85


 ~~~~~~~~~~~~~~~~~~~~~~~~~~ INTERPOLATION ~~~~~~~~~~~~~~~~~~~~~~~~~~

 Getting band interpolation coefficients
   └── time: 2.5427 s

 Interpolation parameters:
   ├── k-point mesh: 33x71x19
   └── energy cutoff: 1.5 eV

 Interpolating spin-up bands 69-88
   └── time: 0.4054 s

And in a most serious case, the total number of bands included in interpolation varies in deformation.h5 and wavefunction.h5, which leads to the breakdown of amset run.
![image|690x472](upload://qLz2DQTzdgxqM9vJHqihmJV0BcC.png) 
![image|690x370](upload://yprn4tmTnOc5inkAW4JarhXsNns.png) 
![image|690x105](upload://vQBNp7XdvHlqI64Xlo9XKOTTHez.png) 

I can guarentee that I used exactly the same INCAR (except two tags: LORBIT and ICORELEVEL)and KPOINTS in deformation calculation and wavefunction calculation. Why is this error happening? Looking forward to your reply.

Thanks,
Zhi



So sorry about the poor fomat of my post, I’m still getting used to this wonderful forum.

Hi Zhi,

A few questions:

  1. Did you use the same k-point mesh for your deformation potential calculations as for the wavefunction and AMSET vasprun calculations?
  2. Please can you post the full command you used for generating the deformation potentials. Specifically, you should check that the first folder you specify when extracting the deformations is the bulk (undeformed) structure.

Secondly, both amset wave and amset deform read have an option --bands which can be used to select exactly which bands you want to extract.

So for example, you can run amset wave --bands 69:88 and amset deform read ... --bands 69:88 so that the number of bands matches those of amset run.

Best,
Alex

Hi Alex,

Thanks for your detailed reply.

  1. I indeed used same k-point mesh for DP and wavefunction calculation;
  2. my full command for generate DP started with the undeformed strucutre, which I named it 000/ before all the deformed directories.

I will try to include specified numbers of bands to make deformation.h5 and wavefunction.h5 compatible with each other. Thanks for your suggestion. I will reply with my findings after testing.

Thanks,
Zhi

Hi Alex,

First congrats on your AMSET paper published on Nat. Comm.! Very nice job!

I have finished the testing. Some problems gone some not.

  1. the incompatible number of bands in deformation.h5 and wavefunction.h5 can be easily fixed by add the argument of --band you mentioned.

  2. Wrong index of CBM and VBM in deformation.h5 persists. Here I used a very simple compounds SnS2 as a testing subject. Its POSCAR is as followes:

Primitive Cell
1.000000
3.70015387676906 0.00000000000000 0.00000000000000
-1.85007693838453 3.20442725519348 0.00000000000000
0.00000000000000 0.00000000000000 6.83358405998117
Sn S
1 2
DIRECT
0.0000000000000000 0.0000000000000000 0.0000000000000000
0.3333333333333333 0.6666666666666666 0.2163049930008827
0.6666666666666667 0.3333333333333334 0.7836950069991173

I carefully checked that I used exactly the same KPOINTS for deformation and wavefunction calculations. KPOINTS as:

KPOINTS
0
Gamma
18 18 7
0.0 0.0 0.0

The ENCUT in INCAR is also kept the same in both calculations.
INCAR for deform

SYSTEM = SnS2_deform
ISTART = 0
ICHARG = 2
NPAR = 4
PREC = Accurate
ISMEAR = 0
SIGMA = 0.1
EDIFF = 1E-8
LWAVE = F
LCHARG = F
ENCUT = 500
LORBIT = 11
ICORELEVEL = 1

INCAR for wave

SYSTEM = SnS2_wave
ISTART = 0
ICHARG = 2
NPAR = 4
PREC = Accurate
ISMEAR = 0
SIGMA = 0.1
EDIFF = 1E-8
LWAVE = T
LCHARG = T
ENCUT = 500
LORBIT = 11

After extract the deformation.h5, I get VBM and CBM indexed as no.12 and no.13, here is the related information that amset deform read returned:

Calculating deformation potentials
Valence band maximum:
band: 12 k-point: [ -0.17 0.00 -0.14 ]
deformation potential:
[[ 1.28 4.23 1.85]
[ 4.23 1.17 1.07]
[ 1.85 1.07 3.43]]

Conduction band minimum:
band: 13 k-point: [ 0.00 0.50 -0.43 ]
deformation potential:
[[ 4.82 0.03 1.39]
[ 0.03 3.13 1.50]
[ 1.39 1.50 1.63]]

Including bands 9—14

Deformation potentials written to deformation.h5

However, according to my band structure calculation the VBM and CBM should be no.13 and no.14. It is also confirmed later by amset run returns the information as follows:

Band gap:
- indirect band gap: 1.533 eV
- direct band gap: 1.803 eV
- direct k-point: [-0.48, -0.00, 0.33]

Valence band maximum:
- energy: 2.676 eV
- k-point: [0.16, 0.00, 0.13]
- band indices: 13

Conduction band minimum:
- energy: 4.209 eV
- k-point: [-0.48, -0.00, 0.40]
- band indices: 14

I’m afraid that this will induce large error when calculating the ADP scattering rate.

1 Like

I suspect it might be arosed by the deformation, because I got WARNING when I use amset deform read:

WARNING: Reciprocal lattice and k-lattice belong to different
class of lattices. Often results are still useful but
it is recommended to regenerate deformations without
symmetry using: amset deform create --symprec N

So I tried use amset deform create --symprec N to generate more deformed structures (just 2 more). Also I noticed when I used amset deform read -s N 000/ 001/ 002/ 003/ 004/ 005/ 006/ 007/ 008/ 009/ 010/ 011/ 012/, it returns error like:

Traceback (most recent call last):
File “/home/zlc1690/anaconda3/envs/my_pymatgen/bin/amset”, line 8, in
sys.exit(cli())
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/amset/tools/deformation.py”, line 167, in read
spg_symbol = unicodeify_spacegroup(sga.get_space_group_symbol())
File “/home/zlc1690/anaconda3/envs/my_pymatgen/lib/python3.8/site-packages/pymatgen/symmetry/analyzer.py”, line 96, in get_space_group_symbol
return self._space_group_data[“international”]
TypeError: ‘NoneType’ object is not subscriptable

If I use default deform read command, it reads all the 12 deformed structures but still wrongly indexed VBM and CBM.
I also tried to use smaller fractional magnitude of strain by amset deform create -d 0.002, it doesn’t help either.

P.S. I read both from your AMSET paper and the tutorial on AMSET website that amset run should start with a vasprun.xml from band structure calculation. By “band strucutre calculation”, do you mean a VASP single-point calculation with line-mode KPOINTS? I always use amset run with a vasprun.xml from exactly the same directory where I extract the wavefunction.h5 which is not a band structure calculation but a single point calcualtion with Monkhorst Pack or Gamma-centered KPOINTS , is that wrong?

Hope to hear you soon,
Zhi

Hi Zhi,

Thank you for all the detailed information. I have some good news. The wrong band index is just a formatting error and will not impact any of the results of your calculation. In amset run the VBM and CBM band indices run from 1 to NBANDS, whereas in amset deform read the printed indices of the CBM and VBM run from 0 to NBANDS - 1. I just forgot to add +1 in the print statement.

I will push a fix to amset later today.

I would like to investigate why amset deform read -s N ... command fails. Would you be willing to send me your vasprun.xml file and I will do some tests. Feel free to email it to me if you prefer.

Best,
Alex

Hi Alex,

Ok, I see. But the mistake is not only in the band index, the k-point coordinates of VBM and CBM in amset run and amset deform read are also different. If the mistake is only in the printing step, shouldn’t the k-points be the same?

By “vasprun.xml”, did you mean all the 13 vasprun.xml files generated during deformation run?

Thanks,
Zhi

Hi Zhi,

I see what you mean about the k-points.

Firstly, I don’t think the VBM is an issue. The VBM from amset run is: (0.16, 0.00, 0.13) whereas the VBM from amset deform is: (-0.17, 0.00, -0.14). These points are equivalent if you consider time reversal symmetry.

The CBM k-point is more difficult to explain.

To get to the bottom of this:

  1. Can you confirm you are using the latest version of amset (v0.4.9)?
  2. If possible, if you can send me the 13 vasprun.xml and OUTCAR files. This will be the easiest for me to diagnose the issue.

Also, I realised I did not respond to this question:

By “band structure calculation”, do you mean a VASP single-point calculation with line-mode KPOINTS?

By band structure calculation, I mean a single point calculation on a uniform k-point mesh, I.e., a normal KPOINTS file not a line mode calculation.

I always use amset run with a vasprun.xml from exactly the same directory where I extract the wavefunction.h5 which is not a band structure calculation but a single point calcualtion with Monkhorst Pack or Gamma-centered KPOINTS , is that wrong?

This is exactly right. You can use exactly the same calculation used to generate the WAVECAR in amset run. I would say that both uniform and line mode calculations are “band structure” calculations, however one is along a high-symmetry path and the other is on a regular k-point mesh.

Best,
Alex

Hi Alex,

About the CBM k-point mismatch, is it possible that because SnS2 is a hexgonal crystal, its a-axis is equivalent to the b-axis? Therefore, [-0.48, -0.00, 0.40] first according to the time reversal symmetry can be transfer to [0.48, 0.00, -0.40], then according to the a-b mirror symmetry, it transfers into [0.00, 0.48, -0.40]. This one can be basically regarded as the same with [0.00, 0.50, -0.43].

I am using the latest 0.4.9 version AMSET. I am going to send you the 13 vasprun.xml and OUTCAR through email. Could you please leave me an email address?

Thanks for your patience!
Zhi

Hi Zhi,

Good spot. I think you are correct. Although it does seem like some numerical noise has gotten into the k-points. I will see if I can fix that.

Best,
Alex

Hi Zhi,

Thanks for sending your calculation outputs. One thing I’ve noticed is that the deformation potential calculations include the k-point [0.50 0.00 -0.43] which is the same as the CBM identified by amset deform read when considering the symmetry of the structure, i.e. [0.00 0.50 -0.43]. However, the k-point mesh of the deformation potential calculation doesn’t include anything similar to the CBM k-point identified by amset run, namely [-0.48, -0.00, 0.40].

Are you 100 % sure that both calculations used the same mesh. In particular, could it be that the mesh you used for amset run is not Gamma centered, whereas the mesh for the deformations is Gamma centered?

Best,
Alex

Hi Alex,

You are right! I have just found out that I linked wrong vasprun.xml (coms from another test with different k-mesh) for amset run. now the output of amset run is

Band gap:
- indirect band gap: 1.532 eV
- direct band gap: 1.805 eV
- direct k-point: [0.50, 0.00, 0.29]

Valence band maximum:
- energy: 2.675 eV
- k-point: [0.17, 0.00, 0.14]
- band indices: 13

Conduction band minimum:
- energy: 4.207 eV
- k-point: [0.50, 0.00, 0.43]
- band indices: 14

So there is only one bug for the printing of band index, other errors are my problem. Thank you so much!

Best,
Zhi

I roll up to check my first post under this topic, at that time the k-points of VBM and CBM are actually consistent in amset deform and amset run. It must be after several times testing I mistaken the directories and linked wrong vasprun.xml. Awkward. :sweat_smile:

Great! I’ve pushed a new version of amset (v0.4.10) which fixes the band indices among other things.

Thank you very much for all the information. Please let me know if you have any other questions using amset.

Best,
Alex

1 Like

Dear Alex,

In my tests, the "amset deform … " command to calculate deformation potential from undeformed and deformed cases will fail (some mapping problem from python, I guess) if the “NBANDS” tag in VASP of these cases are not the same.
Suppose using two machines, one with 32 cpu and another with 40 cpu, and NPAR=1, then VASP will give different NBANDS numbers even though all input files are all same. Then, the problem will happen.
Even though we can set NABNDS number in INCAR, however, if the cpu numbers are not same, VASP will adjust the NBANDS eventually (Can found in OUTCAR).

Just want to let you this issue (but it’s due to VASP feature, not problem of AMSET).
This program is nice and with great potential.

Best,
John Chen