From ce816c841d598079217947a42db69090c86909b2 Mon Sep 17 00:00:00 2001 From: Taylor Date: Thu, 11 Jul 2024 20:01:11 +0200 Subject: [PATCH] Ensure that k-point at Gamma is identically zero to ensure correct phonon eigenmodes. --- notebook/lattice-vibration/NGLTrajectoryClass.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notebook/lattice-vibration/NGLTrajectoryClass.py b/notebook/lattice-vibration/NGLTrajectoryClass.py index fd47348..db1292b 100644 --- a/notebook/lattice-vibration/NGLTrajectoryClass.py +++ b/notebook/lattice-vibration/NGLTrajectoryClass.py @@ -78,6 +78,9 @@ def __init__(self, trajectory): self.ka = 0 target_k=np.pi/2 self.ka_array = np.linspace(-2 * np.pi, 2 * np.pi, 101) + # Ensure that k-point at Gamma is identically zero to ensure correct phonon eigenmodes + self.ka_array[np.abs(self.ka_array) < 1e-5] = 0 + self.idx = int(101*(target_k+2*np.pi)/(4*np.pi)) # idx corresponding to ka=0 #self.idx = 50 # idx corresponding to ka=0 self.optic = False