Dump 2 VTK Converter for Windows

Submitted by rahulsoni on Tue, 09/09/2014 - 14:17

Hi everyone

I have written a small piece of code that converts the dump file to vtk. It works through cmd/comsole in windows and takes the standard fields in dump file i.e. id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius. A recompilation after modifying the source code can be done if the field are different than specified.

I have written this because I faced difficulty in performing dump to vtk conversion in windows. The pre-compiled liggghts reader object files are available for linux but not for windows. Moreover, Linux version is only for 64-bit OS.

The files are hosted at https://github.com/rahulksoni/Dump2VTK
It contains a pre-built binary (.exe) that can be kept anywhere in the PC. Repo also contains the source C++ file that can be modified the values/parameters in the dump are different than mentioned above.

Note: Github does not allow to upload .exe file, therefore, Dump2VTK is uploaded without .exe extension. Please download the repo from link and add .exe extension at the end of file Dump2VTK.

Steps to setup:
1. Download Dump2VTK.exe from https://github.com/rahulksoni/Dump2VTK
2. Place at any safe place in your pc.
3. Go to the directory and add the extension .exe to the file Dump2VTK file.
4. Copy the path of the directory where you kept the .exe file.
5. A system path variable can be setup for the executable, so that, it can be called from any working directory. For setting up path variable, go to control panel > System and Security > System > Advanced system settings > Advanced > Environmental variables > System variables > Path > Edit, then at the end give a semicolon ";" (without quotes), and then paste the copied path for the executable. eg. C:\LIGGGHTS-PUBLIC\DUMP2VTK\
6. Or, if you want to run it from cygwin terminal then add an alias at the end of bashrc file (.../cygwin/home/user/.bashrc) such alias Dump2VTK=/cygdrive/c/LIGGGHTS-PUBLIC/DUMP2VTK/Dump2VTK.exe

Steps to use:
1. Open a cmd, cd to the simulation post directory.
2. Type Dump2VTK.exe and press enter.
3. Enter the initials/first-name when asked and press enter. (eg. packing for the dump files named such as packing100.dump or packing*.dump)
4. Similarly, enter the extension name when asked and press enter. (eg. dump for the example in last line)
5. Typically, in a dump file the timestep at which dump file was written and the number of atoms at the present state are written in line number 2 and 4, respectively. Also, the properties (coordinates, velocities etc.) start writing from line number 10. You can choose these default values of 2, 4 and 10 by entering yes at the next step or choose no to enter new values.

PS: Tested on Windows 8.1, 8, 7, XP.