Add per-atom information in read_structures
This MR adds the per-atom information that is parsed by read_structures as arrays to the Atoms objects that are being returned.
Prior to this MR, this information was only included in the info dictionary of the Atoms object, which is also from where this information is taken by the get_parity function.
Specifically, this pertains to the forces (forces_*.out) out charges (charges_*.out, bec_*.out).
Possibly one should also consider per-atom information from TNEP observers (which are currently not supported afaict).
Considerations
- Keeping per-atom information in
Atoms.arraysis more consistent with the ase design. - It makes parsing this information more transparent.
- When writing an
Atomsobject to formats with support forinfodicts such as extxyz, the "comment" line (second line of extxyz) becomes very long with the current approach. - Having the information in both the
infodict and thearraysis unnecessarily increasing the object size.
Are there other considerations/potential issues?
Todos
Decision
-
Decide whether to keep the
infodict approach or move to thearraysapproach (see "Considerations" above)
Dependent todos if we move to arrays
-
remove adding arrays to
infodict inread_structures -
adapt
get_parityfunction to use information fromarrays - add tests
Related aspects to consider
- How do we handle per-atom tensors from TNEP observers atm?
Edited by Paul Erhart