Modifications in the molecular structure of hydroxyapatite induced by titanium ions