# -*- coding: utf-8 -*- """ Created on Sat Nov 30 21:19:47 2019 @author: hao """ import numpy as np import fun_generators as fg import GLSW h = np.array([0.0, 1.0, 3.0, 4.0, 4.74]) lenh = len(h) xs = range(lenh) q = np.array([0.0, 0.0, 0.0]) ham = GLSW.sw_hamiltonian(q) for flag in xs: field = h[flag] fname = 'gs_info/h=' + str(field) + 'T/opt_angles.txt' angles = np.load(fname) print('h= ', field, '\n') for flag1 in range(4): theta = angles[flag1 * 4 + 2] phi = angles[flag1 * 4 + 3] Sz = fg.fun_sz(theta, phi) Szsq = fg.fun_sz_sq(theta) print('sublattice: ', flag1, '\n') print('Sz = ', Sz, 'Sz**2= ', Szsq, '\n')
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 4 15:43:53 2019 @author: Hao """ import GLSW import numpy as np import cofig as cf qq = np.array([0.1, 0.2, 0.3]) hsw = GLSW.sw_hamiltonian(qq) omega = np.array([4.427]) #gf1 = -(omega + 1j*cf.broadening) * cf.A_mat + 2.0*hsw qx, qy, qz = cf.k12Tokxy(qq[0], qq[1], qq[2]) chi, sqw = GLSW.intensity(omega, qx, qy, qz) #print(chi) print(sqw) #eigval, eigvec = GLSW.eigensystem(qq) #resd = gf1 @ gf2[0, :, :] #print(resd - np.eye(16))
# ReJJI_mat[boson1, ctt] = np.real(JJI_bond10[boson1, boson2, boson3]) # ImJJI_mat[boson1, ctt] = np.imag(JJI_bond10[boson1, boson2, boson3]) # ctt += 1 # np.savetxt(fn1, ReJJI_mat) # np.savetxt(fn2, ImJJI_mat) #q = np.array([-0.45, -0.44, 0.0]) q1 = np.array([-0.89, -0.79, 0.0]) q2 = np.array([0.11, 0.26, 0.0]) q3 = q1 - q2 # q1 = np.array([0.0, 0.0, 0.0]) # q2 = np.array([0.0, 0.0, 0.0]) # q3 = q1-q2 hsw1 = GLSW.sw_hamiltonian(q1) hsw2 = GLSW.sw_hamiltonian(q2) hsw3 = GLSW.sw_hamiltonian(q3) # fname = 'tmp/hamq1.txt' # np.savetxt(fname, hsw1) # fname = 'tmp/hamq2.txt' # np.savetxt(fname, hsw2) # fname = 'tmp/hamq3.txt' # np.savetxt(fname, hsw3) # tmp, ubov1 = GLSW.eigensystem(q1) # fname = 'tmp/ubov_mq1.txt' # np.savetxt(fname, ubov1)