From: Tom (
Date: Fri May 31 2024 - 12:55:12 CDT


I am using VMD version 1.9.3 and LAMMPS version 2 Aug 2023 - Update 1 On
Windows 10 Home. I downloaded and installed binaries of both.

My LAMMPS input script is below. I am able to connect VMD to a LAMMPS IMD
simulation on my local machine (, port 5678), and VMD displays the
trajectory steps just fine. However I cannot seem to apply any forces to
atoms using “Mouse -> Force -> Atom”. I do see the red force arrows on the
atoms, but I don’t believe any forces are being applied based on:

1. The structure does not bend as it does when I use the addforce fix with
a force equal to or less than I have set for the IMD fscale. I’m using real
units in LAMMPS and a fscale of 10 would be 10*1(kcal/mol)/Angstrom, and
that should produce a nice bend in the structure. I’ve also tried very
large numbers like 20,000.

2. The LAMMPS IMD fix documentation says “If IMD control messages are
received, a line of text describing the message and its effect will be
printed to the LAMMPS output screen, if screen output is active.”. I do not
see anything like this go by in the terminal while LAMMPS is running. This
makes me think the force IMD commands from VMD is not getting to LAMMPS.
Though I can start and stop the simulation from the VMD IMD Connection

I’ve checked that both LAMMPS and VMD have firewall permissions. They
appear to.

Could anyone please recommend something else to try? Thanks in advance.


#LAMMPS input file

# Initialization

variable myfile string DNW

log ${myfile}.init.log

units real

atom_style molecular

boundary f f f #fixed non-periodic

bond_style morse

angle_style harmonic

pair_style lj/cut 14

special_bonds lj 0.0 0.0 0.5

# System definition


include paramV04.lammps

# set groups

group lonsfree type 1 2

group anchorgroup type 4 5

group forcegroup type 3

# Dynamics

velocity lonsfree create 6 48455 mom yes rot yes

fix 1 all nve

#freeze the anchor atoms

fix anchor_fix anchorgroup setforce 0.0 0.0 0.0

velocity anchorgroup set 0.0 0.0 0.0

#make IMD connection

fix comm all imd 5678 unwrap off fscale 20.0 trate 1 nowait off

timestep 1.0 #femtoseconds

dump mydmp1 all atom 100 DNW.lammpstrj

thermo 1000