Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCMC water box starting from zero density #14

Open
proteneer opened this issue Jun 22, 2023 · 2 comments
Open

GCMC water box starting from zero density #14

proteneer opened this issue Jun 22, 2023 · 2 comments

Comments

@proteneer
Copy link

proteneer commented Jun 22, 2023

Dear developers,

I've been playing with the water example script, testing to see if GCMC can properly solvate a box initialized at close to zero density (a single non-GCMC water was present with state=2). Unfortunately, I was never able maintain any GCMC waters:

Equilibration:
765/10000 equilibration GCMC moves accepted. N = 0
Production:
5000 move(s) completed (408 accepted (8.1600 %)). Current N = 0. Average N = 0.090

Fundamentally, the way that the Adams formulation of GCMC may be flawed in the extreme case. Consider the Adams formulation for $P_{insert}$ and $P_{delete}$

$P_{insert}=\min \left(1, \dfrac{1}{N+1} \exp(B)\exp(-\beta \Delta U) \right)$
$P_{delete}=\min \left(1, N \exp(-B)\exp(-\beta \Delta U) \right)$

A typical adams parameter is around $-3$ (as corroborated by the various papers). Starting from a fully empty box $N=0$, after some effort, we succeed in inserting a single GCMC water so that $N=1$. However, the next $P_{delete}$ move will then always succeed, since it evaluates to $P_{delete}=\min \left(1, 1 \exp(3)\exp(0) \right) = 1$ since $\Delta U=0$ as we're moving only a single water from ghost to real (but now in an empty box).

Questions:

  1. Is this the intended behavior?
  2. Are there critical points by which we may suddenly evaporate or fill the box?
  3. Are there reasonable mitigations to this problem?
@olliemelling
Copy link
Collaborator

Hi,

Apologies for the delay in responding. This is an interesting point, not something that we've ever tested as far as I'm aware. I ran the same tests as you (using both GCMC and GCNCMC) and got the same results - where a single water is occasionally inserted but always deleted at the next attempted deletion move due to the change in potential being 0.

Theoretically, it shouldn't be completely impossible to hydrate an empty box - as multiple successful consecutive insertion moves could occur, up to the point where a deletion move isn't immediately accepted, due to the resulting effect on the potential energy.

Additionally, I imagine that this could be avoided to some extent by attempting insertion/deletion moves of multiple waters in one go, for the same reason as above (although this is not implemented in our code).

By the same logic, I imagine there must be critical points at which the box does begin to fill - although we have found even relatively small water boxes to be very slowly converging in their density.

Will give some more thought to this - happy to discuss further when we meet next week!

@proteneer
Copy link
Author

Theoretically, it shouldn't be completely impossible to hydrate an empty box - as multiple successful consecutive insertion moves could occur, up to the point where a deletion move isn't immediately accepted, due to the resulting effect on the potential energy.

While it's not impossible, it's actually becomes progressively harder for the first few waters. Since the probability of insertion is something like 5% of the first water, 2.5% for the second, 1.6% for the third, 1.25% for the fourth, (assume delta_Us close to zero).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants