Atomic environment in sol–gel derived nanocrystalline hydroxyapatite