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

MaterialParameters object is mutated by calculation #3

Open
oashour opened this issue May 2, 2024 · 0 comments
Open

MaterialParameters object is mutated by calculation #3

oashour opened this issue May 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@oashour
Copy link
Collaborator

oashour commented May 2, 2024

Reusing the same MaterialParameters object for multiple calculations mutates it, causing an assertion error.

Traceback (most recent call last):
  File "/pscratch/sd/a/ash/He/hcp/pres_sweep/calc_darkmagic.py", line 44, in <module>
    material = PhononMaterial(material_name, params, yaml_file)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/global/u1/a/ash/code/DarkMAGIC/darkmagic/material.py", line 271, in __init__
    properties.validate_for_phonons(n_atoms)
  File "/global/u1/a/ash/code/DarkMAGIC/darkmagic/material.py", line 90, in validate_for_phonons
    assert any(np.any(v) for v in d.values())
@oashour oashour self-assigned this May 3, 2024
@oashour oashour added the bug Something isn't working label May 3, 2024
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

No branches or pull requests

1 participant