Atomic-scale machine learning for modelling memory devices - Nature Electronics