Grand canonical electronic density-functional theory: Algorithms and applications to electrochemistry | Synapse