Piston example for ELECTRODE

This commit is contained in:
Ludwig Ahrens
2022-10-10 13:40:26 +02:00
parent 5f285e6aa3
commit 264d9c4aae
4 changed files with 2202 additions and 3 deletions

View File

@ -1,14 +1,14 @@
These examples demonstrate the use of the ELECTRODE package for constant potential molecular dynamics.
planar/
au-vac.data -- gold electrodes with vacuum
data.au-vac -- gold electrodes with vacuum
in.planar* -- comparison of gold electrodes with vacuum to theoretical capacitance of planar capacitor
-- 5x, further labeled by long-range solver (ewald / pppm) and boundary correction (ew2d / ew3dc / ffield)
-- the pppm-ew2d combination would not give correct results and will throw an error if selected
test.sh -- run all in.planar files and check charge at 1.2V and %difference from theoretical (last column)
graph-il/
graph-il.data -- graphene electrodes with electrolyte (coarse-grained BMIm-PF6)
data.graph-il -- graphene electrodes with electrolyte (coarse-grained BMIm-PF6)
in.conp -- reference run at constant potential
in.etypes -- type-based smart neighborlists
in.ffield -- finite field method with fully periodic cell
@ -18,7 +18,7 @@ graph-il/
in.thermo -- thermalize electrolyte with thermopotentiostat instead of NVT
au-aq/
au-aq.data -- gold electrodes with electrolyte (SPC water + NaCl)
data.au-aq -- gold electrodes with electrolyte (SPC water + NaCl)
in.ffield -- finite field method with fully periodic cell
in.tf -- Thomas-Fermi metallicity model with more delocalized charges
@ -30,6 +30,10 @@ madelung/
eval.py -- compare output of reference and Lammps job (used by test.sh)
test.sh -- run all in.* files and check charge at 1 V and %difference from theoretical (last column)
piston/
data.piston -- two electrodes with water
in.piston -- equilibrate distance between rigid electrodes
# future work:
# in.cylinder -- comparison of carbon nanotube to theoretical induced charge for charge near circular conductor

View File

@ -0,0 +1,2 @@
top_wall.csv
data.pistoned

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,65 @@
# The intention is to find the average position of one wall at atmospheric
# pressure. The output is the wall position over time which can be used to
# find the average position for a run with fixed wall position.
#
# ----------------- Init Section -----------------
atom_style full
units real
boundary p p f
kspace_style pppm/electrode 1e-4
kspace_modify slab 3.0
pair_style lj/cut/coul/long 8 8
bond_style harmonic
angle_style harmonic
if "$(extract_setting(world_size) % 2) == 0" then "processors * * 2"
# ----------------- Atom Definition Section -----------------
read_data "data.piston"
# ----------------- Settings Section -----------------
pair_coeff 1 1 0.069 2.78
pair_coeff 2 2 5.29 2.951
pair_coeff 3 3 0.1553 3.166
pair_coeff 4 4 0.0 0.0
bond_coeff 1 600.0 1.0
angle_coeff 1 75.0 109.47
group wall type 1
group gold type 2
group spce type 3:4
group ele union wall gold
fix fRattleSPCE spce shake 0.0001 10 0 b 1 a 1
pair_modify mix arithmetic
# ----------------- Run Section -----------------
neigh_modify every 1 delay 0
timestep 2
fix fxnvt spce nvt temp 300 300 500
fix fxforce_au gold setforce 0.0 0.0 0.0
# equilibrate z-coordinate of upper electrode while keeping the electrode rigid
fix fxforce_wa wall setforce 0.0 0.0 NULL
fix fxpressure wall aveforce 0 0 -0.005246 # atomspheric pressure: area/force->nktv2p
fix fxdrag wall viscous 100
fix fxrigid wall rigid/nve single
# maintain constant potential during equilibration
# 'algo cg' allows for moving electrodes
fix fxele ele electrode/conp 0.0 1.805 symm on algo cg 1e-4
# setup output and run
variable q atom q
compute qwa wall reduce sum v_q
compute qau gold reduce sum v_q
variable top_wall equal (bound(wall,zmin))
compute temp_mobile spce temp
variable s equal step
fix fxprint all print 1000 "${s} ${top_wall}" file top_wall.csv screen no
thermo_style custom step c_temp_mobile c_qwa c_qau v_top_wall
thermo 5000
run 100000
write_data "data.pistoned"