I need to set the type of an exact fraction of atoms, and not just
This is necessary because it is a restricted simulation, given these
parameters. For an otherwise accurate simulation of bulk, I will have to
consider not just type fluctuations, but also number fluctuations, and hence a
grand-canonical simulation. (I'm saying this becasue I read the other thread
where arguments were presented against an exact type determination:)
What would be the best way to acheive this?
I do not want to use the solution presented there, of choosing a seed that
gives me a specific ratio, because that prevents spatial variations in type
assignment, across configurations in the ensemble. Of course, a random
velocity assignment does mean that this isn't too much of an issue, but still.
The only way I can think of doing this is through the usage of python's
shuffle() function, as suggested here:
Would anyone know of a better way?