compute coord/atom group Question

Hello,

I’m using stable LAMMPS from March 3 2020.

I’m running a simulation with at least four types of atoms (sometimes I run it with 4 types, sometimes with 5). I want to record every 500th timestep if each atom of type 3 is near (within a distance of 1.8) an atom of type 4 or not. It seems like compute coord/atom should does the job, but I’m confused when reading the webpage for the command. Currently I’ve been trying either of these:

compute myPress 3 coord/atom cutoff 1.8 4
dump 2 all atom 500 tmp.dump id myPress[*]

OR

compute myPress 3 coord/atom cutoff 1.8 group 4
dump 2 all atom 500 tmp.dump id myPress[*]

which give the error:

ERROR: Could not find compute group ID (src/compute.cpp:61)

I’m wondering what the correct syntax is here to get the dump output I want.

Best,
Christian

please have a closer look at the documentation and specifically read the general documentation for the compute command and not just for the specific compute you are interested in.

the error message is quite clear and in combination with carefully reviewing the documentation should provide sufficient information to resolve this on your own.

axel.

It is c_mypress.

Instead of
id myPress[*]

Use
c_myPress

that is needed, too, but that is not the cause of the quoted error message.