Instability in GCMC+MD simulations (N fluctuating near zero and NaN errors)

Dear LAMMPS developers and users,

I am performing hybrid GCMC + MD simulations with water and a copper wall. The simulation becomes unstable when the number of atoms fluctuates around zero, leading to the error:

“Non-numeric atom coords or pressure or box dimensions - simulation unstable”

Interestingly, the same simulation remains stable when the particle count is either non-zero or exactly zero (N = 0). The instability appears to be mainly caused by a crash in the neighbor list routine. Well, this issue cannot be fixed even if updating the neighbouring list at every time step or running this case on one core.

Could you please give me some guidance and suggestions? Thank you very much for your time and help.

Best regards,

Clemency

Are you applying fix gcmc to both, the water molecules and the Copper wall? That would be very unusual and thus would require an explanation.

What makes you think so?

It is practically impossible to give specific advice on only a rather approximate and vague description. One suggestion to try: you could try having one water molecule in your system that is not in the group fix gcmc is applied to, so that there is always at least one water molecule.

This is far too specific and beyond my level of knowledge about these kinds of simulations. Perhaps @athomps has a suggestion.

At 1bar and 99°C, 1 kg of liquid water occupies about 1.05 L of volume, and 1 kg of steam occupies about 1,674 L of volume source.

This is approximately a 1600x increase in volume. Now, at nanoscale, the density of liquid water is about 33 molecules per nm^3 (1 mol/L is 0.6 molecules per nm^3, and water has a molarity of about 55M).

Thus, at 1 bar and 99°C, equilibrated water vapour should occupy about 1600x more space – roughly, those same 33 molecules will now occupy a box 12 nm X 12 nm X 12 nm. The volume you have allocated to the GCMC fix is a little bit smaller than that.

I do not have in depth knowledge of GCMC but it seems to make sense to me that if you sample a typical MD-sized volume of water vapour it will, on average, have zero water molecules. This does not seem favourable for simulation.

1 Like