[vasp] first draft of VASP dft driver incl example#2
Conversation
|
Let us know once this is ready for review |
|
Hi @Wentzell , in principle it would be but I am waiting for an email response of @harrisonlabollita @GingrasO . The code seems to hit a bug in modest and I wanted them to confirm. Let me paste the issues here so we can work on it: I had to change in
Which is a bug I think? That does not belong there.
This is already quite far into the script just before the solve call. So VASP is invoked correctly, the converter runs correctly (see output log) and there I stopped working.
I put my example in the PR. You just have to replace the POTCAR dummy in the PR with the correct one. Best, |
|
Hi @the-hampel, Point 1 is definitely a bug. I am not yet sure about the cause of point 2, I will take a closer look at it while fixing the bug int point 1. |
|
Made progress: TRIQS/modest#9 and I pushed some updates to this branch as well. Now I am facing some problem with the complex part of the hybridization I think. There are some changes that I do not quite fully understand. |
|
While running the VASP CSC example ( 1. dftkit — band-count mismatch in
|
5f42441 to
d35bd89
Compare
|
I think this is ready now. See also TRIQS/modest#11 . @harrisonlabollita @GingrasO please have a look. Up for discussion: Should there be an example in doc/examples or only the modest tutorial? I vote for some examples here but this is of course a bit harder to maintain. |
|
Hi @the-hampel, I agree this looks good to me! Thank you for this PR! @Wentzell, can we go ahead and merge this? |
… specific kpoints
band_energy_and_write_charge_update only stored delta_N in the seedname
h5 (dft_update group), which VASP's ADD_GAMMA_FROM_FILE does not read, so
the CSC loop aborted with 'no GAMMA or vaspgamma.h5 file found'. Also write
the correction to vaspgamma.h5 in the layout VASP expects (top-level
band_window + deltaN/{up,down}, one nb x nb block per IBZ k-point), mirroring
triqs_dft_tools SumkDFT.calc_density_correction(dm_type='vasp').
Handles the non-magnetic / spin-averaged case (up == down); SP!=0 and SOC
are not written by this h5 path (SO needs the legacy GAMMA text file).
band_energy_and_write_charge_update now branches on the SO flag in the seedname h5: for spin-orbit it writes the single spinor-band channel to deltaN/ud (no spin average); otherwise the spin-averaged collinear blocks to deltaN/up and deltaN/down. This matches what VASP's ADD_GAMMA_FROM_FILE reads and mirrors triqs_dft_tools calc_density_correction(dm_type='vasp'). Add test/python/vasp/charge_update with collinear, spin-orbit and IBZ-slicing cases: the expected correction is built independently in numpy, written to a reference vaspgamma.h5, and compared to the writer output with triqs h5diff; the band-energy correction value is checked separately.
Report the global DFT+DMFT iteration, each inner DMFT iteration, and the point just before the VASP charge update / DFT driver is triggered.
vasp.Driver landed on this branch; link it in the interface table instead of marking it as in development.
The upstream ctseg fix (real(...) in work_data.cpp mu extraction) means solve_generic now accepts the complex-flagged Hermitian impurity levels directly; no need to strip the imaginary noise with h.real.copy().
Skip the final VASP charge update so the run always terminates on a DMFT step instead of a now-unused DFT charge update, and add a header comment plus inline comments explaining the setup and the outer/inner loops.
Call mpi.barrier with poll_msec=100 in the vasp, qe and abinit drivers (and the plovasp sc_dmft loop) so idle ranks sleep instead of busy- polling every 1 ms while the external DFT code occupies the CPUs.
Remove a leftover vasp.lock (in addition to STOPCAR) at the start of run_initial_stage: a stale lock would make the driver believe VASP is already running. Also clarify in run_update_stage that running several VASP steps per DMFT iteration is left to the caller.
|
@Wentzell @harrisonlabollita the more I think about it I come to believe that it is best to remove the doc/example files - they would really be duplicate between here and modest. I think this should live on the modest site no? Even though it might be hard to find for the user. We should put strong cross links between the docs to point to the tutorial I would say. Should I maybe draft this in here, i.e. doc/tutorials contains a section pointing to modest and dft_tools with tutorials and guides? |
|
@the-hampel, when I was drafting the modest docs I had a similar thought because the initial step is running the converter. So it felt odd to me that we would point people to modest/dft_tools, then immediately point them to dftkit to really get started. So are you suggesting that we embed the documentation of dftkit within modest and dft_tools? Meaning the dftkit doc is duplicated within the modest and dft tools repositories? |
still in draft mode