Here, the first term on the right hand side, χ q EP , is computed from the weighted mean squared error (wMSE) of the approximate EP computed from the fitted charges relative to the reference EP (eq (1)) evaluated on a set of grid points using all structures of a given molecule. The wMSE cost function is thus defined as