pyiron.testing.executable module

class pyiron.testing.executable.ExampleExecutable[source]

Bases: object

Simple python executable that resembles the behavior of a real job, i.e., it processes input files, generates output files and can perform restarts. Will be mainly used to test the genericJob class.


Based on the lattice constant a random energy is calculated.

Parameters:alat (float) – lattice constant
Returns:list of n random energy values, where n equals self._count
Return type:(list)

Read a restart file for a continous simulation divided into multiple jobs.


Run executes the job as part of a subprocess. The input is written to an input file, then the executable is executed and finally the output file is collected and converted to HDF5 format for future processing.


Run lib executes the job directly in Python instead of calling a separate subprocess, this is faster for all Python jobs but not available for non Python jobs. No input or output files are generated when running in library mode, instead all input is provided as an input dictionary and the output is returned as a list.

Parameters:input_dict (dict) – input consisting of [“alpha”, “alat”, “count”]
Returns:alat(float), count(int), energy(list)
Return type:list

Write a restart file for a continous simulation divided into multiple jobs.