Dear community, I would like to calculate the valley polarized conductance for a graphene nanoribbon with 2 leads (let’s say in the x-direction). My current approach is this: 1) Get the S-matrix for a certain energy 2) Find the indices of the modes with positive velocities 3) Separate these modes by positive and negative momenta 4) Get the sub matrix from the S-matrix 5) Sum the transmission coefficients for positive and negative momenta The code below illustrates these 5 steps: import progressbar def valleyPolarizability(syst, energies, lead_start=0, lead_end=1): KPs = [] Ks = [] bar = progressbar.ProgressBar() for energy in bar(energies): smatrix = kwant.smatrix(syst, energy, params={'phi': phi}) positives = np.where(smatrix.lead_info[lead_start].velocities >= 0)[0] momentas = smatrix.lead_info[lead_start].momenta[positives] K_prime_indices = np.where(momentas < 0)[0] K_indices = np.where(momentas >= 0)[0] submatrix = smatrix.submatrix(lead_end, lead_start) K_prime_T = np.absolute(np.sum(submatrix[:, K_prime_indices]))**2 K_T = np.absolute(np.sum(submatrix[:, K_indices]))**2 KPs.append(K_prime_T) Ks.append(K_T) return KPs, Ks Could someone please let me know if this is the correct approach? Will the K_prime_indices and K_indices have the correct indexing in the sub matrix? Thanks, Kevin Ryczko