the new read_data command

You already have that, as long as you are willing to read/write data
files instead of a restart files and don't do anything too crazy with
atom types, bond types, etc. The only thing you lose is some file
storage efficiency and some precision in positions and velocities.

2015-12-03 16:14 GMT-07:00 Jacob Gissinger <[email protected]...>:

we can argue about what if, and other hypothetical things, but i
believe in "put up or shut up" and "show me the code".

so here we are. i spent about 4 hours wall time on this (~2 hours CPU
time, since at the same time i've been baking bread, having dinner and
preparing a panettone) on the attached python code, which can serve as
a quick and dirty example for how to merge data files. please note,
that python is one of my weaker programming languages (i'd be easier
for me to do this in Tcl or perl, but this is good practice and that
is why i did it).

this assumes a standard class 1 force field and currently doesn't
handle image flags correctly or triclinic cells (which is all a
tricky business, but not overly). there is a lot of code redundancy
and it could all be made more flexible and clean and readable. if
somebody would spend another day or two on this to clean it up and
refactor it. it could be a very nice and useful piece of code.

nevertheless, if as lousy a python programmer as me, can whip
something like this up so quickly, i'd consider it quite acceptable to
expect "normal users" to do something similar within a reasonable time
frame. there really isn't a good reason to force such a feature into
the main code, where this all becomes extremely complex and error
prone to implement.

the different variants for different purposes could be e-mailed to
steve and then distributed with LAMMPS in the tools folder and then
the amount of wasted time is minimal.

axel.

mergedata.py (18.5 KB)

Sorry Axel, but this proves nothing. Many users are far less proficient in their best language than you are in your wurst.

Aidan

Sorry Axel, but this proves nothing. Many users are far less proficient in their best language than you are in your wurst.

well, if they are not doing it by themselves, there should be somebody
around that could do such a programming job or that could be
contracted (e.g. student interns) or otherwise enticed. i cannot
imagine that there would be an entire computational group or
department with nobody around that has sufficient skills (i don't
expect that they need to hack it together over nigh).

axel.

I’ll also note that LAMMPS will convert a restart file to a data file

for you as a one-liner via the -r command-line switch. So reading

a restart file, followed by a data file is no different conceptually

than reading 2 data files. You lose some persistent info from the restart

file, but that info is exactly what makes little sense to keep if

you are reading a subsequent data file.

Steve

Thanks, All. That makes sense