Energies in memc2

I have difficulties understanding the energies printed out by the memc2 code.

If I use emc2 code for (A,B)C alloy at low temperature, so that the resulting structure is either AC or BC, then I get constant energy values (E_mc) when using -g2c (matching to the values in fit.out). Without -g2c (Egc_mc), there is a gradient corresponding to mu*x (x being either -1 or 1). Also, F_mc=E_mc and phi_mc=Egc_mc. So everything seems ok to me.

Next, I try (A,B)(C,D) alloy with memc2 code, and I set low chemical potential for D to get x(D)=0, so I’d expect that the results should match with the above. However, even when the chemical potentials are varied in range that results in pure phases (AC or BC), E_mc with -g2c is not constant, but with some strange dependence on mu’s. The most puzzling thing to me is that, even though x(D)=0, change of mu(D) still results in change of E_mc. F_mc or phi_mc, on the other hand, are constant.

Is there some extra "reference alignment" in the energies that I am missing, or a bug, or…?

I am using the latest 3.38 version of memc2.

Thank you for your help. You can find the input files here:
https://users.aalto.fi/~komsah1/Files/example.tar.gz

To recap, the example system is Cu(Ga,In)(S,Se)2. The chemical potentials are chosen to yield pure CuInSe2. Then, what I don’t understand is: when mu(Ga) is changed by 1, E_mc changes by 1/32, although x(Ga) remains 0. Same thing happens with or without -g2c.

The way mmaps pick the reference energies for the end members may not be exactly the same as for maps. (Look at ref_energy.out to check that).

I’d need your input files (and command line) to determine if there is a problem.