Skip to content

Commit ce816c8

Browse files
committed
Ensure that k-point at Gamma is identically zero to ensure correct phonon eigenmodes.
1 parent 1aede50 commit ce816c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

notebook/lattice-vibration/NGLTrajectoryClass.py

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ def __init__(self, trajectory):
7878
self.ka = 0
7979
target_k=np.pi/2
8080
self.ka_array = np.linspace(-2 * np.pi, 2 * np.pi, 101)
81+
# Ensure that k-point at Gamma is identically zero to ensure correct phonon eigenmodes
82+
self.ka_array[np.abs(self.ka_array) < 1e-5] = 0
83+
8184
self.idx = int(101*(target_k+2*np.pi)/(4*np.pi)) # idx corresponding to ka=0
8285
#self.idx = 50 # idx corresponding to ka=0
8386
self.optic = False

0 commit comments

Comments
 (0)