Efield direction of motion not as expected

Hello,

I am applying an electric field to a salt water solution. (dilute solution of Na and Cl ions modelled with LJ potentials in tip4p water.)

I am applying negative electric field in the z-direction

fix 8 all efield 0.0 0.0 -0.2

When I visualize the simulation I am seeing drift of the ions in the opposite direction of what I expect.

According to the documentation F = Eq, So in a negative field I would expect a positive force on Cl. Cl should move upwards with Na doing the reverse. However, I am seeing the opposite. I double checked my starting coordinate file to make sure the charges are assigned correctly. They are (type 3 = Na, q = 1, type 4 = Cl, q = -1). I double checked my dump_modify command to make sure I was assigning my lammps types 3 and 4 back to elements Na and Cl for vmd. That all looks fine too.

Any ideas what’s happening here?

A few other details. I am running a Langevin thermostat to maintain 300K temp for the solution. And the system has reflective boundaries in the z-direction, so I can separate the ions. To do enable this, I have the kspace_modify slab 3.0 command turned on since the system is not periodic in z.

Maybe the thermostat is affecting the motion in some way I don’t understand?

Thanks for your insight.

Dave

Hello,

I am applying an electric field to a salt water solution. (dilute solution
of Na and Cl ions modelled with LJ potentials in tip4p water.)

I am applying negative electric field in the z-direction

*fix 8 all efield 0.0 0.0 -0.2*

When I visualize the simulation I am seeing drift of the ions in the
opposite direction of what I expect.

​there must be something wrong with how you do the visualization. check out
this minimal input example with only two particles, no interactions/forces
except fix efield.

boundary p p f
atom_modify map array
region box block -5 5 -5 5 -5 5
create_box 1 box

create_atoms 1 single 0.000000 0.000000 2.000000
create_atoms 1 single 0.000000 0.000000 -2.000000
set atom 1 charge 1.0
set atom 2 charge -1.0

mass * 1.0

variable force equal fz[2]
variable pos equal z[2]

pair_style zero 4.0
pair_coeff * *

fix 1 all efield 0.0 0.0 -0.2
fix 2 all print 1 "force: \{force\} pos: {pos}"
fix 3 all nve

run 10 post no

i get the following output which shows the negative charged particle is
moving "upward" (in Z).

Step Temp E_pair E_mol TotEng Press
       0 0 0 0 0 0
force: 4.6121098 pos: -1.9990351466299
force: 4.6121098 pos: -1.99614058651961
force: 4.6121098 pos: -1.99131631966913
force: 4.6121098 pos: -1.98456234607845
force: 4.6121098 pos: -1.97587866574758
force: 4.6121098 pos: -1.96526527867652
force: 4.6121098 pos: -1.95272218486526
force: 4.6121098 pos: -1.93824938431381
force: 4.6121098 pos: -1.92184687702217
force: 4.6121098 pos: -1.90351466299033

Thanks for the sanity check. I’ll keep digging to see what dumb thing I am doing.

Dave