Shifting randomly chosen particles

Dear all,

I am interested to use LAMMPS to simulate the ion distribution between
two charged electrode interfaces. Additionally, I would like to capture
the effect of the intercalation of specific ions (say small lithium
ions) at one interface and the release of those ions at the other
interface to fully mimic the transport processes occurring during the
operation of a battery cell.

Therefore, I was wondering if there exists a fix in LAMMPS that can
shift a particle randomly chosen from a specific region (i.e. the first
interface region) by a certain distance (i.e. into the second interface
region), possibly also with a preset rate, or a Boltzmann rate to avoid
the overlap of ions. Of course, this would be a very simplistic model
cell, as all the complicated (electro)chemical processes would be
captured by this effective rate in an ad-hoc manner. Nonetheless, it
seems to be a good starting point for more sophisticated models.

I already read the man pages, but I could not find a suitable fix. Would
I need to write my own fix?

Any help would be greatly appreciated.

Thanks in advance and kind regards,

Diddo Diddens

Dear all,

I am interested to use LAMMPS to simulate the ion distribution between
two charged electrode interfaces. Additionally, I would like to capture
the effect of the intercalation of specific ions (say small lithium
ions) at one interface and the release of those ions at the other
interface to fully mimic the transport processes occurring during the
operation of a battery cell.

Therefore, I was wondering if there exists a fix in LAMMPS that can
shift a particle randomly chosen from a specific region (i.e. the first
interface region) by a certain distance (i.e. into the second interface
region), possibly also with a preset rate, or a Boltzmann rate to avoid
the overlap of ions. Of course, this would be a very simplistic model
cell, as all the complicated (electro)chemical processes would be
captured by this effective rate in an ad-hoc manner. Nonetheless, it
seems to be a good starting point for more sophisticated models.

I already read the man pages, but I could not find a suitable fix. Would
I need to write my own fix?

​you are aware, that LAMMPS is a program primarily designed for molecular
dynamics simulations, not for monte carlo simulations, right?

there are only a limited number of fixes doing monte carlo moves, e.g. fix
gcmc, but i am not aware of anything supporting complex operations like you
want to propose. so the solution would be to write this on your own.

please note, that moving atoms over a long distance is not going to work
well with the domain decomposition based parallelization of LAMMPS, so
you'd rather have to implement this as a combined deleting and creating of
an atom. in general, for easier prototyping, you might consider building
LAMMPS as a shared library, install the python wrapper for it and then use
the library interface from python to implement your moves.

there is another complication: the nature of the electrostatics of your
model requires using long-range electrostatics for achieving reasonable
accuracy, which will make any monte carlo moves very expensive, as you have
to recompute the full electrostatic energy after every change.

in short, it looks like you are try to teach tapdancing to an elephant with
a porcelain store next door.

axel.

Dear Axel,

thank you very much for your quick reply. In fact, incorporating simple Monte Carlo moves into an existing MD code was just what I had in mind, as I already use LAMMPS for other kinds of simulations. I also thought about adapting the swap or the gcmc fix, but your suggestion to use the Python interface really helps me a lot for the time being, since I can get a rough idea without huge programming efforts in this way. As I mentioned, the current approach is rather crude, but may serve as a basis for more realistic modeling.

Best regards,

Diddo