Self-consistent electronic structure calculation for nitrogen chemisorbed on copper (100)