read_dump command: replacing type of atoms

I’ve just come to realize that when reading a dump file with the read_dump command the system does not replace the types without throwing any error or warning, even though read_dump has a type column.

I don’t know this is unintended, but it looks like undocumented/confusing behavior (or maybe it just wasn’t clear enough for me from the docs).

The doc page doesn’t list “type” as a field that it reads from the file.
It only mentions that if you use the “add” keyword to add new
atoms, that they must have a type. Otherwise the type is ignored.

Why would you want to change the type of your atoms?


in this case, i’ve been working on some legacy input file a coworker had done, that used dump files to restart runs (instead of reading data files). when i changed that to data files, i saw different results in energy, and traced it back to the read_dump.

the original input script had a read_dump line after the creation of random atoms, that was toggled on or off, depending on whether we wanted to read a dump or start from random initial conditions. i now added the purge yes argument to the original input file to reproduce the desired behavior.

bottom line: I don’t want to use read_dump for that (I believe that data/restart files are more suitable for this), but for some time this legacy code will be used here, and maybe some other person ran into the same problem.

bottom line 2: not even my bottom-lines are properly summarized, and are as long as the rest of the mail