Skip to content

Fix UHF NMR#13

Open
jeanwsr wants to merge 7 commits intopyscf:masterfrom
jeanwsr:fix-nmr-uhf
Open

Fix UHF NMR#13
jeanwsr wants to merge 7 commits intopyscf:masterfrom
jeanwsr:fix-nmr-uhf

Conversation

@jeanwsr
Copy link
Copy Markdown

@jeanwsr jeanwsr commented Mar 26, 2026

In #11 we found that the hstack in uhf nmr get_vind is incorrect for na != nb. I'm not very sure about what's the correct concatenation. After looking at pyscf's ucphf

https://github.com/pyscf/pyscf/blob/e8642fb7220248bd750c34ef6adf88a9744977ee/pyscf/scf/ucphf.py#L131

I think it's like reshape-last-two-dim-then-hstack. And this fix is verified by 1) pass the na=nb test 2) comparison with Gaussian, although getting not very exact match.

@jeanwsr
Copy link
Copy Markdown
Author

jeanwsr commented Mar 26, 2026

The NMR tests fail a lot with around 5 place errors, both in CI (like this) and my local machine, which should be unrelated with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant