====== How to create GB ====== ===== Single element GB ===== Download structure of supercell with GB from [[http://crystalium.materialsvirtuallab.org/| Crystalium]] database. {{:tut:pasted:20240218-175000.png}} {{:tut:pasted:20240218-174850.png}} ===== Twin GB in C2/m Li2MnO3 ===== Take a [[https://wiki.storion.ru/home?do=media&image=tut%3Ali2mno3.zip&ns=tut|unit cell of Li2MnO3]]: {{:tut:pasted:20240218-175717.png?x200}} and use the following script: from siman.geo import create_supercell from siman.geo import two_cell_to_one from structures import * from siman.calc_manage import add_loop, res_loop, smart_structure_read from siman.header import db #create twin if 1: st = smart_structure_read(path_to_file/Li2MnO3.POSCAR) st = st.get_conventional_cell() mul_matrix = [[1,-1,0],[1,1,0],[1,0,3]] sc = create_supercell(st, mul_matrix, mul = (0.5,0.5,1)) if 1: sc.rprimd[0][2] = 0 sc.rprimd[1][2] = 0 sc.rprimd[2][1] = 0 sc.update_xcart() print(sc.rprimd) sc = sc.shift_atoms([0,0,0.5]) scm = sc.mirror(2) scm.name+='m' scm = scm.shift_atoms([0,0,1], return2cell=0) sc.rprimd[2] = sc.rprimd[2]*2 sct = two_cell_to_one(sc, scm) sct.update_xred() sct.name+='t' Constructed supercell: {{:tut:pasted:20240216-172942.png?x600}} The same GB with applied periodic translation: {{:tut:pasted:20240216-173414.png?x600}}