Aiida-quantumespresso: no LDOS / k-resolved DOS in projwfc calculation plugin


I have noticed that the options “ldosinboxes” and “kresolveddos” are blocked in the projwfc calculation plugin. Is there another way to do LDoS and k-resolved DoS calculations through AiiDA ?
If no what would be the best way to implement it myself, if it is not already a work in progress ?


I am not sure why those are blocked. Usually there is a reason for it, but I didn’t develop this plugin. You can always subclass the plugin and override the _blocked_keywords attribute:

from aiida_quantumespresso.calculations.projwfc import ProjwfcCalculation

class CustomProjwfcCalculation(ProjwfcCalculation):

    _blocked_keywords = [
        ('PROJWFC', 'outdir', ProjwfcCalculation._OUTPUT_SUBFOLDER),
        ('PROJWFC', 'prefix', ProjwfcCalculation._PREFIX),
        ('PROJWFC', 'lsym', True),
        ('PROJWFC', 'lwrite_overlaps', False),
        ('PROJWFC', 'lbinary_data', False),
        ('PROJWFC', 'plotboxes', False),

I think that should be sufficient to run it. If you want to submit it to the daemon, you need to make sure it is importable (add the module to the PYTHONPATH environment variable) or register it through an entry point.

1 Like

Just a small additional comment to the discussion. I’m not sure about the LDOS as I haven’t used it so far. Regarding the k-resolved DOS, one reason why the keyword is blocked may be that it’s actually not really needed. The projections per k-point are parsed from the std output file in any case, no need to specify an additional keyword.
You can access them via the projections output namespace of the ProjwfcCalculation (in case you run spin-polarized calculations, you will find the projections_up and projections_down namespace instead).
To get the projections, simply run:

node.projections.get_projections() # Where node is your ProjwfcCalculation CalcJobNode 

If you are interested in the k-resolved DOS in combination with the band structure, you might find the ProjwfcBandsWorkChain from the aiida-wannier90-workflows plugin useful (aiida-wannier90-workflows/src/aiida_wannier90_workflows/workflows/ at main · aiidateam/aiida-wannier90-workflows · GitHub).

Thank you for your comment, the ProjwfcBandsWorkChain might indeed be what I need.

Yes I tried using projections directly (for band structure) at first but I got some rather weird projections around some specific k-points so I wanted to run a k-resolved DOS with smearing to see whether it would fix it but was surprised it was blocked.
I guess it may also be blocked to avoid raising exceptions due to the fact that the parser linked to the calculation isn’t designed to handle k-resolved DOS output files yet - same for LDOS - since it adds columns…

Thank you both again.