lammps/lammps

[BUG] Inconsistent syntax for dump_modify triclinic/general

nnn911 opened this issue · 0 comments

Summary

Applying the dump_modify 1 triclinic/general setting should work identically for both the atom and the custom dump style. Right now, one needs to set: dump_modify 1 triclinic/general when dump 1 references an atom dump style and dump_modify 1 triclinic/general yes when using a custom dump style.

LAMMPS Version and Platform

  • LAMMPS development branch (commit 628531d) (LAMMPS (17 Apr 2024))
  • Windows 11 (22631.3527)
  • cl.exe --version Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33522 for x64

Expected Behavior

dump               3 all atom 100 3.dump 
dump_modify   3 triclinic/general yes

should set the dump to output in triclinic/general format.

This would match the behavior for the custom dump style:

dump               1 all custom 100 1.dump id type x y z
dump_modify   1 triclinic/general yes

And should work as stated in the manual:

triclinic/general arg = yes or no
...
The triclinic/general keyword only applies to the dump atom and custom styles. It can only be used with a value of yes if the simulation box was created as a general triclinic box. See the Howto_triclinic doc page for a detailed explanation of orthogonal, restricted triclinic, and general triclinic simulation boxes.

Actual Behavior

When using:

dump               3 all atom 100 3.dump 
dump_modify   3 triclinic/general yes

in a lammps input script, I get the following error message:

ERROR: Unknown dump_modify keyword: yes (D:\Work\lammps\src\dump.cpp:1320)
Last command: dump_modify 3 triclinic/general yes

However changing the command to

dump               3 all atom 100 3.dump 
dump_modify   3 triclinic/general

seems to work as intended.

Steps to Reproduce

The following lammps input script can be used to reproduce the bug:

lattice       custom 1.1 a2 0.0 0.5 0.5 a3 0.5 0.0 0.5 a1 0.5 0.5 0.0 basis 0.0 0.0 0.0 triclinic/general
create_box    1 NULL 0 1 0 1 0 1
create_atoms  1 box
mass          * 1.0

pair_style    lj/cut 1.2
pair_coeff    * * 1.0 1.0

neighbor      0.0 bin

dump               1 all custom 100 1.dump id type x y z
dump_modify   1 triclinic/general yes

dump               3 all atom 100 fcc.primitive.general.atom.dump 
dump_modify   3 triclinic/general yes

run           0