Fix ase_to_atom_lattice due to changes in ASE atoms object
In previous versions of ASE (at least 3.20.1), it does not seem like atoms.positions
returns negative numbers:
from ase.cluster import Octahedron
atoms = Octahedron("Ag", 5, cutoff=2)
print(atoms.positions.min(), atoms.positions.max())
0.0 8.18
However, in the newest version (3.21.1), the structure seems to be centred around 0, leading to negative values. Running the same script as above returns:
-4.09 4.09
This lead to the unit test for this failing: https://gitlab.com/atomap/atomap/-/jobs/982545214#L3624
This merge request fixes this, essentially by offsetting the negative coordinates back to positive values, and also adding a little bit of padding around the structure.
However, I haven't used the ASE functionality that much myself, so I'm unsure if this will break people's workflows.