Hi there! I will send this to the lammps and the jmol list, because any solution will probably involve either of the programs
I have problems when reading a lammps xyz trajectory with jmol
It’s a system consisting of LJ particles and a metal, in different parts of the box, obviously
pair_style hybrid eam lj/cut 10.0
pair_coeff 1 1 eam Pt_u3.eam
pair_coeff * 2 lj/cut 0.00673850588 3.165648
…
dump 1 gbigbox xyz 10000 rawdump.1.xyz
I run this as a parallel job on 8 processors.
Afterwards I substitute the atom types 1, 2 with awk into something that jmol can read (Se is chosen for its nice color ;):
awk ‘{if ($1 == ‘1’){print "Pt “,$2,” “,$3,” ",$4}else if($1 == ‘2’){print "Se “,$2,” “,$3,” ",$4} else{print $0}}’ $1 > tempdump.$1.xyz
I make a file with the 10 last snapshots. From that file I make another file, containing the first of those 10 snapshots.
This opens correctly in jmol, so far so good.
Then, I try to open the file with all 10 last snapshots, and open it with ‘load trajectory’
The last snapshot is correct:
http://www.molmod.com/~schraven/jmol/last_frame_out_of_ten__ten_frame_file.jpg
But it created a misrepresentation of the first 9 of these 10 snapshots: some of the atoms within the metal and the LJ layer seem all mixed up
http://www.molmod.com/~schraven/jmol/first_frame_out_of_ten__ten_frame_file.jpg
That happening is not very possible due to the quite solid nature of the metal
I also checked by just reading the first snapshot of the 10 from a file with only this snapshot in it:
http://www.molmod.com/~schraven/jmol/first_frame_out_of_ten__single_frame_file.jpg
That is the same structure as the previous picture, but with the correct distribution of atom types.
My conclusion is that jmol assumes that the atom order in the last frame of a trajectory is the order in all frames, and that lammps does not keep the atom order constant in the printing of xyz files. For all practical purposes, is there a way to make lammps always use the same order of atoms?
I hope anyone can shed some light on this issue!
Greetings, Pim