libAtoms / extxyz

Extended XYZ specification and parsers
MIT License
16 stars 4 forks source link

lammps #8

Open stenczelt opened 3 years ago

stenczelt commented 3 years ago

Add this code to LAMMPS, to allow an extxyz dump style! I think it would be absolutely great to allow for dumping for a more powerful variant, similar to the custom dump style there, but formatting it according to this extended xyz format.

DQM520 commented 1 month ago

I have download extxyz:pip install extxyz, can I ask how to combine it with lammps? The command I use in lammps is dump 1 all custom ${DUMP_FREQ} methane.xyz id type x y z and I want to dump in extxyz style with energy and force. The extxyz form I want to get is attached. Can you give me some advice? 2 Properties=species:S:1:pos:R:3:forces:R:3 energy=-13486.77734375 pbc='F F F' C 11.480999946594238 1.6349999904632568 1.2079999446868896 3.3895702362060547 -0.8061511516571045 1.0440574884414673 O 11.880999565124512 1.5490000247955322 2.385999917984009 -1.0153744220733643 0.45024925470352173 -1.1317808628082275 4 Properties=species:S:1:pos:R:3:forces:R:3 energy=-13486.77734375 pbc='F F F' H 16.160999298095703 -2.3320000171661377 7.361000061035156 1.2726770639419556 0.4869202673435211 0.26308372616767883 C 16.42799949645996 -2.74399995803833 6.388000011444092 -0.6890028119087219 -0.4337579905986786 1.2225674390792847 H 17.1560001373291 -3.553999900817871 6.4070000648498535 0.23268871009349823 0.009330789558589458 0.4573668837547302 H 16.733999252319336 -2.0299999713897705 5.622000217437744 -0.005286495666950941 0.3279768228530884 0.3452637195587158

jameskermode commented 1 month ago

Support for LAMMPS is not yet implemented. You can use ExtXYZ package to read to ASE atoms objects, and then use ASE's lammps dump/data exports.

DQM520 commented 1 month ago

Support for LAMMPS is not yet implemented. You can use ExtXYZ package to read to ASE atoms objects, and then use ASE's lammps dump/data exports.

I have solved this problem, thank you very much!