Hi I have a lammps dump file, created by OVITO, with the following data fields:
ITEM: ATOMS id type Coordination x y z AtomicVolume VoronoiIndex3 VoronoiIndex4 VoronoiIndex5 VoronoiIndex6
I can read the file using code such as: atoms=read_lammps_dump_text(fileobj=open(‘voro.dump’,‘r’), index=-1)
while it’s easy to get positions using atoms.get_positions(), I don’t know how to get the property such as AtomicVolume of the atoms. Thanks for your help.
It seems that columns that start with “f_”, “v_” or “c_” will be added to the atoms.arrays . If the column name doesn’t include one of those tokens I think it is probably ignored, but I don’t have a sample file to check.
It looks like a simple hack that works is to edit the column name to “f_AtomicVolume”. Then in the resulting Atoms object(s) we can get the data as atoms.arrays['f_AtomicVolume'].
I don’t know enough about LAMMPS to say whether it would make sense for ASE to handle this differently, but perhaps this workaround will suit you? It is quick to make this edit to the file with sed.