Finding Max and Min values of avg local ionisation energy from a cube file

Dear all,

I’m trying to analyse a cube file containing the avg local ionisation energy to obtain the minimum local ionisation energy and the atom to which it corresponds to (the index of the atom, or the grid point, or coordinates corresponding to that atom).

Any insights on how to proceed would be helpful. Thank you.

The atomic positions and grid spacing are in the header of the cube file. The cube file format is described here:
The rest is up to you.