
Dear Sir, I was trying to plot 2D LDOS map for a 3D system. I am using kwant.plotter.map and kwant.plotter.plot for plotting density and LDOS. But there is an error message showing " Only 2D system can be plotted in this way". The following part is included where I am getting this error. Thanks in advance. def density(sys, energy, lead_nr, params=params): wf = kwant.wave_function(sys, energy, params=params) return (abs(wf(lead_nr))**2).sum(axis=0) d = density(sys,0.5, 0, params=params) print (d) kwant.plotter.map(sys, d, cmap='gist_heat_r', colorbar=True)#, site_lw=0) ldos = kwant.ldos(sys, energy=0.5, params=params) print (ldos) kwant.plotter.plot(sys, ldos, num_lead_cells=2) Regards, priyanka

Dear Priyanka, What you can do, is to create a new system (sys2) with the same parameters but with only one layer (the layer you are interested in. (eliminate the z component)). The calculation of LDOS will be done on the original system (sys1) and then you will need to keep only the results corresponding to the layer you are interested in. The plot becomes straightforward. Example with n layers: ldos=np.LDOS.reshape(n,-1) #plot of the density on the layer p kwant.plotter.plot(sys2, ldos[p-1]) I hope this helps. Adel On Fri, May 25, 2018 at 3:12 PM, PRIYANKA <sinhapriyanka2016@iitg.ac.in> wrote:
Dear Sir,
I was trying to plot 2D LDOS map for a 3D system. I am using kwant.plotter.map and kwant.plotter.plot for plotting density and LDOS. But there is an error message showing " Only 2D system can be plotted in this way". The following part is included where I am getting this error. Thanks in advance.
def density(sys, energy, lead_nr, params=params): wf = kwant.wave_function(sys, energy, params=params) return (abs(wf(lead_nr))**2).sum(axis=0)
d = density(sys,0.5, 0, params=params) print (d) kwant.plotter.map(sys, d, cmap='gist_heat_r', colorbar=True)#, site_lw=0)
ldos = kwant.ldos(sys, energy=0.5, params=params) print (ldos) kwant.plotter.plot(sys, ldos, num_lead_cells=2)
Regards, priyanka
-- Abbout Adel
participants (2)
-
Abbout Adel
-
PRIYANKA