From 13337e369fcb14ca20b88d37a0095263f4d46842 Mon Sep 17 00:00:00 2001 From: hexu Date: Sun, 26 May 2024 17:14:31 +0200 Subject: [PATCH] fix magnetic moment y=0 bug introduced in 0.9.0 --- TB2J/__init__.py | 2 +- TB2J/exchange.py | 2 +- setup.py | 2 +- upload_to_pip.sh | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TB2J/__init__.py b/TB2J/__init__.py index 3e2f46a..085e838 100644 --- a/TB2J/__init__.py +++ b/TB2J/__init__.py @@ -1 +1 @@ -__version__ = "0.9.0" +__version__ = "0.9.0.1" diff --git a/TB2J/exchange.py b/TB2J/exchange.py index 55ed7c4..fb60962 100644 --- a/TB2J/exchange.py +++ b/TB2J/exchange.py @@ -345,7 +345,7 @@ def set_tbmodels(self, tbmodels): self.norb = self.G.norb self.nbasis = self.G.nbasis # self.rho = np.zeros((self.nbasis, self.nbasis), dtype=complex) - self.rho = self.G.get_density_matrix().real + self.rho = self.G.get_density_matrix() self.A_ijR_list = defaultdict(lambda: []) self.A_ijR = defaultdict(lambda: np.zeros((4, 4), dtype=complex)) self.A_ijR_orb = dict() diff --git a/setup.py b/setup.py index 7db2214..e50cf53 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from setuptools import setup, find_packages -__version__ = "0.9.0" +__version__ = "0.9.0.1" long_description = """TB2J is a Python package aimed to compute automatically the magnetic interactions (superexchange and Dzyaloshinskii-Moriya) between atoms of magnetic crystals from DFT Hamiltonian based on Wannier functions or Linear combination of atomic orbitals. It uses the Green's function method and take the local rigid spin rotation as a perturbation. The package can take the output from Wannier90, which is interfaced with many density functional theory codes or from codes based on localised orbitals. A minimal user input is needed, which allows for an easily integration into a high-throughput workflows. """ diff --git a/upload_to_pip.sh b/upload_to_pip.sh index e8422e3..6b1f1d5 100755 --- a/upload_to_pip.sh +++ b/upload_to_pip.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash rm ./dist/* -python3 setup.py sdist bdist_wheel -python3 -m twine upload --repository pypi dist/* --verbose +python3.11 setup.py sdist bdist_wheel +python3.11 -m twine upload --repository pypi dist/* --verbose