recursive_update

atomate2.cp2k.sets.base.recursive_update(d, u)[source]

Update a dictionary recursively and return it.

Parameters:
  • d (Dict) – Input dictionary to modify

  • u (Dict) – Dictionary of updates to apply

Returns:

The updated dictionary.

Return type:

Dict

Example

d = {‘activate_hybrid’: {“hybrid_functional”: “HSE06”}} u = {‘activate_hybrid’: {“cutoff_radius”: 8}}

yields {‘activate_hybrid’: {“hybrid_functional”: “HSE06”, “cutoff_radius”: 8}}}