Macroscopic surface charges from microscopic simulations.
Attaining accurate average structural properties in a molecular simulation should be considered a prerequisite if one aims to elicit meaningful insights into a system's behavior. For charged surfaces in contact with an electrolyte solution, an obvious example is the density profile of ions along the direction normal to the surface. Here, we demonstrate that, in the slab geometry typically used in simulations, imposing an electric displacement field D determines the integrated surface charge density of adsorbed ions at charged interfaces. This allows us to obtain macroscopic surface charge densities irrespective of the slab thickness used in our simulations. We also show that the commonly used Yeh-Berkowitz method and the "mirrored slab" geometry both impose vanishing integrated surface charge densities. We present results both for relatively simple rocksalt (1 1 1) interfaces and the more complex case of kaolinite's basal faces in contact with an aqueous electrolyte solution.