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

metastable defects #34

Open
alexsquires opened this issue Aug 23, 2023 · 3 comments
Open

metastable defects #34

alexsquires opened this issue Aug 23, 2023 · 3 comments

Comments

@alexsquires
Copy link
Collaborator

alexsquires commented Aug 23, 2023

Currently, the code will not work (or at least not as intended) if a DefectSpecies has more than one DefectChargeState with the same charge. This doesn't allow us to consider metastable defects.

I think this issue is resolved as simply as moving away from having DefectChargeStates represented as a dictionary, and instead a list or array. Though there may be unforseen issues in the formalism.

@bjmorgan
Copy link
Owner

I can't think of a reason why the set of DefectChargeStates needs to be a dict and not some other collection type / or why it is necessary for the keys to be the charges (except that this is conceptually simple in cases where you do not have metastable defects).

@alexsquires
Copy link
Collaborator Author

I don't like the fact the keys are the charges anyway, it's redundant (I'm not exactly sure when that got worked in to the code). But fixing it would be a breaking change, this gives me a reason to do it.

@bjmorgan
Copy link
Owner

There are definitely places where that dictionary is iterated over to get keys or DefectChargeState objects, but these can hopefully be replaced with equivalent code in a fairly localised fashion.

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

No branches or pull requests

2 participants