Self-Healing Overlap Estimator#4991
Conversation
| /** Compute the derivatives of the log of the wavefunction component with respect to the optimizable parameters. | ||
| * Unlike evaluateDerivativesWF, knowledge of mappings from component parameters to the full set of wavefunction parameters is not required. | ||
| */ | ||
| virtual void evaluateDerivativesWF_local(Vector<ValueType>& dlogpsi); |
There was a problem hiding this comment.
Please remove from WFC and keep it only to MSD.
There was a problem hiding this comment.
This function is unused, removed now.
| Matrix<ValueType>& dratios); | ||
|
|
||
|
|
||
| virtual void detRatios(Vector<ValueType>& ratios) |
There was a problem hiding this comment.
Please remove from WFC and keep it only to MSD.
There was a problem hiding this comment.
What does this function calculate?
There was a problem hiding this comment.
Removed from WFC, functionality only at MSD level now.
Inline documentation added.
| <parameter name="subSteps" > 2 </parameter> | ||
| <parameter name="timestep" > 0.4 </parameter> | ||
| <parameter name="warmupSteps" > 2 </parameter> | ||
| <estimator type="selfhealingoverlap" name="sh_overlap" /> |
There was a problem hiding this comment.
The batched input file for this test has now been updated to use the block similar to the batched spin-density test for diamond.
|
@ye-luo I've addressed all of your comments/requests. |
|
Not expecting to add more commits. Ready for merge. |
ye-luo
left a comment
There was a problem hiding this comment.
Overall OK. I will do some refactoring later to avoid the redundant code added by detRatios.
|
Test this please |
|
The CI failure seems mysterious. The failure is clouded by #4997 |
| default_label = 'sh_coeff', | ||
| data_paths = obj(coeff='value'), | ||
| ), | ||
| }) |
There was a problem hiding this comment.
Incorrect mapping in the above caused test failure. Please check against the old table.
quantity_paths = obj({
qpaths = stat_info[options.quantity].data_paths
'density' : obj(tot='value'),
'spindensity' : obj(u='u/value',
d='d/value'),
'1rdm' : obj(u='number_matrix/u/value',
d='number_matrix/d/value'),
'1redm' : obj(u='energy_matrix/u/value',
d='energy_matrix/d/value'),
'obdm' : obj(u='number_matrix/u/value',
d='number_matrix/d/value'),
'energydensity' : obj(W=('spacegrid1/value',0,3),
T=('spacegrid1/value',1,3),
V=('spacegrid1/value',2,3)),
'momentum' : obj(tot='value'),
ye-luo
left a comment
There was a problem hiding this comment.
Fixing test failure required.
|
Fixed. Estimator tests are now operable: |
| * These are obtained via derivatives of the log of the wavefunction component with respect to the optimizable parameters. | ||
| * Unlike evaluateDerivativesWF, knowledge of mappings from component parameters to the full set of wavefunction parameters is not required. | ||
| */ | ||
| void detRatios(Vector<ValueType>& ratios); |
There was a problem hiding this comment.
This function doesn't conform naming rules that functions start with a verb in lower case. I would recommend calcIndividualDetRatios.
Although calculating individual determinant ratios and calculating parameter derivatives share very similar internal implementation in the case of CI not necessarily the case with CSFs. They are conceptually different from APIs perspective. The difference is larger than just a mapping for example the det 0 is skipped when calculating derivatives. So I would recommend removing
These are obtained via derivatives of the log of the wavefunction component with respect to the optimizable parameters.
* Unlike evaluateDerivativesWF, knowledge of mappings from component parameters to the full set of wavefunction parameters is not required.`
in the documentation. Please also document the argument ratios.
There was a problem hiding this comment.
Also please test this function at
https://github.com/QMCPACK/qmcpack/blob/2764f973212f911490ff488a44ed011b22678154/src/QMCWaveFunctions/tests/test_multi_slater_determinant.cpp#L112
although you'll need to findMSD and cast the type to MSD first.
Please test the first element and a non-first element.
|
Test this please |
|
Hit one test failure https://github.com/QMCPACK/qmcpack/actions/runs/9117814869/job/25069532490 |
|
Fixed the mixed precision tests. Should be good to merge now. |
|
Test this please |
Proposed changes
Add implementation of self-healing overlap estimator for legacy and batched drivers.
As requested, a 4 mpi 4 omp-thread deterministic test is included. The check_stats.py testing script was updated to handle deterministic tests for stat.h5 quantities based on an absolute tolerance check in addition to the statistical check capability already present.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Laptop
Checklist
Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.