Error When Setting fix_ang=False for Strained Moiré Superlattice Generation

3 views
Skip to first unread message

Sai

unread,
May 11, 2026, 9:41:07 PM (12 days ago) May 11
to Twister Help
Dear Developers,

  My aim is to create a strained moiré superlattice of bilayer CrBr₃. For a given twist angle and strain, I want to obtain the resulting moiré unit cell. However, when I set "fix_ang" to "False", I encounter the following error:  
  340 sl_comb=sl_comb[bol_str]
    341 b_nm_comb=b_nm_comb[bol_str]
--> 342 cos_angle=ij_dot_cos[bol_str]
    343 Area_avg=ar_sl[bol_str]
    344 SL=np.hstack((sl_comb[:,:2],sl_comb[:,2:]))

UnboundLocalError: cannot access local variable 'ij_dot_cos' where it is not associated with a value

  
Could you please tell me how to overcome this error. 

Additionally, is it possible to apply uniaxial strain? If yes, please tell me how to set this in the input.

I am attaching my input files for your reference.

Any kind of help is much appreciated. Thank you in advance!

Best regards,
Sai. 
basis_pos_crys_layer2
get_ang.inp
basis_pos_crys
Reply all
Reply to author
Forward
0 new messages