Forums
I am interested in using matlab matrices for post processing the data. Right now, I am converting the LIGGGHTS documents to VTK, using paraview I am exporting to CSV and using a numpy script I am converting to matlab matrices. I was wondering there was a way to directly convert the Liggghts file into CSV/Matlab Matrices.
Thanks
SIddharth
You can write a Matlab script
You can write a Matlab script (or better a function) to read dump-files and return the matrix. I did something similar years ago, but don't ask me for the code. This one I may not share.
Happy coding ... ;-)
Andreas
Code Matlab
You can write code matlab to begin from Liggghts extract to .txt format ---> matrice by Matlab. Code Matlab can be "fopen -- fread---fclose--strrep---str2num"
Best regards
Vu
In reply to Code Matlab by Vu Viet Dung
Hi
Do you know Matlab could read binary txt file?
It seems LIGGGHTS dump files in binary, and Matlab needs the txt file should be in ACSII
In reply to Hi by zumack
LIGGGHTS can
Hello,
LIGGGHTS can dump as a binary but it normally dumps as a text file.
What command are you using for your dumps?
It should be similar to
dump dmp all custom 1000 post/dump*.liggghts id mol type x y z vx vy vz fx fy fz omegax omegay omegaz radius
Matlab could read a binary file but you would need to know the format of the binary file.
As far as I know, no one has made a script for MATLAB/Octave that reads liggght binary dump files.