stfc / janus-core

Tools for machine learnt interatomic potentials
https://stfc.github.io/janus-core/
BSD 3-Clause "New" or "Revised" License
10 stars 7 forks source link

Trajectory errors for non-single point calculations #241

Closed ElliottKasoar closed 1 month ago

ElliottKasoar commented 1 month ago

SinglePoint now reads all images from a file by default, meaning that if we try to read a file containing multiple structures and pass this to calculations, such as geomopt, which that only take individual structures, we get errors such as:

AttributeError: 'list' object has no attribute '__ase_optimizable__'

The simplest solution would be to raise an error if a list is passed (and probably set the default read_kwargs index to 0 for the CLI, allowing other integers, but not ":").

Alternatively, we could allow sequences of atoms for all calculations, operating on each in the same way. For the CLI, we'd probably still want to change the default.