Skip to content

SPOSet size required at construction#5842

Merged
prckent merged 4 commits intoQMCPACK:developfrom
ye-luo:refactor-splines
Mar 6, 2026
Merged

SPOSet size required at construction#5842
prckent merged 4 commits intoQMCPACK:developfrom
ye-luo:refactor-splines

Conversation

@ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Mar 6, 2026

Proposed changes

This is a long overdue change. With this PR

  1. size is set via the SPOSet constructor and is marked const. No longer allowed to change size at a later point. setOrbitalSetSize() removed.
  2. CompositeSPOSet and SpinorSet needs change in constructors.
  3. 1RDM classes are updated follow CompositeSPOSet changes

What type(s) of changes does this code introduce?

  • Refactoring

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

epyc-server

Checklist

    • I have read the pull request guidance and develop docs
    • This PR is up to date with the current state of 'develop'
    • Code added or changed in the PR has been clang-formatted
    • This PR adds tests to cover any new code, or to catch a bug that is being fixed
    • Documentation has been added (if appropriate)

@ye-luo ye-luo force-pushed the refactor-splines branch from 3fa1b64 to f8ae7b6 Compare March 6, 2026 18:44
@ye-luo
Copy link
Contributor Author

ye-luo commented Mar 6, 2026

Test this please

static auto countOrbitals(const std::vector<std::unique_ptr<SPOSetT<T>>>& components)
{
SPOSet::OrbitalSetSize = 0;
component_offsets.reserve(4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small q: Why did we reserve 4 here previously?

Copy link
Contributor Author

@ye-luo ye-luo Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When having two spos. Offset needs to be size 3 at least. Not sure why 4.

@prckent prckent merged commit e02b9be into QMCPACK:develop Mar 6, 2026
45 checks passed
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