From d1b235b636731bee8bfc6877f9f389c7921a15a1 Mon Sep 17 00:00:00 2001 From: Daniel Pozsar Date: Fri, 8 Nov 2024 14:29:23 +0100 Subject: [PATCH] changed symetric anysotropic --- src/grogu_magn/magnetism.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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