Skip to content

Commit 3aa04c9

Browse files
committed
[feat] allow to write vaspgamma.h5 file for SOC (SO==1)
1 parent c3015e8 commit 3aa04c9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

python/triqs_dft_tools/sumk_dft.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2353,7 +2353,11 @@ def calc_density_correction(self, filename=None, dm_type=None, spinave=False, kp
23532353
bnd_win_towrite = [band_window[0][:n_k_ibz,:]]
23542354
vasp_h5['band_window'] = bnd_win_towrite
23552355
vasp_h5.create_group('deltaN')
2356-
if spinave and self.SP != 0 and self.SO == 0:
2356+
if self.SO == 1:
2357+
# spin-orbit: a single spinor-band channel -> deltaN/ud
2358+
# (VASP keys the non-collinear charge correction on deltaN/ud)
2359+
vasp_h5['deltaN']['ud'] = deltaN['ud'][:n_k_ibz]
2360+
elif spinave and self.SP != 0 and self.SO == 0:
23572361
deltaN_ave = [(u + d) / 2.0 for (u, d) in zip(deltaN['up'][:n_k_ibz], deltaN['down'][:n_k_ibz])]
23582362
vasp_h5['deltaN']['up'] = deltaN_ave
23592363
vasp_h5['deltaN']['down'] = deltaN_ave

0 commit comments

Comments
 (0)