Dear Qiao,


You defined two vectors for your lattice but your points have 3 coordinates ! (More over, for the last atom, you put only 2)
Add a vector for the third direction and correct your coordinates.

I hope this helps.
Adel


On Fri, Dec 15, 2017 at 12:03 PM, cqhy1127 <cqhy1127@aliyun.com> wrote:

Dear Professors,

I want to build a phosphorene lattice and I used the following code 

  _________________________________________________________
    ax = 0.443
    ay = 0.327
    alpha = 98.15*(np.pi/180)
    beta = 103.69*(np.pi/180)
    theta = np.arccos(-np.cos(beta)/np.cos(alpha/2))
    s = 0.5*ax-a*np.cos(alpha/2)
    h = b*np.sin(theta)
    
   # (ax,0) and (0, ay) are primitive vectors of the phosphorene vectors
   # (-s/2,-ay/2,h),(s/2,-ay/2,0.0),(ax/2-s/2,0,0.0),(ax/2+s/2,h) are corrdinates of four basis atoms.
    lat=kwant.lattice.general([(ax,0),(0,ay)],
                              [(-s/2,-ay/2,h),(s/2,-ay/2,0.0),(ax/2-s/2,0,0.0),(ax/2+s/2,h)]
                             )
    a,b,c,d=lat.sublattices
___________________________________________________________________________
It report an error like this 

  File "D:\Users\gongcheng5\Anaconda3\lib\site-packages\kwant\lattice.py", line 95, in __init__
    basis = ta.array(basis, float)

  ValueError: Input has irregular shape.

Would you like to help me to find the bug? Thank you!

Regards,

Qiao Chen 


University of Antwerp 
Condensed Matter Theory 
Department of Physics 



--
Abbout Adel