update_user_kpoints_settings

atomate2.vasp.powerups.update_user_kpoints_settings(flow, kpoints_updates, name_filter=None, class_filter=BaseVaspMaker)[source]

Update user k-points settings in VaspInputGenerators.

Modifies the user_kpoints_settings attribute of VASP input generators within jobs, flows, or makers. Creates a copy of the input.

Parameters:
  • flow (Job or Flow or Maker) – A job, flow, or maker to update.

  • kpoints_updates (dict[str, Any] or Kpoints) – K-points updates to apply. Can be either: - A dictionary with k-points settings (e.g., {‘reciprocal_density’: 100}) - A Kpoints object that replaces the entire user_kpoints_settings

  • name_filter (str or None, optional) – Filter to apply updates only to jobs matching this name pattern. Default is None (no filtering).

  • class_filter (type[Maker] or None, optional) – Filter to apply updates only to makers of this class or its subclasses. Default is BaseVaspMaker.

Returns:

A deep copy of the input with updated k-points settings.

Return type:

Job or Flow or Maker

Examples

>>> flow = update_user_kpoints_settings(flow, {"reciprocal_density": 200})
>>> # Or with a Kpoints object
>>> kpts = Kpoints.gamma_automatic((4, 4, 4))
>>> flow = update_user_kpoints_settings(flow, kpts)