[Kwant] About MoS2 ribbon

2018-08-10 Thread cqhy1127

Dear Professors,

When I use kwant to calculate the conductance for MoS2 ribbon, zigzag edge is 
right, however, for armchair edge ribbon, errors occure as follows,

LinAlgError: QZ iteration failed to converge in zgges.

I am very comfused about this. Thanks!

Q.Chen 
HNIE

Re: [Kwant] (no subject)

2018-08-10 Thread Abbout Adel
Dear Kumar,

To do so you need to put a potential in all the leads (you can fix one of
them  to zero) and then use the Conductance matrix.

You will search for V1, V2, (V3=0) such that I1=-I2 and I3=0

(I1,-I1,0)^T  = G   (V1,V2,0)^T

T is the transpose, G is the Conductance matrix

G is singular so to solve this equation, you invert a submatrix of G



def get_Voltage(energy, params, I1=1):

SM=kwant.smatrix(sysf,energy=energy,params=params))
G=SM.conductance_matrix()
M=linalg.inv(G[0:2,0:2])
V=M@array([I1,-I1]).T
 return V


I hope this helps.
Adel

On Fri, Aug 10, 2018 at 9:31 AM, Rohit Kumar Srivastav <
rohit.srivas...@snu.edu.in> wrote:

> I want to apply a voltage on the stadium with three leads in such a way
> two leads constitute the same current and one lead constitute zero current
> (Its means voltage is zero in this lead always) for calculating the
> scattering matrix.
> Please, suggest me what is the code of voltage. (How to apply the voltage)
> Best,
> Rohit
>



-- 
Abbout Adel


Re: [Kwant] regarding error message

2018-08-10 Thread shyam lochan bora
thank you so much for your help

On Thu, Aug 9, 2018 at 3:47 PM, Joseph Weston 
wrote:

> Dear Shyam,
>
> >
> > File "C:\Users\Shyam Lochan Bora\Desktop\new 1.py", line 5, in 
> > from wraparound import wraparound
> > ModuleNotFoundError: No module named 'wraparound'
> >
> > Help me in this regard
>
> 'wraparound' is now included with Kwant, as of version 1.3.
> You can change the line:
>
> from wraparound import wraparound
>
> to
>
> from kwant.wraparound import wraparound
>
> to get wraparound working.
>
> Happy Kwanting,
>
> Joe
>