Skip to content

Conversation

@frostedoyster
Copy link
Collaborator

Metatomic ASE calculators can't handle ase.io.Trajectory unless they are loading their model from a file.

@Luthaf I'm asking you for a "post-merge" review on this one... are you sure we can't handle this case directly in the metatomic calculator and somehow make it compatible with todict()?

@frostedoyster frostedoyster requested a review from Luthaf January 11, 2026 18:01
@frostedoyster frostedoyster merged commit 63312cb into main Jan 11, 2026
4 checks passed
@Luthaf
Copy link

Luthaf commented Jan 12, 2026

are you sure we can't handle this case directly in the metatomic calculator and somehow make it compatible with todict()?

We could, but the two options both have issues:

  • if we do store the model inside the dict, the per-step dict becomes enormous, and blows up the trajectory file
  • if we do not store the mode inside the dict, this will lead to errors when trying to reload the trajectory and recompute properties (which is the intended use case).

We could maybe integrate a similar fix to what you do here, saving models to a temporary files, but this could create some weird errors if the temporary file is removed between saving and reloading.

Another solution would be to override .todict() for the flashmd calculator, and change the behavior here!

@Luthaf Luthaf deleted the fix-ase-trajectory-compatibility branch January 12, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants