Questions about mimicking voltage drop

good day to all, and thank you for your attention.

I would like to get some suggestions on alternative ways to successfully apply Efield other than using the fix-efield command.

The reason for not using fix-efield is because my simulating cell has two different solid materials. It consists of two materials side by side and the interface region inbetween, just like a slab.

Applying electrical field with the fix-efield command causes a problem since all atoms (including both the materials) experience the same electric-field which it shouldn’t because there has to be some different voltage drop across materials A and B.


I’ve came up with the idea of putting an additional layer to my system to use it as an electrode and adjust the initial setting such as boundary ppf to simulate a slab.

My questions are:

  1. Is the idea of making electrode successively induces different voltage drop across the material A and B, thus experiencing Efield variation across the entire slab?
  2. If so, would turning off short-range interactions (like lj potential field) between the electrode atoms and slab atoms, and giving the needed charge to the electrode atoms fulfill the requirements to simulate applied voltage across the slab?
  3. Which element should I use for the electrode? I assumed that any type of atoms could be used and also the mass of the atoms don’t even matter since I am going to turn off the short-range interaction between the electrode and the slab, and going to freeze the position of the electrode atoms. Is my assumption correct?
  4. How could I not include the electrode in the simulation box? I would like to achieve this because the electrode should not be part of the system since I am trying to mimic the effect of the voltage drop across the slab.

Thank you for reading with great respect to all of you.

I know from the research of former colleagues that using an array of point charges to mimic a voltage drop across an interface is an established technique in the simulation of voltage gated proteins. In those cases, people tend to simulate slab geometries with full periodicity and filled with water and mimic the voltage by adding Ions and using a wall potential to keep them separated and thus maintain the voltage drop and a (weak) position restrain on the membrane to maintain the overall geometry. Thus it may be worth the search the literature for discussing such cases. There may be other applications for other kinds of systems, too.

In your geometry, you may still want to use (soft harmonic, or reflective) walls to keep atoms leaving your slab from coming too close to the point charges, but with vacuum and fixed boundaries, the situation is much simpler to set up. The number and assigned charge would then define the magnitude of the voltage drop. The point charges then would have to be excluded from time integration (and temperature computation) to remain immobile.

The point charges should be placed with sufficient distance from the slab. Then their short range interaction would be set to zero (e.g. LJ epsilon). They should not contribute to the system in any way except for providing the electrostatic potential drop.

LAMMPS requires a non-zero mass for all particles. See my comment above about the choice non-coulomb interactions. You can also use the neigh_modify exclude command to remove the point charges from the neighbor lists and gain a little performance, too.

You cannot compute interactions between items that are not “in the box”. If you use “p p f” boundaries, then your system is effectively infinitely large in z direction; you only consider the subset for your force calculations. The situation gets a bit more complicated when you want to use long-range coulomb interactions (in combination with the kspace_modify slab setting). Then the system will (internally) always be fully periodic (despite the required “p p f” boundaries) and then you have to make certain that the box dimension in z-direction is sufficiently large to reduce errors from multipole interactions (the slab correction only cancels the dipole-dipole interaction in z-direction between the periodically replicated system copies).

You may also want to have a look at the features in the “ELECTRODE” package of LAMMPS. I am not an expert with that package, but @srtee may have some comments.

So, you can use the ELECTRODE package to set up proper conducting electrodes where each electrode particle is maintained at a stated potential difference.

But that is only necessary if you are interested in the interface between A (or B) and an actual conducting electrode, whereas it sounds like you are just interested in the A-B interface. In which case I agree with Axel’s idea – just set up an array of static charges which deliver the desired interfacial potential difference, and just make sure there’s enough “bulk” of A or B that the A-B interface doesn’t really feel the detailed effects of the A-charge or B-charge interfaces. The additional overhead of constant potential electrodes wouldn’t be worth it.

You will probably find this paper interesting and useful: