wannier_tools icon indicating copy to clipboard operation
wannier_tools copied to clipboard

No "rho (resistivity tensor)" files are generated during OHE calculation

Open Simba2805 opened this issue 2 years ago • 12 comments

Dear developers and Users,

I am trying to calculate MR using WANNIERTOOLS. I am only getting sigma_band* files but not the rho_band* files.

  1. How do I get those files? Is there any specific tag in wt.in which will produce those files?
  2. Is there any way I can get the resistivity tensor (rho) with different temperature using sigma* files? Can I directly inverse the values in the xx, xy, etc. columns and get rho.
  3. When I set Btheta = 90 and Bphi= "any angle", I am getting constant conductivities with different magnetic field. Is there any physical reason behind this? Here, Btheta is the angle around the z-axis, right? So, if Btheta=90, the magnetic field is applied in the x-y plane.
  4. Is this numerical approach used in WT valid for 2D materials/monolayers/bilayers, slab calculations etc. or only 3D Bulk materials? I see that in the paper Shengnan Zhang, Quansheng Wu, Yi Liu, Oleg V. Yazyev PhysRevB.99.035142, (2019) all three materials are bulk materials. So, can I use Wannier-Tools to calculate Magnetoresistance for 2D layers/slabs?

Thank you,

Simba2805 avatar Dec 15 '22 13:12 Simba2805

Dear Simba2805,

Hi.

As far as I know, the generation of 'rho_X' and 'rho_total' is implemented recently, so older version (e.g. 2.5.X) does not generate these files. Newer version such as 2.6.2 can generate rho files automatically, but I just concern that the OHE results obtained by 2.6.2 and 2.5.1 look different from each other (please check it with your input if you have time).

In my case, I made a simple python script to sum over the conductivity tensors and then calculate inverse matrix (i.e. resistivity tensor).

I hope these information will help you to solve 1. and 2.

Best, AKB-OU

AKB-OU avatar Dec 17 '22 09:12 AKB-OU

Dear AKB-OU,

Thank you so much for your kind response. I am using WT version 2.5.1. Now I understood why it is not generating "rho" files.

I tried example Cu for producing resistivity tensors with different angles. I think I am using wrong formula for resistivity tensor. I also wrote a simple python script and plotted resistivity tensor with different magnetic fields using formula rho_xx = sigma_xx / (sigma_xx^2 + sigma_xy^2) but it does not give me correct plots.

Could you please tell me the correct formula for converting sigma into rho?

A single sigma file (for a single band, single temperature and single chemical potential) gives different direction conductivities. What is the correct formula for calculating rho with that particular band/temperature/chemical potential? Because simply inverting the values in a column of sigma file does not give resistivity.

The following is the python code which I used for calculating rho:

data0 = np.genfromtxt(fname='Btheta0/sigma_band_6_mu_0.00eV_T_30.00K.dat') data18 = np.genfromtxt(fname='Btheta18/sigma_band_6_mu_0.00eV_T_30.00K.dat') data45 = np.genfromtxt(fname='Btheta45/sigma_band_6_mu_0.00eV_T_30.00K.dat')

plt.plot(data0[:,0],(data0[:,2]/(data0[:,2]**2+data0[:,3]**2)),'r') plt.plot(data45[:,0],(data45[:,2]/(data45[:,2]**2+data45[:,3]**2)),'b') plt.plot(data18[:,0],(data18[:,2]/(data18[:,2]**2+data18[:,3]**2)),'y') plt.ylabel('resistivity.tau') plt.xlabel('B.tau') plt.show() where, I used above mentioned formula.

Thank you in advance.

Shubham

Simba2805 avatar Dec 17 '22 10:12 Simba2805

Dear Shubham,

From the sigma file, we can construct the conductivity tensor (3 times 3 matrix) sigma =({ {xx, xy, xz}, {yx, yy, yz}, {zx, zy, zz} }) for each Btau value.

