From 3ab9a4f3024989da5735042536d90c635097d2a1 Mon Sep 17 00:00:00 2001 From: Kipton Barros Date: Tue, 12 Nov 2024 12:17:46 -0700 Subject: [PATCH] Fix error message when g is symmetry disallowed --- Project.toml | 2 +- docs/src/versions.md | 5 +++++ src/System/Moment.jl | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 4762720f8..8efb7742b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Sunny" uuid = "2b4a2ac8-8f8b-43e8-abf4-3cb0c45e8736" authors = ["The Sunny team"] -version = "0.7.3" +version = "0.7.4" [deps] CrystalInfoFramework = "6007d9b0-c6b2-11e8-0510-1d10e825f3f1" diff --git a/docs/src/versions.md b/docs/src/versions.md index 8f891da1b..d484b8587 100644 --- a/docs/src/versions.md +++ b/docs/src/versions.md @@ -1,5 +1,10 @@ # Version History +## v0.7.4 +(In development) + +* Better error message when a $g$-tensor is symmetry disallowed. + ## v0.7.3 (Nov 12, 2024) diff --git a/src/System/Moment.jl b/src/System/Moment.jl index bd8ec7711..e92675fb8 100644 --- a/src/System/Moment.jl +++ b/src/System/Moment.jl @@ -31,7 +31,7 @@ function propagate_moments(cryst::Crystal, moments::Vector{Pair{Int, Moment}}) for (i, m) in moments 1 <= i <= natoms(cryst) || error("Atom $i outside the valid range 1:$(natoms(cryst))") if !is_coupling_valid(cryst, Bond(i, i, [0,0,0]), m.g) - error("g-tensor $(m.g) is inconsistent with the site symmetry of atom $(m.atom).") + error("g-tensor on site $i is symmetry inconsistent; see `print_site(cryst, $i)` for more information.") end end