From 09ab9840187c138fa3cd9555a45192e3dcedad4b Mon Sep 17 00:00:00 2001 From: Nick Papior Date: Fri, 29 Nov 2024 10:47:08 +0100 Subject: [PATCH] Added warning when using nambu spin + changelog Signed-off-by: Nick Papior --- CHANGELOG.md | 2 ++ src/sisl/physics/spin.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 868d719b5..89b6eb443 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ we hit release version 1.0.0. import sisl sisl.geom.graphene +- added Nambu spin configuration, this is still experimental + ### Fixed - `projection` arguments of several functions has been streamlined diff --git a/src/sisl/physics/spin.py b/src/sisl/physics/spin.py index 338fe15d2..c77a241f8 100644 --- a/src/sisl/physics/spin.py +++ b/src/sisl/physics/spin.py @@ -8,6 +8,7 @@ import numpy as np from sisl._internal import set_module +from sisl.messages import warn __all__ = ["Spin"] @@ -100,6 +101,11 @@ def __init__(self, kind: Union[str, int] = "unpolarized"): f"{self.__class__.__name__} initialization went wrong because of wrong " "kind specification. Could not determine the kind of spin!" ) + if kind == Spin.NAMBU: + warn( + "Using untested Nambu spin-configuration, please be aware " + "that this is largely untested code!" + ) # Now assert the checks self._kind = kind