Computational methods for density functional theory calculations on insulators and metals based on localised orbitals