Updated the example input script with the set command for per-atom dielectric constant
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
LAMMPS data file: two oppositely charged ions confined between two walls
|
||||
LAMMPS data file: two oppositely charged ions confined between two walls epsilon1=2 | epsilon2=10 | epsilon1=2
|
||||
|
||||
4002 atoms
|
||||
3 atom types
|
||||
@ -4015,5 +4015,5 @@ Atoms # dielectric: id mol type q x y z normx normy normz area_per_patch ed em e
|
||||
3998 0 1 0 38.5078 42.4438 30.002 0 0 -1 0.866 8 6 6 0
|
||||
3999 0 1 0 39.0079 41.5776 30.002 0 0 -1 0.866 8 6 6 0
|
||||
4000 0 1 0 39.508 42.4438 30.002 0 0 -1 0.866 8 6 6 0
|
||||
4001 0 2 1 15 20 15 0 0 1 0.866 8 6 10 0
|
||||
4002 0 3 -1 25 20 25 0 0 1 0.866 8 6 10 0
|
||||
4001 0 2 1 15 20 15 0 0 1 1.0 8 6 10 0
|
||||
4002 0 3 -1 25 20 25 0 0 1 1.0 8 6 10 0
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
# top interface: n = (0, 0, -1)
|
||||
# so that ed's are the same for both interfaces
|
||||
|
||||
# Dielectric constants can be set to be different from the input data file
|
||||
|
||||
variable epsilon1 index 20
|
||||
variable epsilon2 index 8
|
||||
|
||||
@ -21,6 +23,8 @@ variable method index gmres # gmres = BEM/GMRES
|
||||
# dof = Direct optimization of the functional
|
||||
# none
|
||||
|
||||
# compute the relevant values for the interface particles
|
||||
|
||||
variable ed equal "v_epsilon2 - v_epsilon1"
|
||||
variable em equal "(v_epsilon2 + v_epsilon1)/2"
|
||||
variable epsilon equal 1.0 # epsilon at the patch, not used for now
|
||||
@ -34,12 +38,10 @@ group ions type 2 3
|
||||
group cations type 2
|
||||
group anions type 3
|
||||
|
||||
# 1.0 = q * epsilon2 = qreal for cations
|
||||
# -1.0 = q * epsilon2 = qreal for anions
|
||||
variable qscale equal "1.0 / v_epsilon2"
|
||||
set group cations charge ${qscale}
|
||||
variable qscale equal "-1.0 / v_epsilon2"
|
||||
set group anions charge ${qscale}
|
||||
# set the dielectric constant of the medium where the ions belong
|
||||
|
||||
set group cations epsilon ${epsilon2}
|
||||
set group anions epsilon ${epsilon2}
|
||||
|
||||
pair_style lj/cut/coul/long/dielectric 1.122 10.0
|
||||
pair_coeff * * 1.0 1.0
|
||||
@ -59,6 +61,8 @@ dump 3 ions custom 100 ions.dump id mol type q x y z fx fy fz #c_ef[1
|
||||
|
||||
fix 1 ions nve
|
||||
|
||||
# fix modify is used to set the properties of the interface particle group
|
||||
|
||||
if "${method} == gmres" then &
|
||||
"fix 3 interface polarize/bem/gmres 1 1.0e-4" &
|
||||
"fix_modify 3 itr_max 50 dielectrics ${ed} ${em} ${epsilon} ${area} NULL" &
|
||||
|
||||
Reference in New Issue
Block a user