Department of Chemical Engineering

Dr Thomas Rodgers

DL_MESO Tutorial Density Plot

Creating a 2D Density Plot

In the folder where you have run the simulation you can carry out the analysis.

First the creation of on xyz file, this can be opened in VMD just like a vtk file, it is only one frame long, so we would normally run the analysis on the last frame of the simulation:

~/dl_meso_2.6/BIN/HISTtoXYZ.exe

Answer the questions at it runs and this code will output a file called out.xyz.

It is good now to rename this file so it is not written over, where myfile can be a useful name for you:

mv out.xyz myfile.xyz

To further the analysis the file will now have to be rotated so that the x-axis has the variation, i.e. the columns point down the z-axis or the lamellar stripes point down the z- and y-axis. This can be achieved with:

~/dl_meso_2.6/BIN/rotateXYZ.exe

Answer the questions to rotate the file and check in vmd. It is likely that you will need to do this several times, always starting from the original myfile.xyz file to get it correct (make a note of the rotation amounts and directions that worked). This will make an output file called out.xyz

We can now generate an image of the rotated file with:

~/dl_meso_2.6/BIN/density2D.exe

Answer the questions to run the program, normally 1.5 bins per unit works well (e.g. if your box length is 20, then use 30 bins). This will output a file called hist.dat. This file can be visualised with:

python ~/dl_meso_2.6/BIN/density.py

This will load an image which you can look at, then close. It will output a file called density.png (this is assuming that there has been no changes to python).

Back: Example T-shape