SPOSet API cannot allow modification of underlying SplineInst
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 82
Description
**Describe the bug**
BSplineSet.makeClone() -> SplineR2R Copy Constructor copies SplineInst shared ptr
Then later we call an SPOSet method that modifies SplineInst such as applyRotation. This actually modifies the state of all SPOSets in a clone group.
So if I have the reasonable looking:
```
for (auto& twf : walkers.getTwfs()) {
twf.getSPOSet("electrons").applyRotation(some_rotation)
}
```
If all those twfs were made by cloning the golden wavefunction
Then all the SPOSets get rotated by number of clones * some_rotation.
You would need to know explicitly which SPOSets are backed by which SplineInst and call just one for each SplineInst. This is a terrible break of encapsulation.
This is a significant design issue. I think it stems from either
1. applyRotation is in the wrong interface. There needs to be an interface at the "SPOBasis" level and there needs to be 1 handle to that per group of clones.
2. spline coefficients should be pulled up into the SplineX2X level
This really depends on how the optimization algorithm doing the rotation is intended to work.
**To Reproduce**
Need a reproducer.
Contributor guide
Assessment
This issue has not been assessed yet.