[feat] configurable QE executables with core mapping support - #131
Conversation
hmenke
commented
Mar 18, 2026
- Move dft_exec to dict structure for per-executable configuration
- Support number_cores placeholder in executable paths
- Update qe_manager to handle both string and dict dft_exec formats
- Add backward compatibility for legacy string configuration
- Showcase in Ce2O3 CSC tutorial
| qe_exec += 'wannier90.x' | ||
| qe_exec += qe_select.get("win", "wannier90.x") | ||
|
|
||
| qe_exec = qe_exec.format(number_cores=number_cores) |
There was a problem hiding this comment.
Another idea that came to my mind was to allow interpolation of the entire environment. That would provide maximum flexibility.
| qe_exec = qe_exec.format(number_cores=number_cores) | |
| qe_exec = qe_exec.format(**{**os.environ, "number_cores": number_cores}) |
Not sure whether this is fragile, though. At least in a couple of manual tests I was not able to break it.
There was a problem hiding this comment.
I think this could be potentially a bit dangerous if someone misuses this? What do you think? I mean this interpretes whatever is in the os.eniron? But I am not an expert.
There was a problem hiding this comment.
The idea was to allow something like
[dft.dft_exec]
path = "{HOME}/Code/q-e/install/bin"
pw = "pw.x -nk {SLURM_NTASKS_PER_NODE}"There was a problem hiding this comment.
Okay I think I am convinced this is very handy. I made a little commit to allow for this with a safety net. Can you check if this makes sense? If this all works ( I did not explicitly test this again with QE) I am happy to merge this. Maybe if you find it okay I will give the tutorial a try again before merging.
|
Hi @hmenke , P.S. unfortunately the CI is a bit broken currently on Unstable because of changes made to the default tailfit in triqs/unstable and I am currently discussing with @Wentzell and @Thoemi09 how to resolve this. |
|
Hi @hmenke , |
a3eae78 to
0deee45
Compare
- Move dft_exec to dict structure for per-executable configuration - Support number_cores placeholder in executable paths - Update qe_manager to handle both string and dict dft_exec formats - Add backward compatibility for legacy string configuration - Showcase in Ce2O3 CSC tutorial
…s=qe The projections card listed the f orbitals in a hand-picked mr order (4,3,5,2,6,1,7) that matched no cubic-harmonic convention, a leftover from before spherical_to_cubic supported l=3 for the qe/wannier90 basis. Now that l=3 is supported, request the full shell directly (Ce1:l=3 / Ce2:l=3), which yields the natural Wannier90 order mr=1..7 consistent with h_int_basis=qe. Verified physics-neutral: full CSC runs with the old scrambled order and the new natural order agree to ~4e-4 eV (Ce3+ f1 filling makes the density-density energy insensitive to ordering). Updated the notebook note accordingly.
The dft_exec command strings are expanded with str.format against os.environ
in addition to {number_cores}, so {HOME}, {SLURM_NTASKS}, ... work too. This
was supported but only {number_cores} was documented.
