The potential energy curves for dihalogens (F2, Cl2, and Br2) are calculated with the i-DMFT method proposed recently [Wang and Baerends, Phys. Rev. Lett. 128, 013001]. All electrons are correlated in a set of self-consistent-field eigenvalue equations, with the orbital occupation numbers obeying the Fermi–Dirac distribution. The only input is the dissociation energies of the molecules, which are usually available from an experimental database. The quality of the computed potential energy curve is examined by extracting spectroscopic parameters and rotation–vibration energy levels, which are compared with experiment data and other theoretical calculations.