diff --git a/src/grogu_magn/magnetism.py b/src/grogu_magn/magnetism.py index 38a3e14..289cc55 100644 --- a/src/grogu_magn/magnetism.py +++ b/src/grogu_magn/magnetism.py @@ -70,7 +70,10 @@ def calculate_exchange_tensor(pair): D[2] = np.mean([energies[2, 1], -energies[2, 2]]) 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