liggghts reader Plugin for Paraview

richti83's picture
Submitted by richti83 on Tue, 11/08/2011 - 15:58

Hi all,

I made a little Plugin for Paraview to read liggghts-dump files directly without using pizza-script.
I expect you use the dump command like this:
dump dmp all custom 100 post/dump_*.liggghts id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
(extension .liggghts because .dump is used by lammps reader plugin;
the * means that liggghts generate one file per dump-timestep (here 100).

In the attached tar file you will find the source code to cross compile on winXX and a precompiled .so libfile to use with paraview 3.12.0, 64bit,tested on ubuntu 10.04, QT 4.6.4.

For self compiling:
1st Download paraview source tree 3.12 (not the csv one)
2nd build paraview (ccmake & make, shared lib yes !)
3rd ccmake & make liggghts_reader

To activate the plugin go to Paraview->Manage Plugins->Load New.
The Plugin is able to read file-series too !

I hope this will help.
Best wishes from Magdeburg,
C. Richter (OVGU/ILM)

The Plugin is now in the Download Section:

I compiled the reader Plugin with the new Paraview 3.14 stable (64bit)

rqwang | Tue, 11/08/2011 - 16:24

Hi Richter,

Thank you for the plugin. I will try it soon.

I am looking a plugin to read liggghts data (or vtk) into blender.

Do you have any idea?



richti83's picture

richti83 | Tue, 11/08/2011 - 18:27

Hi rq,

I don't know how Blender works, but in fact the dump file is a CSV-File (without commas :-)). Override the first 9 lines and than the Pos/Vel/Force/whatever Information begins.

If you look in the the src/reader.cxx you can see how to split the lines from a l-dump file.
I found this skript for a Blender-csv imorter:
simply change line 128 to ' ' and arrange the dump command like the autor said in the header, (or change the blender-skript) and I'm sure you will have what you want.

PS1: did you try the PointSprite Plugin in Paraview to render the spheres ?
PS2: if your Blender skript is working, I would be happy if you could share it with us, because I know Blender can show MBDyn results and in future I will try to connect liggghts with MBDyn for Multi-Body<->Particle interaction :-)


richti83's picture

richti83 | Tue, 01/17/2012 - 15:22

Hi all,

because I'm a little bit lazy, I made a Paraview Macro for my reader.
You can add it by Macro->Add new->Open->
You will get a new Button "update"
The first hit to the button makes a new reader of liggghts reader, reading all files in post/ (start paraview from the same promt as you run liggghts so that post/ is in the working directory !) and activating PointSprite as Representation (must be activated in Plugins !)

Every next hit of the button reads the file list from post directory again and scrolls to the last timestep.

Have Fun,

The update-script is now here: node/681

zamir | Wed, 12/07/2011 - 08:45


I'm attempting to load this plugin but I get an error in the plugin manager that says: No such file or directory. Currently, that file lives in /proc/10698/cwd, but I do not know how to tell paraview where to look for it.

Im using the debian distro of paraview and ubuntu 11.04.

Any help would be greatly appreciated, thank you!

richti83's picture

richti83 | Wed, 12/21/2011 - 19:13

Hi Zamir,

I don't know which version of paraview is in the debian distro you use and if this version is compiled with shared libs yes.

You can download the precompiled binary from Paraview 3.12.0 here:

Sometimes the Plugin-loader tells something about not found, than I only symlink the existing to libvtkhdf5 and libzlib to libvtkzlib.pv.3... .in ParaView-3-12-0/libs/paraview-../

best wishes,

jwarnett | Tue, 01/10/2012 - 17:14


I am running ubuntu 11.04 and have Paraview 3.12 64bit and have tried to load the plugin but get this error message..

ERROR: In /home/kitware/Dashboards/MyTests/ParaView-master/ParaViewCore/ClientServerCore/vtkPVPluginLoader.cxx, line 296
vtkPVPluginLoader (0x3773c60): cannot open shared object file: No such file or directory

any ideas?


richti83's picture

richti83 | Wed, 01/11/2012 - 08:47

I investigated this issue a little deeper and found out I linked the first plugin against the PV3.12 RC3. I made it new now and it works without the symlinks :-)
You can download the new Plugin for Paraview 3.12 here:


jwarnett | Wed, 01/11/2012 - 14:35


I've now got a new error with your latest version

Load error: cannot load library home/Jay/Simulation/parareader/ ( cannot open shared object file: no such file or directory)

I've searched for the library and found it in this directory:

