[ase-users] LAMMPS Trajectory dump file to extendedXYZ custom parameters

Abhijeet Dhakane abhirajdhakane2010 at gmail.com
Tue Jun 2 21:54:05 CEST 2020


 Hello,

I have lammps dump file (trajectory) in following format.

ITEM: TIMESTEP
501000
ITEM: NUMBER OF ATOMS
1000
ITEM: BOX BOUNDS pp pp pp
0.0000000000000000e+00 2.7500000000000000e+01
0.0000000000000000e+00 2.7500000000000000e+01
0.0000000000000000e+00 2.7500000000000000e+01
ITEM: ATOMS type x y z fx fy fz c_keng c_eng mass id
1 0.161303 -0.13692 27.4967 -0.518958 1.44351 -0.998551 0.289493 -4.13849
28.0855 1
1 27.431 2.76982 2.67355 1.14793 1.2093 -1.8261 0.222894 -4.15074 28.0855 2
1 2.69197 0.0907951 2.74186 -0.521011 -1.17696 0.372958 0.0206195 -4.19658
28.0855 3
1 2.96499 2.72915 27.4866 -0.700047 2.33357 -0.243868 0.0588419 -4.15339
28.0855 4
1 1.54352 1.52626 1.25266 -2.29776 -1.56517 1.26088 0.00662306 -4.16613
28.0855 5
1 1.28417 4.2658 3.94474 -0.135306 -2.28732 -0.254315 0.106935 -4.16458
28.0855 6
1 4.28623 1.24612 3.93235 0.0519921 2.10204 0.47689 0.103425 -4.16945
28.0855 7
1 4.29929 4.20633 1.40497 1.28975 -2.11527 -1.39339 0.114491 -4.13871
28.0855 8
1 5.19262 27.2979 0.0463334 2.04882 1.38252 -1.03927 0.141494 -4.14959
28.0855 9
1 5.79476 2.5993 2.56687 -3.07517 1.84936 1.97585 0.388581 -4.10221 28.0855
10

I would like to convert given dump file into extend XYZ with the sum of
"c_keng" parameter (column variables) in the comment (header of extXYZ)
like of extendedXYZ like as follow:
1000
Lattice="27.5 0.0 0.0 0.0 27.5 0.0 0.0 0.0 27.5"
Properties=species:S:1:pos:R:3:c_keng:R:1:c_eng:R:1:forces:R:3 *energy="_JSON
0.0"* *instead  energy="sum of array (c_keng) at every frame"* pbc="F F F"
H        0.18799400      -0.02854550      27.35690000       0.16047400
 -4.25133000       0.19925900       0.15968700       1.18709000
H        0.42149800       2.65156000       3.08710000       0.05051810
 -4.11243000      -2.42461000      -0.67427300      -1.70113000
H        2.93800000       0.06241060       2.69486000       0.08774280
 -4.02904000       0.95560500      -1.66023000       1.78616000
H        2.71791000       2.48304000      27.64030000       0.27919900
 -4.07487000       1.45015000       2.73423000      -1.49880000
H        1.47313000       1.20343000       1.47406000       0.37260300
 -4.13500000      -1.40448000       0.25985600      -0.07530590
H        1.53047000       4.27182000       4.17967000       0.02550600
 -4.18544000      -0.08961830       0.43731600       1.42851000
H        4.10151000       1.65867000       4.17805000       0.31862200
 -4.21833000       0.06896430      -2.31936000      -0.77822000
H        4.19290000       4.05041000       1.43974000       0.22438900
 -4.15162000      -1.57299000       0.40202600       0.14793200

How should I proceed? I can able to make a sum of the c_keng by using
get_array function but how should I implement it for entire trajectory?

Thanks,
Abhijeet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200602/ceadd17b/attachment.html>


More information about the ase-users mailing list