Closed Lazersmoke closed 8 months ago
I modified the PR slightly so that it has the following behavior:
sys = System(cryst, dims, [SpinInfo(1; S, g=1)], :dipole)
display(sys)
#=
System [Dipole mode]
Lattice (1×1×1)×1
Energy per site 0
=#
sys.dipoles[1,1,1,1] *= 2
display(sys)
#=
System [Dipole mode]
Lattice (1×1×1)×1
[Incorrectly normalized spin state!]
=#
Now that
energy(sys)
sometimes errors (e.g. if dipoles are not normalized), typing insys
at the REPL can clobber the terminal with a huge error message. This PR makes it so the error message is relatively tame