Skip to content

Simpler localized system object#184

Merged
MIWdlB merged 7 commits intomasterfrom
simpler-localized-system
Oct 7, 2025
Merged

Simpler localized system object#184
MIWdlB merged 7 commits intomasterfrom
simpler-localized-system

Conversation

@MIWdlB
Copy link
Collaborator

@MIWdlB MIWdlB commented Sep 18, 2025

In preparation for handling Restricted open, this PR includes some simplifications to the LocalizedSystem dataclass.

The idea is that in future we will want to handle spin localizations of different numbers of electrons in each spin, without having to explicitly check for this downstream.

This should make it easier to handle the change in array dimension between MO coefficient matrix and occupancies for, ROKS, RKS, UKS respectively.

property\method RKS ROKS UKS
Occupancy (n) (2,n) (2,n)
MO Coeff (M,M) (M,M) (2,M,M)

This gets extra complicated when we allow any combination of R,RO,U as each of input and output, with variable number of electrons.

To reduce the variability in the objects that are being stored and tracked,

  • occupancy arrays are now boolean arrays rather than arrays of indices. This preserves the shape (n) for each spin.
  • Rather than pass c_active and c_enviro, we instead pass density matrices, which preserve the shape (M,M) for each dm, rather than $(M, n_{act})$.

@MIWdlB MIWdlB self-assigned this Sep 18, 2025
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@MIWdlB MIWdlB mentioned this pull request Oct 7, 2025
@MIWdlB MIWdlB merged commit 938ce79 into master Oct 7, 2025
1 check passed
@MIWdlB MIWdlB deleted the simpler-localized-system branch October 7, 2025 11:37
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

Comments