Lagrange‐function approach to real‐space order‐N electronic‐structure calculations