"Too tight to insert" when adding a second water molecule. Intercalate_script

Hi dear everyone,

I ran the script Intercalate_script attached below from Jian-Jie Liang on my MMT model, but it failed and was prompted "Too tight to insert" when adding a second water molecule.

I tried models with different layer spacing, but none worked. It seems that after adding the first water molecule, the inter-layer spacing of the model is compressed to a very small value.

Is there something wrong with my model? Can anyone tell me how to adsorb water molecules in this model or run this script on my model? Thank you very much.

Best regards
Yang