where ρ S is the solvent density, n val its number of valence electrons and the integral denotes the charge density of the solute, located outside its cavity, with ρM (r) being the electron density operator. The pressure P can then be calculated by shrinking the solute's cavity volume V C using