stfc / janus

collection of scripts to train and generate data for machine learnt interatomic potentials
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Frames incompatible with ASE functions #64

Open ElliottKasoar opened 1 year ago

ElliottKasoar commented 1 year ago

Frames inherit from ASE's Atoms class, but due to differences in attributes, many functions unexpectedly break.

For example, attempting to print a single Frame raises AttributeError: 'numpy.ndarray' object has no attribute 'get_chemical_formula'.

Errors also occur when attempting to calculate distances between Frames using ase.geometry.distance, as this calls atoms.copy(), which raises TypeError: __init__() got an unexpected keyword argument 'cell'.

Unexpected arguments could be fixed by adding **kwargs, but Frame currently also requires arguments that would be missing.

The same error (AttributeError: 'numpy.ndarray' object has no attribute 'formula') is also thrown when attempting to write a .cif file through Dataset.write.