First-principles theory of atomic-scale friction | Synapse