### GET K POINTS ### prim = np.array([[0, 0.5, 0.5], [0.5, 0, 0.5], [0.5, 0.5, 0] ]) * a #primitive lattice vectors specialk = np.array([ [0, 0, 0], #gamma [0.5, 0, 0.5], #X [0.375, 0.375, 0.75], #K [0, 0, 0], #gamma [0.5, 0.5, 0.5] ]) #L #special reciprocal lattice points klabel = np.array(('G', 'X', 'K', 'G', 'L')) kpoints, kdist = ty.makeKpoints(prim, specialk, dk) #get the k point vectors #from a funtion ## GET VELOCITIES AND CALCULATE SED ### with open(velsfile, 'r') as fid: nk = len(kpoints) #number of k points ids = np.zeros((num)) nc = max(uc) + 1 nb = len(masses) ids = np.argwhere(types == 1) #atoms in this basis pos cellvec = pos[ids[:, 0], :] #coords of fcc basis atom cellvec = cellvec[np.argsort(uc[ids][:, 0]), :] #sort by unit cell sed = np.zeros((tn, nk)).astype(complex) #spectral energy density #the data is read in in chunks and the chunks are mathed upon until
specialk = np.array([ [0, 0, 0], #G [0.5, 0, 0], #X [0.5, 0.5, 0], #S [0, 0.5, 0], #Y [0, 0, 0], #G [0, 0, 0.5], #Z [0.5, 0, 0.5], #U [0.5, 0.5, 0.5], #R [0, 0.5, 0.5], #T [0, 0, 0.5] ]) #Z #special reciprocal lattice points klabel = np.array(('G', 'X', 'S', 'Y', 'G', 'Z', 'U', 'R', 'T', 'Z')) kpoints, kdist = ty.makeKpoints(prim, specialk, dk) #get the input k space arrays #from a funtion ### GET VELOCITIES AND CALCULATE SED ### with open(velsfile, 'r') as fid: nk = len(kpoints) #number of k points ids = np.zeros((num)) nc = max(uc) + 1 nb = len(masses) ids = np.argwhere(types == 1) #atoms in this basis pos cellvec = pos[ids[:, 0], :] #coords of fcc basis atom cellvec = cellvec[np.argsort(uc[ids][:, 0]), :] #sort by unit cell sed = np.zeros((tn, nk)).astype(complex) #spectral energy density #the data is read in in chunks and the chunks are mathed upon until
diamond = a / 4.0 #tranlation vector to 2nd basis atom specialk = np.array([ [0, 0, 0], #gamma [0.5, 0, 0.5], #X [0.375, 0.375, 0.75], #K [0, 0, 0], #gamma [0.5, 0.5, 0.5] ]) #L #special reciprocal lattice points klabel = np.array(('G', 'X', 'K', 'G', 'L')) dk = 100 #k space mesh, number of points between speciak k points ### ### CALCULATE K-SPACE POINTS ### kpoints, kdist = ty.makeKpoints(prim, specialk, dk) del prim, a #### ### READ IN COORDINATES OF ATOMS ### num, types, masses, pos = ty.readData(posfile) #number of atoms, number of #atom types, mass of each type, and positions vector [:,(ID, TYPE, X, Y, Z)] masses = np.array([28.0855, 28.0855]) del posfile #### ### FIND NEAREST NEIGHBOR LIST FOR BASIS ATOMS ### nl, dl, nn = ty.findNN(pos) #### ### READ IN FORCE CONSTANT FROM LAMMPS ###