The inter-site exchange coupling parameters Jij are calculated as a function of the inter-site distance in alloys. We know we can find J by total energy difference between FM and AFM , then that energy difference (E(AFM)-E(FM)) is equal to N*J*S*S. So we have to find the exchange coupling between atoms (the nearest distances are between atoms). Now suppose for ferromagnetic and antiferromagnetic configuration between Co and Co at 3.97 Angstrom distance. So for ferromagnetic the energy difference between 2 positive spins and for antiferromagnetic energy difference between 2 different spins. Do we have to assign spin values only for the atoms of Jij? Vasp does self consistent calculations. How to fix the value of magnetic moment of Co atoms since VASP does a self-consistent calculation.