ENH: custom atoms-arrays in database
Many calculators and parsers introduce custom arrays in ase.Atoms
. These are not yet supported in ase.db
.
This merge request introduces a small way of achieving the same.
Changes:
- The row object writes the custom arrays into its _data
- When
row.toatoms
method is called, it checks its _data for custom arrays and adds them to atoms object - When writing new db entries, the data is updated with row._data, to ensure custom arrays are passed
- When updating db with an atoms object the custom arrays in oldrow are popped.
This merge request also adds unit test for the same.
Edited by Yashasvi S. Ranawat