In [1]:
import numpy
from siman.geo import ortho_vec, create_supercell
from siman.calc_manage import smart_structure_read
%matplotlib inline
In [4]:
st = smart_structure_read(input_geo_file = 'ti_hcp.POSCAR') # read hcp lattice
print('Initial vectors:\n', numpy.array(st.rprimd) )
mul_matrix = ortho_vec(st.rprimd, [10,10,10]) # matrix which allows to obtain supercell close to 10x10x10 A cube
print('\nMultiplication matrix:\n', mul_matrix, '\n')
sc = create_supercell(st, mul_matrix)
sc.write_xyz(filename = 'ti_supercell') #save to xyz/ti_supercell.xyz
In [3]:
st = smart_structure_read(input_geo_file = 'Bi2Se3_mp-541837_computed.POSCAR')
mul_matrix = ortho_vec(st.rprimd, [100, 98, 100]) # matrix which allows to obtain supercell close to 100x98x100 A cube
print('Initial vectors:\n', numpy.array(st.rprimd) )
print('\nMultiplication matrix:\n', mul_matrix, '\n')
sc = create_supercell(st, mul_matrix, mp = 15) # larger *mp* values allow to find all atoms in supercell
sc.write_xyz(filename = 'Bi2Se3_supercell')
In [2]:
from calc_manage import get_structure_from_matproj
st = get_structure_from_matproj(mat_proj_id = 'mp-7000') #get SiO2 structure
In [3]:
print('Initial vectors:\n', numpy.array(st.rprimd) )
mul_matrix = ortho_vec(st.rprimd, [54, 54, 54])
print('\nMultiplication matrix:\n', mul_matrix, '\n')
sc = create_supercell(st, mul_matrix, mp = 8)
sc.write_xyz(filename = 'alpha_quartz')
print('Z of elements are: ',st.znucl, '; use the same order for *charges* list') #show atom types
sc.write_lammps(filename = 'alpha_quartz', charges = [-1.46, 2.92] ) #write structure for lammps