espressomd / espresso

The ESPResSo package
https://espressomd.org
GNU General Public License v3.0
224 stars 183 forks source link

Better support for Monte Carlo with electrostatics #4566

Open RudolfWeeber opened 2 years ago

RudolfWeeber commented 2 years ago

Backgroudn

While in molecular dynamics, all particles move during a time step, only a single (or small number) particle are changed during a Monte Carlo move. Thus, while it is OK to recalculate energy/forces for the entire sysem in MD, this is a waste of compute time in MC, where only a small fraciotn of the system has changed.

The project outlined here would significantly improve the performance of MC methods like GHMC, Widdom insertion, the reaction ensemble, and teh Gibbs ensemble.

Steps to improve MC support in ES

Re-use of informaiton from previous electrostatics/magnetostatics calculations

This concerns P3M. the algorithm consists of the following steps

the computational effort can be shifted between the interpolation steps and the fourier space steps by favoring higher charge assignment orders or number of grid points, respectively.

In a Monte-Carlo simulation, the real space lattice containing the (interpolated) charfes can be kept. Then, when only one particle is changed, one can skip most of the charge assignment phase of P3M and only substract the particle at its old position and add it at its new position. The same is true for particle insertio/removal MC moves.

Better handling of particle inseriton/remoal/modification

@pm-blanco, @schlaicha @kosovan @dbeyer @mebrito