Extended DFT + U + V method with on-site and inter-site electronic interactions