Reference energies

I’ve got some problems assigning the energies in ref_energies.out to the respective structures.
Are the reference energies taken directly from the energy file of the corresponding structures divided by the number of ions/atoms inside the cell or is a specific formula used to calculate the reference energies?

I have tried to run a test case on the same lattice and feeding it fake energies like you said. I assigned positive values in all cases. After feeding in about 6 structures the first cluster expansion was automatically constructed generating a ref_energy.out alongside. I looked into the file and was surprised to see that there are negative values in two lines. So I am a bit confused where the values come from.

Unfortunately I still fail to get the values properly assigned.

Dear Freshwind:
the values reported in ref_energy.out are the energies per atom that would need to be assigned to each atom (listed, in the same order, in atoms.out) to exactly match the energies of the structures chosen as "reference".
mmaps picks the structures that are at extreme compositions as reference.
If you look at your fit.out:
0.000000 0.250000 0.250000 0.500000 0.000000 -0.000000 0.027778 -0.027778 1.000000 0
0.250000 0.000000 0.000000 0.500000 0.250000 -0.000000 -0.000000 0.000000 1.000000 1
0.083333 0.166667 0.250000 0.500000 0.000000 -3.000000 -3.055556 0.055556 1.000000 2
0.166667 0.083333 0.250000 0.500000 0.000000 -6.166667 -6.138889 -0.027778 1.000000 3
0.000000 0.250000 0.166667 0.500000 0.083333 4.111111 4.111111 0.000000 1.000000 5
0.041667 0.208333 0.250000 0.500000 0.000000 -0.000000 -0.000000 0.000000 1.000000 20
0.000000 0.250000 0.208333 0.500000 0.041667 3.638889 3.638889 0.000000 1.000000 24
The three "0" marked in bold point to the structures used as reference: 0, 1 and 20.

It is possible that positive energies for your structures yield negative atomic reference energies, as illustrated by this energy vs composition (x) plot (in a binary system):



 
  *
   
    *
     
----------  0 energy
       
|       \|
x=0         x=1

As you can see the fitted line cross the x=1 line at a negative energy even though the input energies (*) are positive.

Thanks for the response, Axel.
Let’s see if I understand correctly:

the structures with an assigned energy of zero are the reference structures. The energies are deliberatley set to zero (since they represent reference).
In this context, if the total energies of the other structures are lower in energy wrt to these defined reference energies, then negative values for the energies can be observed despite the fact that the total energies in the respective ‘energy’-files are all positive.

Dear Axel,

I am wondering how the code assigns energy to individual atoms in pseudo-binary case. We have the calculated energy of the two end-point structures AB and AC as reference, while three variables are to be determined.

The is no magic here: the code just assigns zero energy to those species with an undetermined energy.