Closed aannabe closed 4 days ago
Pseudos now added.
Note: I tested that spin-density, 1RDM, and energy-density runs in the batched code with the above Nexus inputs. However, the density
estimator crashes with the following error: Fatal Error. Aborting at EstimatorManager input:unparsable <estimator> node, name: density type: density in Estimators input.
Has the density
estimator been ported to the batched code? If not, should I keep it or comment it out for now?
I think we decided that since the spindensity estimator was a superset of the density estimator then we didn't need both. However, the error message suggests that is not what is going on here (?). At the very least the error message needs improving. There are other estimators that are close to duplicates of functionality, e.g. the various structure factors.
Looking at src/Estimators/EstimatorManagerInput.cpp
there is no if-clause for the density estimator. It looks like it hasn't been ported. I have removed that estimator from the example to avoid confusion. I have also always used the spin-density estimator to get the total charges.
This is good. Thanks Gani!
If you have time, can you also add the momentum distribution? This is the other one that should have support in the batched drivers already.
Will add the momentum distribution sometime today.
Added a minimal input for momentum distribution
I agree on the note about blocks. Best to also add a comment to explain, e.g., "Large numbers (100+) of blocks are preferred for effective statistical analysis. In production runs, more steps per block than specified here are additionally preferred for computational efficiency due to the I/O cost of estimators."
It looks good to me now. Feel free to push to my branch directly if you think the included comments need refinining.
EnergyDensity was working for me with the same Nexus estimator definition on another system. Maybe there is something I missed. I will investigate today.
Working now after an update & rebuild.
Thanks. I also did a short VMC run on this system and it runs with the latest develop. The stat.h5 has all the included estimators:
ElecElec Group
IonIon Group
Kinetic Group
LocalECP Group
LocalEnergy Group
LocalEnergy_sq Group
LocalPotential Group
MPC Group
NEEnergyDensityEstimator Group
NonLocalECP Group
OneBodyDensityMatrices Group
SpinDensity Group
nofk Group
PS. The new DFT+U input style using QE v7.4 also works.
Test this please
Proposed changes
As discussed previously in persion, a comprehensive example was needed for Nexus that demonstrates how to specify various estimators. Here, I have included Density, SpinDenstiy, EnergyDensity, and 1RDM observables in a single Nexus workflow. The goal is to add all the other estimators too as they mature.
In addition, I added a
scripts_postproc
directory here that includes some post-processing tools. Currently, I included the 1RDM retrieval and plotting tools adapted from discussions in #1052. For now I think it will be helpful to users, at least as a starting point. Let me know if it's not well-suited for here and I will remove it.For long run, there should be a centralized place for post-processing tools that analyze the estimators in the stat.h5 file. Whether it should be one large tool that is one-fits-all, or multiple specialized smaller tools could also be discussed. Currently, it seems to be not well handled - for instance, I see that
qdens
breaks if 1RDM or energy density is present in the same stat.h5 file. I will create an issue for this if the fix is not straightforward.What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Local machine
Checklist