Because the equation in Ewald summation program is complicated, it must be checked and verified. Here we do this by calculating the Madelung constant for the crystal structure of SiO2(beta-cristobalite) , TiO2(rutile), Al2O3 (corrundum) and ZnS(Sphalerite). If the Madeulng constant is correct, then the Ewald sum works correctly. The calculated Madelung constants for the crystal structures are shown in the below figures:
Madelung constant for silica (beta-cristobalite) = 2.22
Madelung constant for TiO2 (Rutile) = 2.40