3c_launch_serial.py — Serial Conductivity Launcher¶
Iterates over all irreducible q-points and mode batches and calls
3a_tensor_conductivity_save.py for each combination via
os.system. This is the entry point for the full conductivity tensor
computation.
The gamma_min_plateau_cmm1 threshold (default 8 cm⁻¹) should be
determined from the convergence study (steps 2a-2c).
Run after 1a_calc_vel_ops.py.
cd tutorials/diffusivity
python 3c_launch_serial.py
1import numpy as np
2import os
3from ase.io import read
4
5gamma_min_plateau_cmm1 = 8.0
6
7grid = [5, 5, 5]
8num_q = int((grid[0] * grid[1] * grid[2] + 1) / 2)
9
10cell = read('POSCAR')
11n_atoms_structure = len(cell.get_positions())
12num_modes = n_atoms_structure * 3
13amount_of_modes = 1000
14num_starts = np.arange(0, num_modes + amount_of_modes, amount_of_modes)
15num_starts[-1] = num_modes # to make sure we don't go over the array
16
17for iq in range(0, num_q):
18 for idx in range(len(num_starts) - 1):
19 num_start = num_starts[idx]
20 num_stop = num_starts[idx + 1]
21
22 cmd = f"python 3a_tensor_conductivity_save.py {iq} {num_start} {num_stop} {gamma_min_plateau_cmm1}"
23 print(cmd)
24 os.system(cmd)