# non uniform electric field-using region

Hi

I’m simulating a polymer which is placed in a non-uniform electric field,

I use the efield with the keyword of “region”. The polymer is in a point like

(x<0) y z.The electric field converges in 0 0 0 and after that diverges. So I expect that my polymer moves to 0 0 0 and then moves to the up or down when it passes 0 0 0 . But I don’t see this kind if behaviour.I checked my electric field so many times by plotting it in Mathematica and I guess that something is wrong with my code:

units lj
boundary p p p
atom_style full

region right block 0 100 -100 100 -100 100
region left block -100 0 -100 100 -100 100
.

.

.

group poly type 1(2 kind of atom.1 : polymer 2: ions)
displace_atoms poly move -30 50 0

.

.(so many variables in atom style here)

.

variable E atom “-v_Vout/(sqrt(v_a2)v_M)"
variable Ex atom "v_E
v_ttsqrt((v_s)^2 +1)"
variable Ey atom "-v_E
v_ssqrt(1-(v_tt)^2)y/(v_r)"
variable Ez atom "-v_E
v_s
sqrt(1-(v_tt)^2)z/(v_r)"
variable Ey2 atom "v_E
v_ssqrt(1-(v_tt)^2)y/(v_r)"
variable Ez2 atom "v_E
v_s
sqrt(1-(v_tt)^2)*z/(v_r)”
fix Eleft poly efield v_Ex v_Ey v_Ez region left

fix Eright poly efield v_Ex v_Ey2 v_Ez2 region right

timestep 0.0001

run 1000000

I wrote everything that is connected to the efield.Do you think I missed something here?Like putting "unfix"in the end of my code or something like that
thanks