Skip to content

Add flag to set all occupancies to 1 #362

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

Merged
merged 1 commit into from
Apr 3, 2025
Merged

Add flag to set all occupancies to 1 #362

merged 1 commit into from
Apr 3, 2025

Conversation

stefsmeets
Copy link
Contributor

Closes #343

@stefsmeets
Copy link
Contributor Author

@AstyLavrinenko Let me know if this works for you.

@stefsmeets stefsmeets merged commit fd5a591 into main Apr 3, 2025
4 checks passed
@stefsmeets stefsmeets deleted the fix-disordered branch April 3, 2025 14:05
@AstyLavrinenko
Copy link
Contributor

It doesn't implement the full part that we discussed. Please delete the warning, first of all the text of warning is not correct, the code wasn't made under assumption of the ordered structure, the point is that all possible sites should be introduced doesn't matter if the structure is ordered or disordered. Instead of warning there should be an error as the further analysis doesn't work correctly with such structure, the error should suggest usage of the introduced flag or changing the structure manually. If flag = True is enabled, the code should issue a warning that the structure will be modified: all partial occupancies will be reset to 1, and any issues with duplicate sites will be addressed. The current version doesn't check if the sites are duplicated after passing the occupancy of 1, to avoid it all sites occupied by non-diffusion element should be removed.

This applies to analyses that require sites/user structure. If a user provides a disordered structure, the code should return an error indicating that the analysis doesn't work with partial occupancies. The user may then either manually adjust the structure or, if they prefer an automatic solution, set flag = True. If flag = True is enabled, the code should issue a warning that the structure will be modified: all partial occupancies will be reset to 1, and any issues with duplicate sites will be addressed.

Forcing all occupancies to 1 may introduce problems if the structure contains elements other than the floating species.
In such cases, we have two options:

remove all sites containing other species
if available, use a function to remove duplicated species.

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.

Dealing with partial occupancies
2 participants