I would like to draw an S-S curve by modifying the in file

displace_atom gblow y delta -${lydelta} 0 units box
displace_atom gbhigh y delta 0 ${lydelta} units box

An error occurred because there was no displace_atom ‘style’, so I added ‘move’ or ‘random’ or ‘ramp’. I am getting an error though.

None of the command here corresponds to the documentation, so of course there is an error… Where did you add ‘move’ or ‘random’ or ‘ramp’?

displace_atom gblow move y delta -${lydelta} 0 units box
displace_atom gbhigh move y delta 0 ${lydelta} units box

I did this. :face_holding_back_tears:

What is the error message?
What is your LAMMPS version?

The error comes out like this:
ERROR: Unknown command: displace_atom gblow y delta -${lydelta} 0 units box (src/input.cpp:303)
Last command: displace_atom gblow y delta -${lydelta} 0 units box

When I wrote ‘move’ or ‘ramp’ or ‘random’
ERROR: Unknown command: displace_atom gblow (move or ramp or random) y delta -${lydelta} 0 units box (src/input.cpp:303)

My Lampps version is 1.2.

Thanks for always helping me. I’ve been learning Lampps for a week now and I’ve been reading the command site carefully, but I’m still exhausted. :disappointed_relieved:

The error message is pretty clear. There is no command called displace_atom. When you look at the documentation that @simongravelle pointed out to you, the name of the command is displace_atoms. This is a subtle but significant difference. Checking your spelling should always be the first thing to do when LAMMPS complains about something unknown or illegal.

Please note that the spelling of the software is LAMMPS not Lampps. Also there is no version 1.2; never was, never will be. The LAMMPS version is a date. Please see: 1.2. What does a LAMMPS version mean — LAMMPS documentation

Oh thank you! atom → atoms seems to have taken one step further.
This is a new error.
ERROR: Expected floating point parameter instead of ‘y’ in input script or data file (src/displace_atoms.cpp:182)

Oh sorry. I would now know it correctly as ‘LAMMPS’.

is this the version?
LAMMPS Shell version 1.2 OS: Windows 10 21H2, Windows ABI 6.2 (9200) on x86_64
MinGW-w64 64bit 9.0 / GNU C++ 11.2.1 20210728 (Fedora MinGW 11.2.1-3.fc35) with OpenMP 4.5
‘LAMMPS (15 Sep 2022)’

And - again - the error message is self-explanatory. You need to carefully compare your command with the documentation. Obviously, your command is not correct.

The very last line of this block has a date, 15 Sep 2022. So this is obviously the version.
This is explained in the manual page I pointed out to you.

Please note that people providing answers here volunteer their time and thus you have to use this resource in a responsible way. The first step toward that, is to properly exhaust the help and assistance that is included in the LAMMPS manual and second to search the forum archives and the web. If the cause of your problems continues to be trivial issues like in this conversation, you may make people feel that you don’t put the same effort and care into your questions and application of the available documentation / information than people put into their responses.

1 Like