Loading Fermi_kpoints.py +12 −9 Changes for Fermi_kpoints.py: 12 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ print ("### Author: Yongjin Shin\n") #Case of different arguments are given. if len(sys.argv) == 1: kx=9 ky=9 kz=9 kx=6 ky=12 kz=4 print("No input argument is given. KX,KY,KZ=9") elif len(sys.argv) == 2: kx=int(sys.argv[1]) Loading @@ -40,15 +40,18 @@ elif len(sys.argv) == 4: print("Three input argument is given. KX={0}, KY={1}, KZ={2} ".format(kx,ky,kz)) data_array=np.ones(shape=(kx*ky*kz,4)); for i in range(kx): for j in range(ky): for k in range(kz): data_array[i*ky*kz+j*kz+k,:-1]=[i/kx, j/ky, k/kz] # Reciprocal points are described as (kx+1) style as Xcrysden does not accept periodic # boundary conditions data_array=np.ones(shape=((kx+1)*(ky+1)*(kz+1),4)); for i in range(kx+1): for j in range(ky+1): for k in range(kz+1): data_array[i*(ky+1)*(kz+1)+j*(kz+1)+k,:-1]=[i/kx, j/ky, k/kz] out_file=open('KPOINTS','w') out_file.write("k-points for fermi-surface. RP-phase {0}x{1}x{2}\n".format(kx,ky,kz)) out_file.write("{0}\n".format(kx*ky*kz)) out_file.write("{0}\n".format((kx+1)*(ky+1)*(kz+1))) out_file.write("Reciprocal\n") for i in range(np.shape(data_array)[0]): out_file.write("{0:.4f} {1:.4f} {2:.4f} {3:.0f}\n".format(data_array[i,0],data_array[i,1],data_array[i,2],data_array[i,3])) Loading Fermi_surface.py +2 −2 Changes for Fermi_surface.py: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ Output: This script extract spatial eigen values from EIGENVAL files for drawing fermi-surface. Mind that the calculation should be done with pecular k-point mesh, which is without ISYM-tag. Output file is the body for bxcf file, which is used for Xcrysden file. Spin down elements are listed after up elements. Spin down elements are listed after up elements.0 In case of less than three argument is given, priority coms to input file. For example, Loading Loading @@ -167,7 +167,7 @@ for i,line in enumerate(lines[7::]): #starts from 8th line elif len(re.findall("[-a-zA-Z0-9.\+]+",line)) > 0: temp=re.findall('[-a-zA-Z0-9.\+]+',line) band_num=int(temp[0]) ei_val_string=temp[1::] ei_val_string=temp[1:1+ispin:] ei_val=[float(k) for k in ei_val_string] #Eigenvlue of current Kpoint eigenvalues[kp_counter-1,band_num-1,:]=ei_val Loading Loading
Fermi_kpoints.py +12 −9 Changes for Fermi_kpoints.py: 12 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -19,9 +19,9 @@ print ("### Author: Yongjin Shin\n") #Case of different arguments are given. if len(sys.argv) == 1: kx=9 ky=9 kz=9 kx=6 ky=12 kz=4 print("No input argument is given. KX,KY,KZ=9") elif len(sys.argv) == 2: kx=int(sys.argv[1]) Loading @@ -40,15 +40,18 @@ elif len(sys.argv) == 4: print("Three input argument is given. KX={0}, KY={1}, KZ={2} ".format(kx,ky,kz)) data_array=np.ones(shape=(kx*ky*kz,4)); for i in range(kx): for j in range(ky): for k in range(kz): data_array[i*ky*kz+j*kz+k,:-1]=[i/kx, j/ky, k/kz] # Reciprocal points are described as (kx+1) style as Xcrysden does not accept periodic # boundary conditions data_array=np.ones(shape=((kx+1)*(ky+1)*(kz+1),4)); for i in range(kx+1): for j in range(ky+1): for k in range(kz+1): data_array[i*(ky+1)*(kz+1)+j*(kz+1)+k,:-1]=[i/kx, j/ky, k/kz] out_file=open('KPOINTS','w') out_file.write("k-points for fermi-surface. RP-phase {0}x{1}x{2}\n".format(kx,ky,kz)) out_file.write("{0}\n".format(kx*ky*kz)) out_file.write("{0}\n".format((kx+1)*(ky+1)*(kz+1))) out_file.write("Reciprocal\n") for i in range(np.shape(data_array)[0]): out_file.write("{0:.4f} {1:.4f} {2:.4f} {3:.0f}\n".format(data_array[i,0],data_array[i,1],data_array[i,2],data_array[i,3])) Loading
Fermi_surface.py +2 −2 Changes for Fermi_surface.py: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ Output: This script extract spatial eigen values from EIGENVAL files for drawing fermi-surface. Mind that the calculation should be done with pecular k-point mesh, which is without ISYM-tag. Output file is the body for bxcf file, which is used for Xcrysden file. Spin down elements are listed after up elements. Spin down elements are listed after up elements.0 In case of less than three argument is given, priority coms to input file. For example, Loading Loading @@ -167,7 +167,7 @@ for i,line in enumerate(lines[7::]): #starts from 8th line elif len(re.findall("[-a-zA-Z0-9.\+]+",line)) > 0: temp=re.findall('[-a-zA-Z0-9.\+]+',line) band_num=int(temp[0]) ei_val_string=temp[1::] ei_val_string=temp[1:1+ispin:] ei_val=[float(k) for k in ei_val_string] #Eigenvlue of current Kpoint eigenvalues[kp_counter-1,band_num-1,:]=ei_val Loading