Hello Everyone,
I need help in modifying the parameters written by the ‘xyz’ style of the dump command. If I have 864 Al atoms, the command ‘dump 1 all xyz filename.xyz’ gives:
864
Atoms
1 24.2977 0.0956248 0.365472
1 1.70627 1.86516 0.390892
1 1.53675 23.9141 1.80244
…
…
I want to visualize this coordinate file using jmol. For this, I need Al everywhere in the first column in the above file instead of 1. That means, I need the output as
864
Atoms
Al 24.2977 0.0956248 0.365472
Al 1.70627 1.86516 0.390892
Al 1.53675 23.9141 1.80244
…
…
How can I do this in lammps? Please give me suggestions.
Kirit Lad
Lecturer
Applied Physics Department
Faculty of Technology & Engineering
M. S. University of Baroda
Vadodara-390001, Gujarat, India.
Cell: +919428564931
Res.: +91-02692229772
|
Just use “AWK” command in linux.
Fisrt delete the first several header lines
Then, For example "awk ‘{print “Al”, $1, $2, $3}’ filename.xyz > filename.jmol
Now add the header lines back.