Im guessing again that a symbolic link will sort this, but must admit that I am not too hot with linux, so any idea as to what link I need to make?

Thanks again for your help.


jwarnett | Thu, 02/02/2012 - 13:50

It took me a little while to figure it out, but the plugin requires some shared libraries from OpenFOAM, and I was a pure liggghts user. Didn't need to symlink or anything. Thought I should let you know

Silias | Wed, 01/25/2012 - 14:51


this plug-in and also the update-bottom sounds very interesting, because it should safe a lot of time!

But if use a dump-command, which uses additionally to

dump dmp all custom 100 post/dump_*.liggghts id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

some more variables, like force-wall, Temperature, ...

Do these plug-ins work also in that case, or what kind of changes do I have to do to get paraview reading my extended dump-command?

Thanks very much,
kind regards,


richti83's picture

richti83 | Wed, 01/25/2012 - 17:35

Hello Sebastian,

currently I'm working on a "intelligent" Version which will detect your Scalars and Vectors from the dump-file. But it's still under development :-).
If you everytime use the same dump command you should have a look in the sourcecode. You can see how the text-line is splitted and how its passed to the paraview pipeline. You can modify this to your needs.
Compiling under Linux is quite easy (on winOS it took me 2days to make a 64bit DLL)
1. download PV Source-tree
2. use CMAKE to conf it using shared libs
3. make (paraview) [1h]
4. goto Plugin-Src. tree
5. cmake, point to paraview build-dir
6. make (plugin) [<1min]

The next Version will also have the ability to fill "field-data" (for example with dumpstep of the file, filename and - I hope - the simtime).

stay tuned,

ckloss's picture

ckloss | Wed, 01/25/2012 - 20:03

Hi Christian,

>>currently I'm working on a "intelligent" Version which will detect your
>>Scalars and Vectors from the dump-file. But it's still under development :-).

one possibility would be to detect (x,y,z), ({name}_x,{name}_y,{name}_z), (f_{ID}[0],f_{ID}[1],f_{ID}[2]) , (c_{ID}[0],c_{ID}[1],c_{ID}[2]) as vectors and everythins else as scalars.
That's how we did that for (to be released)


richti83's picture

richti83 | Mon, 01/30/2012 - 12:35

Here is the first Beta version of the "intelligent reader plugin".

It detects the sequence of columns and assigns all known scalars and vectors to the corresponding column in PV.
"unknow" values like f_,v_ and c_ are passed as scalar with their name.
I tested this with a custom fix f_color as discribed here: node/690#comment-2181

At the moment, all vectors must not be degenerated (this means you have to dump x,y and z component) otherwise the value is ignored.

please report bugs over the "contact author" funktion here in the forum, thank you.

