liquid.m/expmint.m error: matrix must be Hermitian

Topics related to Spinach package
Post Reply
emichi
Posts: 1
Joined: Sun Oct 03, 2021 4:02 pm

liquid.m/expmint.m error: matrix must be Hermitian

Post by emichi »

Hello and thank you for the great software.

I am testing out some isotropic singlet yield calculations and am encountering the following error when I have nitrogen nuclei in the spin system:
Error using expmint>grumble (line 86)
A matrix must be Hermitian.

Specifically, I changed the protons in the singlet_yield_5.m example to nitrogens, and the error occurred. I only modified the sys.isotopes={'E','E','1H','1H'}; line to sys.isotopes={'E','E','14N','14N'};, is there some other line of code that I should have modified as well? Apologies if this turns out to be a stupid question.

Full error message:

Error using expmint>grumble (line 86)
A matrix must be Hermitian.

Error in expmint (line 32)
grumble(A,B,C,T);

Error in rydmr_exp (line 93)
parfor nm=1:(N*M)

Error in liquid (line 136)
answer=pulse_sequence(spin_system,parameters,H,R,K);

Error in singlet_yield_5 (line 42)
M=liquid(spin_system,@rydmr_exp,parameters,'labframe');
kuprov
Posts: 123
Joined: Mon Mar 29, 2021 4:26 pm

Re: liquid.m/expmint.m error: matrix must be Hermitian

Post by kuprov »

Well spotted! The Hamiltonian was not tidied up in rydmr_exp(), it had tiny non-hermitian components. Fixed in the enclosed, please replace the corresponding file.
Attachments
rydmr_exp.zip
(2.07 KiB) Downloaded 226 times
Post Reply