Compostion constraints

Dear Axel,

I am performing the cluster expansion method on (AB)x(CD){1-x} solid solution. Is it possible to strictly constraint the relation of compostion(A=B and C=D)?
I have tried to take advantage of the crange.in file, but the inequations of charge balance are not enough to obtain the strict constraints I want. Could you give me some instruction?

You would just need 4 lines in your crange.in:
1.0A -1.0B <= 0.1
1.0A -1.0B >=-0.1
1.0C -1.0D <= 0.1
1.0C -1.0D >= -0.1
You can change the 0.1 cutoff of course.
As explained elsewhere in this forum, it’s not recommended to use 0.0 as the right-hand-side.

Dear Axel,

It really helps! But a few structures which do not satisfy the condition(A=B&C=D) still turn up and they are found to be the ground states. I use the command "touch */error" to exclude these structures, while the maps seems to stay on the status "FInding best structure…" when I restart it.
Therefore, I am wondering can I perform the cluster expansion on certain user’s specified structures?

As explained in other earlier posts, it is normal for mmaps to generate structures away from the concentration constraints. This is to ensure that the cluster expansion does not generate spurious ground states away from the region of interest.
In your case, since the GS seem to be confirmed by DFT to be so, I would worry that your constraints may be nonphysical.
You can always exclude or include structures as your wish, mmaps will follow. The fact that finding news structures is slow could be that very few structures satisfy the constrains, so that it take a while to find them.
BTW, there are also posts that explain how to speed up structure generation (removing the -DSLOWENUMALGO switch in the makefile and recompiling).

Thank you for your detailed reply! I benefit quite a lot!
Best regards.