Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inert species incorrectly handled during restarts #2

Closed
joegilkes opened this issue Oct 16, 2023 · 1 comment · Fixed by #3
Closed

Inert species incorrectly handled during restarts #2

joegilkes opened this issue Oct 16, 2023 · 1 comment · Fixed by #3
Assignees
Labels
bug Something isn't working

Comments

@joegilkes
Copy link
Collaborator

When restarting an IterativeExplore and loading in the current state of a network through import_network(), imported networks lack knowledge of inert species, despite networks being initially constructed with these species in mind. This is because 'raw' networks (the underlying directory tree being explored) are never made aware of any inert species, so they don't get added unless a calculator modifies the network down the line.

This leads to inconsistencies and crashes when handling solution objects based off of networks without initially setup inert species, as inert species that are added by calculators are added to the end of the active SpeciesData, while earlier solutions will have them placed just after the initial reactants.

Could handle this with a few different methods:

  • Create an inert.in file in rdir_head on network initialisation that is then read in and always placed first during import_network()
  • Pass inert species into import_network() as an optional argument, inserting them in before importing the rest of the network.
@joegilkes joegilkes self-assigned this Oct 16, 2023
@joegilkes
Copy link
Collaborator Author

Of the two above methods:

  • The former clutters the directory tree more, but does provide a written reference for the original inert species should they be changed within the exploration parameters. This could produce a warning if changed.
  • The latter can't do this, so can't guarantee that SpeciesData ordering will not be changed if e.g. multiple inert species were originally defined and then only a single inert species is defined upon a restart.

For the sake of maintaining SpeciesData safety, it'd probably be better to go for the former.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant