Pseudopotentials in aiida workflow example with Espresso

I’m following the workflows tutorial in the aiida documentation. I get an error regarding missing pseudopotentials when they are actually installed.

alat = 4.0
ase_structure = crystal('Si', [(0, 0, 0)], spacegroup=227, cellpar=[alat, alat, alat, 90, 90, 90], primitive_cell=True)
structure = StructureData(ase=ase_structure)

code = load_code('pw@localhost')

from aiida.plugins import WorkflowFactory 
PwBandsWorkChain = WorkflowFactory('quantumespresso.pw.bands') 
builder = PwBandsWorkChain.get_builder_from_protocol(code=code, structure=structure )

I get the following error

--------------------------------------------------------------------------- NotExistent                               Traceback (most recent call last) File ~/miniforge3/envs/aiidapy313/lib/python3.13/site-packages/aiida_quantumespresso/workflows/pw/base.py:180, in PwBaseWorkChain.get_builder_from_protocol(cls, code, structure, protocol, overrides, electronic_type, spin_type, initial_magnetic_moments, options, **_)     179     pseudo_set = (PseudoDojoFamily, SsspFamily, CutoffsPseudoPotentialFamily) --> 180     pseudo_family = orm.QueryBuilder().append(pseudo_set, filters={'label': pseudo_family}).one()[0]     181 except exceptions.NotExistent as exception:  File ~/miniforge3/envs/aiidapy313/lib/python3.13/site-packages/aiida/orm/querybuilder.py:1146, in QueryBuilder.one(self)    1145 elif len(res) == 0: -> 1146     raise NotExistent('No result was found')    1147 return res[0]  NotExistent: No result was found  The above exception was the direct cause of the following exception:  ValueError                                Traceback (most recent call last) Cell In[41], line 3       1 from aiida.plugins import WorkflowFactory       2 PwBandsWorkChain = WorkflowFactory('quantumespresso.pw.bands') ----> 3 builder = PwBandsWorkChain.get_builder_from_protocol(code=code, structure=structure )  File ~/miniforge3/envs/aiidapy313/lib/python3.13/site-packages/aiida_quantumespresso/workflows/pw/bands.py:139, in PwBandsWorkChain.get_builder_from_protocol(cls, code, structure, protocol, overrides, options, **kwargs)     136 inputs = cls.get_protocol_inputs(protocol, overrides)     138 args = (code, structure, protocol) --> 139 relax = PwRelaxWorkChain.get_builder_from_protocol(     140     *args, overrides=inputs.get('relax', None), options=options, **kwargs     141 )     142 scf = PwBaseWorkChain.get_builder_from_protocol(     143     *args, overrides=inputs.get('scf', None), options=options, **kwargs     144 )     145 bands = PwBaseWorkChain.get_builder_from_protocol(     146     *args, overrides=inputs.get('bands', None), options=options, **kwargs     147 )  File ~/miniforge3/envs/aiidapy313/lib/python3.13/site-packages/aiida_quantumespresso/workflows/pw/relax.py:109, in PwRelaxWorkChain.get_builder_from_protocol(cls, code, structure, protocol, overrides, relax_type, options, **kwargs)     106 inputs = cls.get_protocol_inputs(protocol, overrides)     108 args = (code, structure, protocol) --> 109 base = PwBaseWorkChain.get_builder_from_protocol(     110     *args, overrides=inputs.get('base', None), options=options, **kwargs     111 )     112 base_final_scf = PwBaseWorkChain.get_builder_from_protocol(     113     *args, overrides=inputs.get('base_final_scf', None), options=options, **kwargs     114 )     116 base['pw'].pop('structure', None)  File ~/miniforge3/envs/aiidapy313/lib/python3.13/site-packages/aiida_quantumespresso/workflows/pw/base.py:182, in PwBaseWorkChain.get_builder_from_protocol(cls, code, structure, protocol, overrides, electronic_type, spin_type, initial_magnetic_moments, options, **_)     180     pseudo_family = orm.QueryBuilder().append(pseudo_set, filters={'label': pseudo_family}).one()[0]     181 except exceptions.NotExistent as exception: --> 182     raise ValueError(     183         f'required pseudo family `{pseudo_family}` is not installed. Please use `aiida-pseudo install` to'     184         'install it.'     185     ) from exception     187 try:     188     parameters['SYSTEM']['ecutwfc'], parameters['SYSTEM'][     189         'ecutrho'] = pseudo_family.get_recommended_cutoffs(structure=structure, unit='Ry')  ValueError: required pseudo family `SSSP/1.3/PBEsol/efficiency` is not installed. Please use `aiida-pseudo install` toinstall it.

But actually the pseudopotential set is installed and I do load the right profile":

(aiidapy313)$ aiida-pseudo list
Label                    Type string         Count
SSSP/1.3/PBE/efficiency  pseudo.family.sssp  103

Hi @Walser52

You are encountering this issue because AiiDA-QE uses the PBEsol functional by default. However, as you show in your code snippet, you have only installed the PBE ones at the moment (which are installed by default).

To install the PBEsol version, please run (see the “Get started” section of the documentation):

aiida-pseudo install sssp -v 1.3 -x PBEsol

If you want to use PBE pseudos, you have to change them using the overrides. Let us know in case you need further help.

Hope that helps!

1 Like

Sorry, I was blind to PBE and PBEsol. Yes it’s working.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.