Thanks a lot for your elaborate explanations.
Based on my understanding, in alloy case, most cubic structure B1, B2, or dimer structure can use my first Eq. to calculate the pair potentials. And normally, people define E0_ij, alpha_ij and R0_ij to calculate Eu_ij in this case.
But for L12 or HCP, I have to use other formulation to get pair potentials. Am I right?
For MEAM in lammps, it doesn’t treat likely and unlikely atoms separately because like what you mentioned, when i=j, the Eq. 1 is reduced to Eq3. The error I got when I tried to add Eq3 into lammps was because of the different way of calculating the background density of the reference structure in lammps and the literatures. I think I should not add 1/Z_i here in Eq3 when adding it into lammps.
Thanks again for your advice which helps me a lot!