Illegal compute displace/atom command (5.4 KB)
My program is running with an error
illegal compute displace/atom command
why does this happen?

somebody help me

When reporting error, please always also report which version of LAMMPS exactly you are using and what platform you are running on. Your input seems to be correct for the current version of LAMMPS (3 August 2022).

Dear sir, i am so sorry. This is the first time I’ve asked a question here. As for as I know, the software I’m using is the 2021 version. I use the school’s server to run the program. But don’t know exactly what the platform is.
Attached is the software installation package used by our server.

LAMMPS will tell you what version it is exactly when you run it as the first line of output.

You can get more detailed information using the -help flag when running LAMMPS:

Your platform appears to be some kind of MS Windows, but your installation packages do not look like they are official packages. So there you are on your own. You can find more recent versions of LAMMPS for Windows here: LAMMPS Windows Installer Repository

If you insist on running an older version of LAMMPS, you also must consult the manual that corresponds to your specific version of LAMMPS. The online manual always represents the latest release.

thanks for your help