You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It takes quite a long time to read and transfrom the 'trajectory.xyz' file. I would suggest to use the method provided by pymatgen/ase, which is faster. The code example is shown below:
fromase.ioimportread, writeimportnumpyasnpfrompymatgen.io.aseimportAseAtomsAdaptorfromaseimportAtomsfrompymatgen.io.lammps.outputsimportparse_lammps_dumpsconfs=parse_lammps_dumps('trajectory.xyz') # this is a generatorsymbols= ['La'] *24+['Zr'] *16+ ['O'] *96+ ['Li']*56ats= [Atoms(symbols=symbols, positions=conf.data.values[:, :3],
cell=conf.box.to_lattice().matrix, pbc=True) forconfinconfs]
write('LLZO.xyz', ats)
ats=read('LLZO.xyz', ':100')
Besides, I suggest to rename the 'trajectory.xyz' as 'dump.trajectory'. For it is more like a lammps-dump output rather than '.xyz' type file. Because '.xyz' hints the user to use ase.io.read to load the data.
The text was updated successfully, but these errors were encountered:
JianxingHuang
changed the title
Suggestion for read and transform trajectory
Suggestion for read and transform trajectory ~enhancement
Jun 4, 2020
JianxingHuang
changed the title
Suggestion for read and transform trajectory ~enhancement
Suggestion for read and transform trajectory \
Jun 4, 2020
JianxingHuang
changed the title
Suggestion for read and transform trajectory \
Suggestion for read and transform trajectory
Jun 4, 2020
It takes quite a long time to read and transfrom the 'trajectory.xyz' file. I would suggest to use the method provided by pymatgen/ase, which is faster. The code example is shown below:
Besides, I suggest to rename the 'trajectory.xyz' as 'dump.trajectory'. For it is more like a lammps-dump output rather than '.xyz' type file. Because '.xyz' hints the user to use ase.io.read to load the data.
The text was updated successfully, but these errors were encountered: