QMCPACK / QMCPACK/qmcpack

Orbital rotation issues

Open
#3,983 4 comments 0 reactions 0 assignees View on GitHub
optimization
Dominant language
C++
Stars
403
Forks
154
Avg merge
1d 12h
Merged PRs (30d)
82

Description

A collection of issues and narrative saga related to orbital rotation.

### Related issues
See #3564 on getting the variational parameter indices correct (still not fixed). #2023 is vague (no reproducer). #637 relates to using a spline basis.

Trying to get orbital rotation correct has sent me down a long yak shaving chain. Trying to fix one issue leads to other issues.

I tried to start submitting fixes in #3977, but it's not clear that code is even correct, and there are no good tests to validate it.

### Testing
The existing tests (in https://github.com/QMCPACK/qmcpack/tree/develop/tests/molecules/H2_ae and https://github.com/QMCPACK/qmcpack/tree/develop/tests/molecules/H4_ae ) target excited states and require BUILD_LMYENGINE_INTERFACE to be enabled. They also perform complete optimization.

Tests are needed that simplify it further. The first step is getting parameter derivatives correct.
For an extremely simple test case. My favorite simple case is an He atom with STO orbitals and a Pade Jastrow.
The wavefunction excerpt:
```


0.1















1.0 0.0
0.0 1.0










```

The ground state is the target here, the rotation coefficients should be the same for both up and down. One way to ensure this is to reference the same determinant for both up and down spins (`
spo-up_orb_rot_0000_0001, spo-down_orb_rot_0000_0001

```
The code issue comes in from OptVariables and OptVariablesForPsi in QMCCostFunctionBase. Normally, they are the same size, but with constraints they are different sizes. NumOptimizables is the size of OptVariables. In several places, the size of OptVariablesForPsi should be used instead (in the sizes of rDsaved, etc in QMCCostFunction::checkConfigurations, and other places that use rDsaved and similar variables)

### Cusp correction
Might need to use psi.rows() or psi.size() instead of BasisSetSize in soaCuspCorrection::evaluate_vgl and evaluateV (and change addV and evaluateV to pass the additional size information). I think these changes are due to orbital rotation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.