# Initialize the different twisted layers # - super_a1_mult, super_a2_mult: supercell vector a1',a2' based on a1,a2 # - layer_dis: the layer distance of this layer to next layer, default 2A. # - scs_x, scs_y: supercell shift in x,y direction in angstroms, default 0A. # - prim_poscar: POSCAR for primitive cell of current layer, default 'POSCAR'. m = 6 n = 7 #--> 1st layer # The 1st layer is also the base layer, which all of other layers will # try to add some strain to match the 1st layer's cell constants. super_a1_mult = [m, n] super_a2_mult = [-n, m+n] twist_demo.add_layer(super_a1_mult, super_a2_mult, layer_dis=3, prim_poscar="POSCAR") #--> 2nd layer super_a1_mult = [n, m] super_a2_mult = [-m, n+m] twist_demo.add_layer(super_a1_mult, super_a2_mult, prim_poscar="POSCAR") # #--> 3rd layer # super_a1_mult = [n, m] # super_a2_mult = [-m, n+m] # twist_demo.add_layer(super_a1_mult, super_a2_mult, prim_poscar="POSCAR-BN")
# Twisting the layers # - start_z: The lowest atom's fractional coordinates in z, default 0.1 # - super_a3_z: The length of the c vector in z direction, default 20A. twist_demo.twist_layers(start_z=0.1)
# Write results to the file twist_demo.write_res_to_poscar()
# (Optional) Calculate the twisted angles of each layer in degree twisted_angles = twist_demo.calc_layers_twist_angles() print(twisted_angles)
# PROGRAM END
#%% # +-------------------+ # | Special condition | # +-------------------+ from twist2d import *
# If you are twisting a bilayer graphene-like system, # you can write more simply like this:
# (Optional) Calculate the twisted angles of each layer in degree twisted_angles = tbg_demo.calc_layers_twist_angles() print(twisted_angles)
#PROGRAM END
Twister
印度科学研究所Manish Jain教授课题组开发了相应的Twister程序。
To construct a super lattice:
Select the angle you wish to use from the table.
Use the corresponding twist angle (in radians), (m,n) and (p,q) in the input file: twist.inp (see Graphene/ and MoS2/ examples)
Provide the basis atoms in crystal units in a file: basis_pos_crys (additionally provide another basis file for layer 2. See MoS2/Angle_63.48 for an example)
Run twister:python path_to_Twister_1.0/src/twister.py
Enter the maximum acceptable area of the resultant unit cell
Enter the maximum acceptable strain in the resultant unit cell
Hit submit
You can download the result POSCAR files using the Download POSCAR button. Keep in mind that POSCAR 1 will be the top part of the heterostructure and POSCAR 2 will be the bottom part of the heterostructure. The structures will be the same regardless unless either of the monolayers is asymmetric.