Localisation of 5d electrons in rare-earth metals