Concentration restricted structure enumeration

Description

Quite often, one is only interested in structures in a narrow concentration interval. The structure enumeration tool is very impractical in these cases, since it can only enumerate everything, without paying attention to the concentration of the output structures. It would make sense to have the ability to restrict the enumeration to certain concentrations.

An algorithm for doing so is described here. Before that is implemented in its full glory, it would make sense to try out a naive approach and evaluate that.

Use case

primitive = bulk('Au')
for structure in enumerate_structure(primitive, range(16), ['Au', 'Pd'],
                                     concentrations={'Au': (0, 0.2)})
    do_something(structure)

This code would enumerate structures that have a gold content between 0 and 20 % Au.

To keep things simple, it would make sense to always define concentration as the number of that species divided by the total number of atoms in the structure. If the Mi is solved in a nice way, one may consider a more elaborate definition.

Sub-tasks

  • Implement a naive approach and try it out
Edited by Magnus Rahm
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information