Visualizing LIGGGHTS simulations in VMD

Submitted by alexander.polson on Thu, 06/24/2010 - 22:51

Hi Everyone

I wanted to visualize my LIGGGHTS model while it is running using VMD and "fix imd".

So, I compiled-in the USER files "fix_imd.cpp" and "fix_imd.h" (provided in the LIGGGHTS 1.0.3 source). I also added the following line to my input file:

"fix vmd all imd 5678"

The simulation is executed on a Ubuntu Linux PC and gives the following two lines of error:

bind to socket failed: Address already in use
ERROR: LAMMPS Terminated on error in IMD.

I found that by choosing a few random port numbers instead of 5678 (>1000) I get the same result regardless of weather the port number is listed in the "/etc/services" file.

Perhaps the port needs to be enabled specifically, but I could not find out how to do this. I also noted patches on the LAMMPS website for the above two files, but I did not try that.

Has anyone tried this in LIGGGHTS? I would appreciate hearing from you.

Kind regards

Alexander

ckloss's picture

ckloss | Fri, 06/25/2010 - 09:01

Hi Alex,

I moved your post to the post-processing forum. I personally have not yet used VMD, but Lukas, a co-worker of mine, has. I will forward your question to him. But the error sounds somehow more Linux (or VMD) specific...

Best,
Christoph

alexander.polson | Mon, 06/28/2010 - 16:08

Hi Christoph

I found that the fix for my problem already exists. The problem was in the user provided code in the src/USER-IMD directory of ligghts 1.0.3: "fix_imd.cpp".

You can find a patch for an updated version of the above file at:

http://lammps.sandia.gov/patches/patch.24May10

The patch to use starts with:

diff -Naur lammps-23May10/src/USER-IMD/fix_imd.cpp ...

After implementing the patch I re-compiled the code, and then got the expected message from LIGGHTS: "Waiting for IMD connection on port 5678"!

Now my next step is to find out how to set up VMD to make the connection.

If anyone knows about the configuration file that is needed for the group of spheres to be visualized, I will appreciate to hear about how to do this, else I will post if I find it.

Kind regards

Alexander