Charged wall system with electrolyte solution

Hello,

I would like to simulate a system with a uniformly charged surface (flat wall with no atomic detail) that has electrostatic interactions with a solution of water and ions. My goal is to compare the behavior of these systems to comtinuum theory (electric double layer phenomena). I would like to ask what is the best method to represent this in lammps.

I have read some previous threads in lammps mailing list, and some have suggested using one of the fix wall (wall/reflect, wall/lj93, etc) but I am not sure which one would be best to use and how I can incorporate the charge on the wall. I have also looked in to using ‘fix addforce’, but the force felt by the water and ion should be a factor of distance from the wall, so would I need to manually specify discrete regions each with a different addforce?

Alternatively, I have thought about using one of the fixed walls and placing fixed particles evenly at the wall that have no volume but have a charge.

Lastly, I would like to ask about boundary conditions in a system with a charged surface. The direction of the wall would not be periodic, would ewald summations need to be adjusted in this case? The charged surface would also induce a constant electric field in the system, would this be unrealistically propagated with periodic boundary conditions?

Please advise.

Best,

Jo

Hello,

I would like to simulate a system with a uniformly charged surface (flat wall with no atomic detail) that has electrostatic interactions with a solution of water and ions. My goal is to compare the behavior of these systems to comtinuum theory (electric double layer phenomena). I would like to ask what is the best method to represent this in lammps.

I have read some previous threads in lammps mailing list, and some have suggested using one of the fix wall (wall/reflect, wall/lj93, etc) but I am not sure which one would be best to use and how I can incorporate the charge on the wall. I have also looked in to using 'fix addforce', but the force felt by the water and ion should be a factor of distance from the wall, so would I need to manually specify discrete regions each with a different addforce?

i think you would need *both*. fix wall, for the non-electrostatic
behavior and fix addforce to apply the electrostatic interaction.
since fix addforce accepts atom style variables, you could define such
an atom style variable, that computes the distance to the (reference)
position and incorporates the per-atom charge and other factors (e.g.
the conversion from the product of elementary charges divided by
distance to energies for the given units).

Alternatively, I have thought about using one of the fixed walls and placing fixed particles evenly at the wall that have no volume but have a charge.

typical particles in LAMMPS (e.g. with atom style atomic) are point
particles without a discrete volume. the effective volume is part of
the force field interactions (hence the seperate treatment of
non-coulomb and coulomb interactions).

Lastly, I would like to ask about boundary conditions in a system with a charged surface. The direction of the wall would not be periodic, would ewald summations need to be adjusted in this case? The charged surface would also induce a constant electric field in the system, would this be unrealistically propagated with periodic boundary conditions?

none of the long-range solvers will pay any attention to forces
generated by fixes.

please note, that the model, as you describe it, will assume, that the
charged wall is not at all polarizable (i.e. the opposite of a metal).

axel.

