pisces.extensions.simulation.gadget.frontends.Gadget4Frontend.__init__#

Gadget4Frontend.__init__(initial_conditions: InitialConditions, reset_configuration: bool = False, **kwargs)#

Construct a simulation frontend and attach it to an IC object.

On initialization, the frontend will:

  1. Validate the provided initial conditions object (via _validate_input_ic()).

  2. Ensure that a per-frontend configuration file exists in the initial conditions directory. If no file is present, the default configuration template is copied in. If a file already exists, it is either preserved or reset depending on reset_configuration.

  3. Load the configuration into a ConfigManager instance and apply any keyword overrides passed through kwargs.

  4. Call __post_init__() to allow subclasses to perform additional setup.

Parameters:
  • initial_conditions (InitialConditions) – The Pisces initial conditions object to bind this frontend to. Provides access to the working directory, logging, and data structures that will be translated into native simulation input.

  • reset_configuration (bool, optional) – If True, overwrite any existing configuration file in the initial conditions directory with the default template for this frontend. If False (default), an existing configuration file will be preserved.

  • **kwargs – Arbitrary keyword arguments that will be merged into the loaded configuration after it is created. This allows programmatic updates without requiring manual edits to the YAML file.

Raises:

FileNotFoundError – If the default configuration template for this frontend cannot be found.