where t denotes the test charge; L x and L y represent the lattice parameters in the x and y directions, respectively; X and M represent S and Mo / W, while T SS and T OS denote Li/Na on the same and opposite face of the surface relative to the side to which the test charge is going to bind. These electrostatic features can now be used to train an ML model to predict the energies of the different configurations. However, we have observed that an ML model trained on Li adsorbed on H-MoS 2 data does not generalize well to Na adsorption on H-MoS 2 or Li adsorption on WS2. A simple normalization of the features solves this issue, i.e. in Equation 1 the terms for a data point are normalized using the l2 norm.