|
|
@ -70,7 +70,10 @@ def calculate_exchange_tensor(pair):
|
|
|
|
D[2] = np.mean([energies[2, 1], -energies[2, 2]])
|
|
|
|
D[2] = np.mean([energies[2, 1], -energies[2, 2]])
|
|
|
|
|
|
|
|
|
|
|
|
J_iso = np.trace(J) / 3
|
|
|
|
J_iso = np.trace(J) / 3
|
|
|
|
J_S = (J - J_iso * np.eye(3)).flatten()
|
|
|
|
# based on the grogu output pdf
|
|
|
|
|
|
|
|
# traceless symmetric exchange matrix:
|
|
|
|
|
|
|
|
# Jxx, Jyy, Jxy, Jxz, Jyz
|
|
|
|
|
|
|
|
J_S = np.array([J[0, 0] - J_iso, J[1, 1] - J_iso, J[0, 1], J[0, 2], J[1, 2]])
|
|
|
|
|
|
|
|
|
|
|
|
return J_iso, J_S, D, J
|
|
|
|
return J_iso, J_S, D, J
|
|
|
|
|
|
|
|
|
|
|
|