[EXTERNAL] Fix GCMC with kspace styles

Here’s more detail about making fix GCMC compatible with kspace styles. It would take a considerable amount of time and effort to get it done correctly. The main hurdles I’m thinking of include:

  1. You have to compute the per-atom long-range electrostatics (LRE) contribution for each of the atoms in the insertion/deletion atom/molecule. This can be done in LAMMPS, but is computationally expensive, and fix GCMC would have to be set up to drive the LRE code in LAMMPS.

  2. You’d have to figure out how to handle LRE with non-neutral systems, unless you want to restrict the option to net-neutral insertions/deletions. Non-neutral can be done, but has shaky theoretical foundation (see recent discussion on the mail list about this).

  3. The feature would have to be rigorously tested prior to release. First step would probably be to write a test problem with a known analytic solution. That in and of itself could be a challenge. And it would be better to have multiple tests covering the various options. And it would need to be tested in serial and parallel.

  4. It would be really hard (impossible?) to do multiple insertions/deletions in parallel with spatial decomposition. This isn’t a big deal at the moment since all of fix GCMC doesn’t really parallelize, but it would certainly be nice if it were all parallelized such that you get speed-up when using more than one core.

  5. It would have to be documented, the code needs to be written clearly and “bug free” and pass code review, unless you don’t care about releasing it.

  6. Probably lots of other issues I’m not thinking of at the moment.