Thank you for your response. I have tried using fixed wall. Is there a way to place a wall in the system without any vdw interactions? I have tried wall/reflect and wall/lj126 with 0 epsilon, however I get errors when particles approach the wall (‘out of range atoms-PPPM’, ‘particle on or inside fixed wall surface’. Is there a way to allow the particles to touch the wall without blowing up the system? I would like for the wall to only be present to prevent particles from moving past the edge of the box but still allow particles to come into contact with the wall.

Thank you for your response. I have tried using fixed wall. Is there a way to place a wall in the system without any vdw interactions? I have tried wall/reflect and wall/lj126 with 0 epsilon, however I get errors when particles approach the wall ('out of range atoms-PPPM', 'particle on or inside fixed wall surface'. Is there a way to allow the particles to touch the wall without blowing up the system? I would like for the wall to only be present to prevent particles from moving past the edge of the box but still allow particles to come into contact with the wall.

setting epsilon to 0 makes no sense, as it eliminates the wall
interaction. reflecting walls are tricky and they cannot be properly
used with PPPM (and slab correction) for complex technical reasons,
that i have explained repeatedly on this list (and am too tired to
explain again. please search the mailing list archives).

my recommendation is to use wall/harmonic. this is a soft repulsion
(well, you can set how soft). making the wall a "hard" interaction
makes little sense to me, as your atomic model consists of "soft"
particles as well.

axel.

Thank you, I tried wall/harmonic as well as you suggested. The system I want to represent is a negatively charged wall in contact with water and ions, and I expect to see positive ions forming a double layer close to the wall. I have a fix addforce to manually add a coulombic interaction (negative charge on wall interacting with water, +1 and -1 ions), and I think this interaction overcomes the repulsive harmonic potential. I still get errors of ‘particle on or inside fix wall surface’. I suppose I could increase the epsilon of the harmonic potential to prevent the atoms from approaching the wall, but then I wouldn’t be representing the positively charged double layer I expect to see. Is there a way to allow for particles to approach the wall without raising erros? Below is how I set up the fix addforce and wall. Please advise.

compute qatom all property/atom q
compute zcoord all property/atom z
variable coul atom -10c_qatom/(c_zcoordc_zcoord)

fix scharge all addforce 0.0 0.0 v_coul
fix top all wall/harmonic zlo EDGE 1 0 2
fix bot all wall/harmonic zhi EDGE 1 0 2

fix 1 water rigid/nvt molecule temp {T} {T} 100
fix 2 ions nve

Thank you, I tried wall/harmonic as well as you suggested. The system I want to represent is a negatively charged wall in contact with water and ions, and I expect to see positive ions forming a double layer close to the wall. I have a fix addforce to manually add a coulombic interaction (negative charge on wall interacting with water, +1 and -1 ions), and I think this interaction overcomes the repulsive harmonic potential. I still get errors of 'particle on or inside fix wall surface'. I suppose I could increase the epsilon of the harmonic potential to prevent the atoms from approaching the wall, but then I wouldn't be representing the positively charged double layer I expect to see. Is there a way to allow for particles to approach the wall without raising erros? Below is how I set up the fix addforce and wall. Please advise.

your reasoning makes no sense to me. are you sure, that the coulomb
force you apply is meaningful?
how did you pick the parameters for the repulsive walls?
does your simulation work *without* the added coulomb force from the wall?
it looks a lot to me, like you are jumping ahead without verifying
that what you are doing is physically reasonable.

compute qatom all property/atom q
compute zcoord all property/atom z
variable coul atom -10*c_qatom/(c_zcoord*c_zcoord)
fix scharge all addforce 0.0 0.0 v_coul
fix top all wall/harmonic zlo EDGE 1 0 2
fix bot all wall/harmonic zhi EDGE 1 0 2
fix 1 water rigid/nvt molecule temp \{T\} {T} 100
fix 2 ions nve

[...]

there is too little information here to make definite statements.

axel.

The coulombic force is meaningful in that I hope to see the effect on ion distribution when this force is present. I expect to see positive ions close to the surface, and negative ions propelled further away from the surface. The system I am hoping to represent is something like this: https://en.wikipedia.org/wiki/Double_layer_(surface_science)

The parameters for the repulsive walls have no physical meaning, you are correct. I made up parameters to prevent the errors I kept getting for the ‘particles on wall’, but this both not physical nor did it solve the problem.

The simulation does not work without the coulombic force also. It runs for a few femtoseconds before an ‘atom becomes missing’ , or ‘out of range- cannot compute PPPM’ errors. So I think I am not using the walls properly. Without walls, the system of water and ions in bulk runs properly and I get accurate bulk solution properties.

The wall is at the top and bottom edge of the box in the z direction, and the boundaries I use are ‘p p f’.

The coulombic force is meaningful in that I hope to see the effect on ion distribution when this force is present. I expect to see positive ions close to the surface, and negative ions propelled further away from the surface. The system I am hoping to represent is something like this: Double layer (surface science) - Wikipedia

what you hope is not a sufficient justification. i am not talking
about the general model, i don't question that, but the magnitude of
the resulting forces. also, you have to pick a reference position for
the "location" of the charge that you want to distribute across the
wall. please also note, as i pointed out before, that you are
completely disregarding the material property of the wall.

The parameters for the repulsive walls have no physical meaning, you are correct.

i did not say that. on the contrary, those parameters have to be
chosen carefully, to properly represent an atomic system and be
sufficiently repulsive without being too steep to require a reduced
time step.

I made up parameters to prevent the errors I kept getting for the 'particles on wall', but this both not physical nor did it solve the problem.

The simulation does not work *without* the coulombic force also. It runs for a few femtoseconds before an 'atom becomes missing' , or 'out of range- cannot compute PPPM' errors. So I think I am not using the walls properly. Without walls, the system of water and ions in bulk runs properly and I get accurate bulk solution properties.

here is a key mistake. if you cannot do a simulation without the
surface coulomb term, you have set up your simulation incorrectly. it
won't magically work by adding another term. as always, simulations of
complex systems need to be "build" in stages and each step needs
proper testing and validation to give meaningful answers.

also, i would recommend having a good look at the research that has
already been done in the field for more than 20 years. there should be
a lot of examples about how to properly model double layers for
aqueous systems.

i am sorry, but this all looks like too much guesswork and too little
carefully applied science to me. i have no more comments or
suggestions to add.

axel.

Thank you for your email. Regarding the material property of the wall - I am comparing to some simple continuum theory models (Poisson-Boltzmann, Gouy-Chapman) that are applied for general surfaces that are not representative of any particular material, and so I am simulating an idealistic ‘wall’ without parameters specific to any particular material. I plan to do perform 2 types of simulations: (1) idealistic ‘walls’ with no atomistic resolution and parameters not specific to any particular material, rather I will test a range of parameters (mostly charge density of the wall) to see the effect ion structure at the surface, and (2) fully atomistic silica structure surface to compare to more realistic systems.

Thanks for your advice thus far!