So the resistivity tensor is numpy.linalg.inv(sigma) in the case of python. Expression of rho_xx must be (-yz zy + yy zz)/(-xz yy zx + xy yz zx + xz yx zy - xx yz zy - xy yx zz + xx yy zz).

Best, AKB

AKB-OU avatar Dec 18 '22 05:12 AKB-OU

Thank You AKB, I got the correct plot for resistivities with your help.

I look forward for the answers of 3rd and 4th points, if developers can make some comments.

Simba2805 avatar Dec 19 '22 08:12 Simba2805

Dear AKB,

I have one more naive question for you. What if there are more than one bands. Do I need to calculate rho for each band separately? Or In the manual it is said that for more than one bands we have to do some summation over bands? Does it mean that I should add the rho_xx for a particular magnetic field for each bands?

Mathematically:

rho_xx_total = rho_xx_band1 + rho_xx_band2 + ...

Is that so or each band has its separate resistivity?

Thank you

Simba2805 avatar Dec 19 '22 09:12 Simba2805

Dear Shubham,

In my understanding, the summation over the band index n should be made on "conductivity" (please refer Notes in https://www.wanniertools.org/examples/ordinary-magnetoresistance-of-cu/) . The summation of "resistivity" means that Fermi surfaces are connected "in series". But it is not true: multi-band system is "parallel conduction" of multiple Fermi surfaces.

If there is n bands at the Fermi level, WT writes out sigma^(n) for each band. To obtain the total resistivity tensor of the system, we should first construct the total conductivity tensor sigma_total = sigma^(1)+sigma^(2)+ ... sigma^(n). Then, we can obtain rho_total as rho_total = numpy.linalg.inv(sigma_total). rho_xx_total is the [1, 1] component of rho_total.

I hope this would help you.

Best, AKB

AKB-OU avatar Dec 19 '22 13:12 AKB-OU

Dear AKB, Thank you for the clarification. I was confused about the line written in the Notes section below the link you provided. There is written that we should sum up all the sigma files belong to the "same" band ... The phrase "same band" is confusing. So if I understood you correctly, I should sum up all the sigma files belong to "All" bands, same temperature, and the same chemical potential, then inverse the matrix to get the resistivity tensor. So basically there is just a matrix addition and then inversion. Am I correct?

Regards, Shubham

Simba2805 avatar Dec 19 '22 16:12 Simba2805

Dear Shubham,

I think you are correct. I agree with your opinion that the statement of the Note is somewhat misleading. This page says that you should "add up all the conductivity tensor for all the bands, then take an inverse of it to get the resistivity tensor"

Best, AKB

AKB-OU avatar Dec 20 '22 01:12 AKB-OU

Thank You Dear AKB. Nice talking to you.

Simba2805 avatar Dec 20 '22 06:12 Simba2805

The reason that we didn't provide the resistivities is that you can tune the relaxation time for each band.

\sigma=\sum_n{\sigma_n/tau_n *tau_n}

where \sigma_n/\tau_n is the output in the sigma files. The last \tau_n is the relaxation time that you can tune for each band.

quanshengwu avatar Apr 08 '23 06:04 quanshengwu

Dear Prof. Wu,

I understand your intention. Thank you very much for your useful comment.

AKB

AKB-OU avatar Apr 08 '23 07:04 AKB-OU

Dear Prof. Wu,

Following-up on this discussion, how do we choose the appropriate Btau for \sigma_n/tau_n? The implementation lumps B and tau into Btau during the integration of the velocities. When we multiply the results with tau_n by providing a another value instead of 1ps, does that imply the actual field magnitude is different because B = Btau/tau_n?

The reason that we didn't provide the resistivities is that you can tune the relaxation time for each band.

\sigma=\sum_n{\sigma_n/tau_n *tau_n}

where \sigma_n/\tau_n is the output in the sigma files. The last \tau_n is the relaxation time that you can tune for each band.

Dongsheng-Wen avatar Jun 11 '24 12:06 Dongsheng-Wen