espresso icon indicating copy to clipboard operation
espresso copied to clipboard

Functions to calculate the non-bonded energy for a single particle

Open RudolfWeeber opened this issue 4 years ago • 9 comments

For MC simulations. Currently, the full energy needs to be calculated, even for single particle MC moves

RudolfWeeber avatar Sep 29 '20 17:09 RudolfWeeber

can this be done with electrostatics? are single particle MC moves efficient?

KaiSzuttor avatar Oct 13 '20 11:10 KaiSzuttor

can this be done with electrostatics? Up to a point, but I'm not going to do that near-term. E.g., you can reuse/update the P3M charge assignment and tune to high cao and low fft mesh sizes.

are single particle MC moves efficient? For the Gibbs ensemble, yes. However, moves that affect small clusters can make use of this, too.

My plan is to implement something along the lines of non-bonded loop with one partner fixed and a templateable kernel.

RudolfWeeber avatar Oct 13 '20 13:10 RudolfWeeber

are single particle MC moves efficient?

It depends on the system. The fundamental problem with it, is that the correlations are high, resulting in the need of having to perform many single steps in order to obtain reliable average values (see Markov Chain central limit theorem).

Additionally MC moves typically need to be taylored to the system which is investigated. Here hybrid MC/MD schemes help.

jonaslandsgesell avatar Nov 11 '20 10:11 jonaslandsgesell

The single energy calculation is also needed for efficient particle insertion/removal as in the Gibbs scheme.

RudolfWeeber avatar Nov 11 '20 10:11 RudolfWeeber

Do we have runtime measurements for a charged system? I have the impression that in this case most time is spent in the coulomb energy computation. If this part is not optimized, optimized energy computation of other non-bonded interactions (mainly LJ) won't help too much, right?

jonaslandsgesell avatar Nov 11 '20 10:11 jonaslandsgesell

You have to get started somewhere, the logical order is to first reproduce a simple system (i.e. a LJ liquid) before turning to more complicated stuff. And in a second (third, fourth, etc.) step you can then also optimize electrostatics. Here you would re-use the interpolation of all other charges etc. So plenty of room for improvement, but again, start simple first!

schlaicha avatar Nov 11 '20 11:11 schlaicha

are single particle MC moves efficient?

It depends on the system. The fundamental problem with it, is that the correlations are high, resulting in the need of having to perform many single steps in order to obtain reliable average values (see Markov Chain central limit theorem).

Additionally MC moves typically need to be taylored to the system which is investigated. Here hybrid MC/MD schemes help.

You can also have the exactly opposite where you make use of non-Markovian MC moves (Cluster algorithms etc) to overcome strongly correlated systems with large free energy barriers. Wang-Landau sampling is another alternative where often you don't want MD sampling. As said, it depends on the system. And the main advantage is that with efficient MC Espresso is able to perform Grand-Canonical simulations!

schlaicha avatar Nov 11 '20 11:11 schlaicha

And the main advantage is that with efficient MC Espresso is able to perform Grand-Canonical simulations!

You can already do this now (It was excessively used by me and Peter ): https://github.com/espressomd/espresso/blob/python/samples/grand_canonical.py

It works and gives correct results.

jonaslandsgesell avatar Nov 11 '20 11:11 jonaslandsgesell

Progress report: #4401 introduced a core callback function particle_short_range_energy_contribution() to compute the non-bonded energy of particle pairs. For bond breaking MC moves and acid-base MC moves with P3M electrostatics, the short-range bonded energy and long-range non-bonded energy would have to be implemented.

jngrad avatar Jun 07 '22 21:06 jngrad