Various mechanical and chemical processes may introduce contamination, such as metallic ions, during the creation of an integrated circuit. This can cause device degradation and leakage current. Neutral dopants such as boron can penetrate the silicon substrate from a highly doped polysilicon gate during anneal cycles causing leakage and threshold voltage shifts. Quantum mechanical modeling using periodic boundary conditions and a cluster approximation were performed in a search for a modification of silicon dioxide that would attract or trap ions and fast diffusing dopant species to reduce or eliminate such problems. Examination of calcium and strontium interactions with some metal ions in silicon dioxide was conducted. Strong metal ion attraction to both calcium and strontium was found. Interaction of calcium with boron and fluorine in oxide and calcium interaction with boron in other dielectric materials was also studied. Attraction was predicted to occur between calcium and boron whether they were distributed in silicon dioxide, hafnium or zirconium orthosilicate. This study leads us to propose incorporation of calcium or strontium into critical dielectric layers as a promising approach to trap ions and reduce boron penetration through the gate oxide. Predictions were used to design relevant experiments which revealed that calcium implanted into oxide traps boron and fluorine.