def get_uniformity_kpoint(n):
kPoints = []
for i in range(n):
for j in range(n):
kPoints.append(i/n * rec[0] + j/n * rec[1])
np.save("kPoints.npy", np.array(kPoints))
return kPoints
Take points evenly along the inverted parallelogram. Carry out the previous calculation.
The whole Brillouin zone is restored by translation.
import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.axes3d import Axes3D
from matplotlib.ticker import LinearLocator, FormatStrFormatter
basis_vector = [[1.37287871,1.37287871,-2.74575742],[-2.74575742,1.37287871,1.37287871],[13.36629497,13.36629497,13.36629497]]
V = np.dot(basis_vector[0], np.cross(basis_vector[1], basis_vector[2]) )
rec = [np.cross(basis_vector[1], basis_vector[2]) * 2 * np.pi/V,
np.cross(basis_vector[2], basis_vector[0]) * 2 * np.pi/V,
np.cross(basis_vector[0], basis_vector[1]) * 2 * np.pi/V]
print(rec)
nk = 200
Ek = np.load("Ek_mesh.npy")[:, 0]
Ek = Ek.reshape(nk, nk)
print(Ek.shape)
kPoints = np.load("kPoints.npy")
print(kPoints.shape)
kx = kPoints[:,0]
ky = kPoints[:,1]
print(kx.shape)
kx = kx.reshape(nk, nk)
ky = ky.reshape(nk, nk)
plt.contour(kx, ky, Ek, [0.0])
plt.contour(kx + rec[0][0] -rec[1][0] , ky + rec[0][1] -rec[1][1] , Ek, [0.0])
plt.contour(kx - rec[0][0], ky - rec[0][1] , Ek, [0.0])
plt.contour(kx - rec[1][0], ky - rec[1][1] , Ek, [0.0])
plt.contour(kx +rec[0][0], ky + rec[0][1] , Ek, [0.0])
plt.show()
Read More:
- Using shapely.geometry.polygon to calculate the IOU of any two quadrilaterals
- Use jstack to output the stack information in Java process to the specified file and analyze it
- Methods to avoid fail to allocate bitmap errors in pyplot
- Java – read all the files and folders in a certain directory and three methods to get the file name from the file path
- The problem that the normal of the model is no longer perpendicular to the surface after unequal scaling
- Flume monitors a single append file in real time
- How to read JS file app.ux Global variables in
- Springboot error, unable to read configuration file: could not resolve placeholder ‘xxx’ in value “${XXX}
- After editing a file with the VIM command in xshell, the ESC key cannot be output,,,
- Error reading file cow.osg: read error (Could not find plugin to read objects from file “cow.osg“.)
- [unable to read project file xxxxx, XXX failed to load project file, name cannot start with “<" character (hex value 0x3c)] exception handling method
- Busybox encountered input/output error while mounting NFS to TMP file system
- Error in header file when calling OpenGL to open obj file in vs2013: unable to open include file: “GL / glut. H”: no such file or directories
- Pytorch RuntimeError: Error(s) in loading state_ dict for Dat aParallel:.. function submit.py Solutions for reporting errors
- Python failed to read TIF file exported by envi.
- Read multiple sheets of an excel file according to npoi
- Error lnk1120: 2 unresolved external commands: vtkrenderingopengl_ Autoinit (construct, destroy), which is referenced in
- How to print how to output Int64_ t,uint64_ The value of T in C
- Cannot read configuration file due to insufficient permissions