Lammps dynamic group

Dear all,

I’m trying to simulate an atomic deposit process in a cubic box.

During the MD process, I want to set the top (along Z axis) region to be the deposit region, with an NVE ensamble,
the middle region to be the substrate with an NVT ensamble,
the bottom region to be the fixed substrate.

Since during the deposition, the size of the top and middle region decrease and increase, respectively,
I want to change the margin of the top and middle region.

I had tried to use a script below,

the error message shows that you are using a incorrect syntax for your expansion. {name} is for an immediate expansion of a variable called “name”. you probably wanted to use $(expression), which is for expanding an expression as an “immediate equal style variable”.

details matter!


Dear Axel,

Thanks a lot for your advice, after I change {16.0+step*0.000002*0.85} to (16.0+step0.0000020.85), the program runs without error.

But the temperature of the system keeps increasing (not kept arround 2000K as I set for the “middle” NVT region),
I think perhaps the $(16.0+step0.0000020.85) command does’t set the dynamic region properly.

I havn’t define the varible “step” and I just take it as a default variable of “total timestep” in LAMMPS,
I’m not sure if in this way it is right to set a dynamic group (boundary grow as simulation time increase).

Below is my full input script, please have a look and tell me if there are some mistakes…

You are mistaken in how variable expressions can be used in regions and how dynamic groups are defined.
Check the log file to see what commands your input expands to and review the documentation for the region and group commands to see how things have to be done.