Charge balance issue

Hi Friends,
I was trying to generate random structures using ATAT.
But those structures generates most of them are useless because there is no charge balance.
Could you please let me know how to solve this issues.
Say as an example.
AB’B’'O3 perovskite

B’=2+ and B’‘= 6+
Randomizing B’ and B’’ position
To balance the charge, there should be certain number of those atoms B’ and B’ combinations.
Rather than generating any random structure, I would prefer to generate one that follows this rule.

Let me know how to do.
Thanks

~ ant

If you use mcsqs, the generated random structures will have exactly the composition you specify . Do mcsqs -h to learn more.

Thank you. I will give it a try ! :smiley: