Transcription of ground-state density-functional theory into a local thermodynamics. | Synapse