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

Atoms object can have a stray calculator attached between runs #2230

Closed
Andrew-S-Rosen opened this issue Jun 11, 2024 · 1 comment · Fixed by #2020
Closed

Atoms object can have a stray calculator attached between runs #2230

Andrew-S-Rosen opened this issue Jun 11, 2024 · 1 comment · Fixed by #2020
Assignees
Labels
bug Something isn't working

Comments

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Jun 11, 2024

Details about the quacc environment

  • quacc version: 0.9.2
  • Python version: 3.11

What is the issue?

As noted by @zulissimeta, when passing the output["atoms"] object from one @job to another, a calculator can get attached to the original reference due to the mutability of Atoms. This is not desirable because we don't want to store calculator objects in the output schema, and also that was not the calculator used to make that original Atoms object.

How can we easily reproduce the issue?

from quacc.recipes.emt.core import relax_job
from ase.build import bulk

atoms = bulk("Cu")
output = relax_job(atoms)
outupt2 = relax_job(output["atoms"])
assert output["atoms"].calc is None
@Andrew-S-Rosen Andrew-S-Rosen added the bug Something isn't working label Jun 11, 2024
@Andrew-S-Rosen Andrew-S-Rosen self-assigned this Jun 11, 2024
@Andrew-S-Rosen
Copy link
Member Author

@zulissimeta: Bug is fixed as of #2020.

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

Successfully merging a pull request may close this issue.

1 participant