Extracting values from a grd-file

Hello everyone,

the electrostatic potential (or electron density, or others...) in DMol3 are stored in a grd-file. From what I can deduce when looking at the file with a text editor, the first few lines contain the parameters which determine the order in which the values are read, and all following lines contain the grid values.

Is there a tool that transforms this file in a more explicit grid format, i.e. something like:

x1      y1      z1      value1

x2      y2      z2      value2

...

For example:

0     0     0      1.5

0     0     0.25  1.75

...

Such a transformation would be very helpful to export the data to other programs, such as Origin, for further use.

Any suggestions will be highly appreciated!

Best regards

Michael