CederGroupHub / chgnet

Pretrained universal neural network potential for charge-informed atomistic modeling https://chgnet.lbl.gov
https://doi.org/10.1038/s42256-023-00716-3
Other
215 stars 55 forks source link

[Feature Request]: .xyz problem using ASE writer from .traj to .xyz (.traj generated by CHGNET) #117

Closed caralvijo closed 5 months ago

caralvijo commented 5 months ago

I'm using MD2D to calculate diffusion so, I need an xyz file but when I use the ASE writer as follows there is a value error:

import ase
from ase.io import write
from ase.io.trajectory import Trajectory
traj = Trajectory('file.traj')
write('file.xyz', traj)
ValueError: not enough values to unpack (expected 6, got 3)

Do you have an idea to solve this?

BowenD-UCB commented 5 months ago

If you index the trajectory object, can you get the corresponding ase.Atoms ? If there's no issue with the trajectory object, this might be something related to ASE

caralvijo commented 5 months ago

Yes, I can get the ase.Atoms, so I will check ASE documentation.