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

[Feature] Added Pure Random Algo to OrderDisorderedStructureTransformation #4236

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jmmshn
Copy link
Contributor

@jmmshn jmmshn commented Dec 26, 2024

Added Pure Random Algo to OrderDisorderedStructureTransformation

The current implementation assume some oxidation and tries to evaluate and Ewald energy to get the ordered representation with the lowest energy.

matrix = EwaldSummation(struct).total_energy_matrix
ewald_m = EwaldMinimizer(matrix, manipulations, n_to_return, self.algo)

For large cells this has some disadvantages:

matrix = EwaldSummation(struct).total_energy_matrix  # <<- This can run out of memory for cells with ~2000 atoms
ewald_m = EwaldMinimizer(matrix, manipulations, n_to_return, self.algo) # <<- This takes hours for cells with ~200 atoms

We need some way to indiscriminately generate random structures without Ewald evaluation. Since for larger cells the value proposition of explicitly enumerating all the ordered representations and ranking them is dubious.

This PR adds a purely random sampling method that will sample all allowed structures with equal probability.

Major changes:

  • Added ALGO_RANDOM=-1 for purely random sampling
  • Allows user to define the occupation tolerance occ_tol for if a ordered structure is valid representation of a disordered structure

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

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.

1 participant