Hi Niels,
Please use the settings below and let me know if they work. The key changes are for 'alpha_ewald_elec' and 'alpha_ewald_disp'. For simulations in PBC, these values cannot be zero, which is correct for simulations without PBC, since they determine the number of k-vectors in the PME. Another important change is 'twobody_cutoff' since you may want to have the 2B cutoff to be smaller than half of your box. I also changed the 'threebody_cutoff' just to be consistent with the 3B cutoff for MB-pol. Finally, in PBC, you can use a larger value for 'dipole_tolerance', which will speed up the simulation. I changed it to 1e-8, which is a good compromise between speed and accuracy.
All the best,
Francesco
mbx_config = {
'box': [40.0, 0.0, 0.0, 0.0, 40.0, 0.0, 0.0, 0.0, 40.0],
'twobody_cutoff': 9,
'threebody_cutoff': 4.5,
'max_n_eval_1b': 500,
'max_n_eval_2b': 500,
'max_n_eval_3b': 500,
'dipole_tolerance': 1e-8,
'dipole_max_it': 100,
'dipole_method': 'cg',
'alpha_ewald_elec': 0.60,
'grid_density_elec': 2.5,
'spline_order_elec': 6,
'alpha_ewald_disp': 0.60,