Skip to content

Commit

Permalink
PwBaseWorkChain: Pop starting_magnetization if tot_magnetization`…
Browse files Browse the repository at this point in the history
… is defined (#972)

As stated in the documentation of Quantum ESPRESSO:
https://www.quantum-espresso.org/Doc/INPUT_PW.html#idm299
  • Loading branch information
AndresOrtegaGuerrero authored Oct 19, 2023
1 parent 80e550e commit 2adf033
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aiida_quantumespresso/workflows/pw/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ def get_builder_from_protocol(
parameter_overrides = overrides.get('pw', {}).get('parameters', {})
parameters = recursive_merge(parameters, parameter_overrides)

# if tot_magnetization in overrides , remove starting_magnetization from parameters
if parameters.get('SYSTEM', {}).get('tot_magnetization') is not None:
parameters.setdefault('SYSTEM', {}).pop('starting_magnetization', None)

pseudos_overrides = overrides.get('pw', {}).get('pseudos', {})
pseudos = recursive_merge(pseudos, pseudos_overrides)

Expand Down

0 comments on commit 2adf033

Please sign in to comment.