A new scheme for calculating the x-ray absorption near edge structure (XANE
S) based on the finite-difference method is proposed. It allows completely
free potential shape and, in particular, is not constrained to the muffin-t
in approximation. In our approach, the calculation of the final states is p
erformed in real space. The Schrodinger equation is solved in a discrete fo
rm on the node points of a three-dimensional grid. The unknowns are the val
ues of the wave functions at the grid points. The validity of the method is
shown on two different systems the metallic copper and the carbon monoxide
molecule; then, the differences resulting from muffin-tin and non-muffin-t
in calculations are shown on different typical molecules.