spawn.simulation_inputs

Simulation inputs

An input a class that reads and writes parameter values, normally to a file

class spawn.simulation_inputs.JsonSimulationInput(parameter_set, **write_options)[source]

A dictionary input written as a JSON file where the parameter set is deep copied

class spawn.simulation_inputs.SimulationInput[source]

Handler of inputs for a simulation that will typically be parsed from and written to a file

classmethod from_file(file_path)[source]

Creates a SimulationInput by loading a file

Parameters

file_path (path-like) – The file path to load

Returns

The simulation input object

Return type

An instance of SimulationInput

abstract hash()[source]

Returns a hash of the contents of the file

Returns

The hash

Return type

str

abstract to_file(file_path)[source]

Writes the contents of the input file to disk

Parameters

file_path (path-like) – The path of the file to write