there is a "easter egg" in the code: if you provide the "simtime" as Field Data (you can simply add 2 LOC to the dump_custom.cpp liggghts-src-file:

void DumpCustom::header_item(int ndump)
fprintf(fp,"ITEM: TIMESTEP\n");
fprintf(fp,"ITEM: SIMTIME\n");

fprintf(fp,"ITEM: NUMBER OF ATOMS\n");
fprintf(fp,"ITEM: BOX BOUNDS\n");
fprintf(fp,"%g %g\n",boxxlo,boxxhi);
fprintf(fp,"%g %g\n",boxylo,boxyhi);
fprintf(fp,"%g %g\n",boxzlo,boxzhi);
fprintf(fp,"ITEM: ATOMS %s\n",columns);

you can access the field data with the python-programmable-filter


and show it on the OSD (see my other thread about this)

Best wishes,

tkulju | Tue, 02/21/2012 - 10:58

I'd like to add an comment about the building phase for beginners. After the paraview has been built, reconfigure the built version with ccmake by adding the correct path for the plugin in PARAVIEW_EXTERNAL_PLUGIN_DIRS. Then configure, generate and finally make liggghts_reader.

I don't know if this is needed for everybody or this is trivial, but I wasn't able to build the plugin with the instructions above. Hopefully this helps somebody. But the plugin is great, thanks Christian!

- Timo

qeofyius | Fri, 04/20/2012 - 19:53

I'm trying to compile the intelligent plugin on Windows. (The hard-coded, binary version works really well, but we need more fields.) I've built Paraview, cmake the plugin, but when I try to build it in VS10, I get

Error 1 error MSB6006: "cmd.exe" exited with code 3. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 151 6 liggghts_reader

Any ideas from the first time you built it in Windows?

richti83's picture

richti83 | Fri, 02/10/2012 - 10:39

I've made a binary file reader by using the code from bin2text tool.
A first BETA is available here:

Please see the README File for further information.

richti83's picture

richti83 | Sat, 10/20/2012 - 21:26

the binary reader can now be used with Liggghts 2.X.X (some variable-sizes changed in dump_custom from int(4) to bigint(8) which causes some trouble with the binary-reader ...)

Download: system/files/src_bin_v2.zip_.txt

richti83's picture

richti83 | Mon, 12/31/2012 - 21:05

I was bored about the python-macro-click-reload function and used the time over Christmas to code a new fancy Paraview Widget with QFileWatcher to update the Pipeline evertime a new File is found in the post-folder.
You'll find the sources and a short Video here:

The upcoming "pro" version will support automatic representation-style setting, camera preset and change of post-foldername.

Happy New Year,

keepfit | Mon, 04/01/2013 - 00:39

when loading the pre-compiled Liggghts-reader (x64), there is error:

ERROR: In /home/A4/OpenFOAM/ThirdParty-2.1.1/ParaView-3.12.0/ParaViewCore/ClientServerCore/vtkPVPluginLoader.cxx, line 296
vtkPVPluginLoader (0x1547c20): cannot open shared object file: No such file or directory

>>> missing?
The paraview 3.12 is compiled from source code and works well in Ubuntu 13.04, and "python-qt4-dev & python-qt4" are both installed.

How to figure this out?

keepfit | Mon, 04/01/2013 - 13:43

after compiling liggghts bin-reader from within "liggghts_binreader_for_LIGGGHTS2" source, "" is obtained (weird thing is that it's only 117k which is smaller than the downloaded one 143.9 k). After loading it within Paraview successfully, and import dump*.bin, but the results are really in a mess.

Maybe the compilation is incomplete.

richti83's picture

richti83 | Tue, 04/02/2013 - 20:56


for the first issue: the precompiled one is not for PV 3.12.X, so the way you went is right to compile the src yourself.
for the second issue: did you note that the column-order is hardcoded to
id x y z vx vy vz radius mass
where mass can be any scalar value ?

And there is a difference between Liggghts1 and Liggght2 with the size of double-values, so if you are using the latest LIGGGHTS version use the reader for L2 otherwise the old one.


keepfit | Thu, 04/04/2013 - 23:02

thanks, Christian
the above 2 mentioned issued were solved. However, there is a new issue aroused:

Both dump*.liggghts and dump*.bin files can be loaded by PV 3.12 correctly, but when goes into the "Glyph" filter in the Properties setting, the "Scalars" is disabled which means only "Point ID" is selected. In this case, the Glyph Type (sphere) can not be set correctly corresponding to the actual particle radius.

So could I get the old " precompiled_linux_all.tar_.gz" for PV 3.12?



mhk | Fri, 05/31/2013 - 10:46

Hi everyone,
I am new in this area, I mean modelling in LIGGGHTS, VTK files and etc. I am trying to visualize the results of examples of LIGGGHTS. It seems using paraview is easier for me, as I have no idea about installing Python and! I have installed the paraview but the process of adding Plugin for Paraview to read liggghts-dump files directly is not clear for me. could you please explain it with more details(step by step)?Secondly, as the examples are written with a different dump command( not the "dump dmp all custom 100 post/dump_*.liggghts id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius"), is it still possible to use this plug in?

richti83's picture

richti83 | Fri, 05/31/2013 - 20:00

launch paraview, Menue->Tools->Manage Plugins->Load New and load the downloaded *.so file(s). Make sure to set the flag to [x] AutoLoad.

It is possible to leave the file extension unchanged, but than you have to tell paraview what reader it should use (try opening dump_XXXXX.somewhat file and watch the (very) long list of known readers in Paraview.
The background of the change in the script is, that the reader is associated in paraview with *.liggghts files (you know that from windows)

mhk | Mon, 06/03/2013 - 07:49

Thanks for your reply, I have downloaded all files from node/681. but they are unknown files in my windows. So, when I tried to load them through manage plugins I used all files *.*, but nothing happens when I load them!do I need to install another software?or do you have another link that I can download these liggghts_reader .... files?

richti83's picture

richti83 | Mon, 06/03/2013 - 18:19

Did you change the file-extension back to .zip ? Did you unpack the archive ?
I've seen the windows files I published here are very old (paraview 3.12).
Here you can Download the WINDOWS DLL's for Paraview 3.98 (latest stable):
I'll prepare the Plugins for the upcoming Paraview 4.0 in near future.

mhk | Wed, 06/12/2013 - 08:21

thanks for your king hints. I had paraview 4, I installed paraview 3.98 and I used "" as plugin. but still I cannot visualize dump files. I used the command "dump dmp all custom 100 post/dump_*.liggghts id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius" in my input file and I have got some dump.liggghts in my 'post' folder, but when I am trying to visualize them, nothing happens. I also cannot import the infolabelfilter.xml ((node/706)I don't know if this is compatiible with paraview 3.98). I just can visualize my geometry stl file without particles!I tried to add the but it didn't help. I was wondering if you may know what is wrong with this. many thanks again.

richti83's picture

richti83 | Wed, 06/12/2013 - 19:18

you need to load the plugin in paraview first:
tools->manage plugins->load new: point it to liggghts_reader.dll

should look like this:

check the autoload checkbox.
restart paraview.
Open-> open dump*.liggghts
the tree and the information tab should look like this:

mostly the first dump-step is empty (because there are no particles inserted at first iteration) so just scroll forward in time with the VCR control
Another mistace my students often do is to display white points in front of a white background, so if you successfull openend the dump** files in Paraview change the color-by dropdown to velocity (v) instead of solid color.

to enable sphere rendering instead of simple points read chapter 2 here:

mhk | Thu, 06/13/2013 - 05:34

the first part is OK, it looks like exactly mine. I had loaded liggghts_reader. I had also read the attached pdf, but, for on-screen-display, I need to add a new filter which I cannot(as I said in my previous message InfoLabelFilter.xml). I am not sure if the one in node/706 is OK.
tnx again

richti83's picture

richti83 | Thu, 06/13/2013 - 17:44

The OSD is a totaly different tool, it can be used to display the current simulation time. I think it is not needed anymore because you can use a so called python-programmable filter in Paraview > 3.14.1 to achive this.
Does the tree looks like in my screen ? What happens when you hit menu->open->dump*.liggghts ?
Do you have the liggghts file extension at the bottom of the fileextension selectbox like this ?

mhk | Fri, 06/14/2013 - 03:24

yes it is exactly like yours. It is fine now. tnx

jeremypeirson | Wed, 07/03/2013 - 11:09

Hi, amazing work on the software, but I'm afraid when I try to download the Windows dll file the file name is different (Windows saves it as "download"), and I cannot extract the file.

jeremypeirson | Wed, 07/03/2013 - 11:16

Ok, I apologise, I posted this before reading the comments above. I've downloaded a working Windows archive. Now however when I try and load the plugin I get an error message saying I'm missing the VTKpluginLoader. It then gives me an address to a non-existent path. Is this my Paraview version, or is that path coded into the .dll?

jeremypeirson | Wed, 07/03/2013 - 12:12

Ok, so I realised I needed to use Paraview 3.98, so I'm using that. I can add the reader now, but only one liggghts plugin appears in the list. And when I try run the update Paraview crashes

mhk | Tue, 07/30/2013 - 08:34

I have problem with visualizing by using this method, I have two different particle size but when I visualize them, they are shown in the same size. any idea how to fix it?I am using pointSprit_plugin and liggghts_reader.

richti83's picture

richti83 | Tue, 07/30/2013 - 12:09

If you use PV3.98.x you should start it with --use-old-panels. Than follow the steps in chapter 2 here:

In the Object-Inspector in the 'Display' Tab set 'scale by' to radius. Then hit the button „Edit
radius transfer function“ and set it to proportional.

Note: the button "edit radius transfer function" ist not visible in the new object inspector ov pv 3.98. in pv 4.x they reverted this gui element back so it IS visible without --use-old-panels.

mhk | Wed, 07/31/2013 - 03:36

thank you again for your help. I use paraview 3.98.1. Just two points, first, where is this "use-old-panels"? Second, I don't have "liggghts_binary_reader" & "liggghtspanel" plugins! where can I download them? I think I need to add them to my plugins, don't I?

richti83's picture

richti83 | Wed, 07/31/2013 - 20:58

you add it at the command line.
in windows edit the link-settings at field "target":

C:\LIGGGHTS\ParaLIGGGHTS\ParaView\bin\paraview.exe --use-old-panels

in linux I would make a new alias in bashrc

alias paraview = "/home/me/ParaView/build/bin/paraview --use-old-panels"

The binary reader is only needed when you dump binary particle positions (seems a little bit faster than text files) - you don't need it for small simulations. The liggghtspanel is a totaly different tool but not finaly released yet (bc no founding).

The particle rendering only depends on pointsprites. The particle positions depends on liggghts_reader Plugin.
Keep it simple !

DAVID RIVERA TAPIA | Wed, 08/07/2013 - 16:33


I have a problem when cmake is compiling paraview an error with vtk appeared and i dont know how to solve it.

The error is like this:

/media/raidhd/home/daron/src/ParaView-3.14.1-Source/VTK/Utilities/ftgl/src/FTFont.h:32:19: note: ‘ftgl::FTFont’
/media/raidhd/home/daron/src/ParaView-3.14.1-Source/VTK/Rendering/vtkFreeTypeUtilities.cxx:1689:11: error: ‘font’ was not declared in this scope
make[2]: *** [VTK/Rendering/CMakeFiles/vtkRendering.dir/vtkFreeTypeUtilities.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [VTK/Rendering/CMakeFiles/vtkRendering.dir/vtkFreeTypeTools.cxx.o] Error 1
make[1]: *** [VTK/Rendering/CMakeFiles/vtkRendering.dir/all] Error 2

P. S. i'm using paraview source tree


richti83's picture

richti83 | Sat, 01/10/2015 - 19:49

I've set up a GIT Repository to handle the source code and some precompiled versions of my Readers.
binary_reader => LIGGGHTS(R) binary dump files

dump dmp all custom 1000 post/dump*.bin id x y z vx vy vz radius mass

bond_reader => Bondchain reader

compute b1 all property/local batom1x batom1y batom1z batom2x batom2y batom2z batom1 batom2 btype
dump bnd all local 1000 post/bonds*.bond c_b1[1] c_b1[2] c_b1[3] c_b1[4] c_b1[5] c_b1[6] c_b1[7] c_b1[8] c_b1[9] #x1 y1 z1 x2 y2 z2 id1 id2 typeofbond

forcechain_reader => particle contact network reader

compute fc all pair/gran/local id pos force
dump forcechain all local 1000 post/fc*.dump c_fc[1] c_fc[2] c_fc[3] c_fc[4] c_fc[5] c_fc[6] c_fc[7] c_fc[8] c_fc[9] c_fc[10] c_fc[11] c_fc[12] #x1 y1 z1 x2 y2 z2 id1 id2 periodic fx fy fz

text_reader => particle position reader

dump dmp all custom 1000 post/dump*.liggghts id type x y z vx vy vz fx fy fz omegax omegay omegaz radius mass

rigids_reader => reader for rigid multibodies

compute bid all rigid property id #body ID
compute btype all rigid property type #clump type
compute xcm all rigid property xcm #center of mass
compute fcm all rigid property fcm #force at center of mass
compute quat all rigid property quat #rotation arround COM
compute vel all rigid property vcm #velocity of COM
dump rigids all local 1000 post/rigids*.dump c_bid c_btype c_xcm[1] c_xcm[2] c_xcm[3] c_quat[1] c_quat[2] c_quat[3] c_quat[4] c_vel[1] c_vel[2] c_vel[3] c_fcm[1] c_fcm[2] c_fcm[3]

Note: compute rigid is only available in LIGGGHTS(R)-Premium

jshan432 | Fri, 09/29/2017 - 19:59


I am new to using LIGGGHTS and Paraview, but your forum posts have been very helpful up to this point. I am attempting to use your plugin to import dump files straight into paraview, but when I follow the instructions given above about adding the plugin, I'm getting the following error message:

ERROR: In /Users/kitware/dashboards/buildbot-slave/8275bd07/build/superbuild/paraview/src/ParaViewCore/ClientServerCore/Core/vtkPVPluginLoader.cxx, line 388
vtkPVPluginLoader (0x610000cbf020): dlopen(/Users/lab_home/Downloads/, 1): no suitable image found. Did find:
/Users/lab_home/Downloads/ unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/Users/lab_home/Downloads/ unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

Are the available plugins compatible with Paraview 5.4.1 and do you have any advice on how to fix this issue?



Gulniamat | Thu, 03/31/2016 - 16:56

hi ....i am trying to simulate a mixer that contain glass beads with impeller in the middle through LIGGGHTS. when i run the code and see the result in paraview its shows particles with spaces in between them.i want to see the particles in packed form means with no spaces as we see in real situation,is there any problem with code in LIGGGHTS or its the problem with paraview setting or it always shows like this?Kindly guide me,i am new user of LIGGGHTS. I am very tense about my results.i used different strategies like i increased # of particles nd increased run time as well but problem is still unsolved.Also it does not show the exact particles size.