Skip to content

Fixed KeyError for MM ECPs in project_to_atomic_orbitals#3243

Open
ndolin wants to merge 3 commits into
pyscf:masterfrom
ndolin:MMECPFix
Open

Fixed KeyError for MM ECPs in project_to_atomic_orbitals#3243
ndolin wants to merge 3 commits into
pyscf:masterfrom
ndolin:MMECPFix

Conversation

@ndolin

@ndolin ndolin commented Jun 9, 2026

Copy link
Copy Markdown

When using ECPs with nelec=0 in QM/MM embedding applications, mf.analyze() and related functions would break with a KeyError. This fix skips over those ECPs, but should not affect regular ECPs with nelec != 0.

@jeanwsr

jeanwsr commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Can you add a test?

ndolin added 2 commits June 9, 2026 14:34
…roneous warnings from creating coreless ECPs (see pyscf#3172), but these can be safely ignored.
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.

2 participants