# needs description
# note the units
units metal
variable nx equal 40 
variable h  equal 0.25
variable L  equal $h*${nx}
variable T  equal 300
variable n0 equal 0.000025
variable V equal 5.
variable E equal -0.0001
variable s equal  0.0001
atom_style      atomic
timestep  0.0
boundary      f f f
lattice       fcc 1.0
region        BOX block 0 $L 0 1 0 1
create_box  1 BOX
mass          * 1.0
atom_modify     sort 0 1
fix             AtC all   atc drift_diffusion Si_ddm.mat
fix_modify      AtC mesh create ${nx} 1 1  BOX f p p
# boundary conditions
fix_modify AtC mesh create_nodeset lbc -0.1 0.1 -INF INF -INF INF
fix_modify AtC mesh create_faceset rbc -INF $L -INF INF -INF INF
fix_modify AtC internal_quadrature off
fix_modify AtC control thermal none
fix_modify AtC extrinsic electron_integration explicit 1
# fix temperature
fix_modify AtC fix temperature          all $T
fix_modify AtC fix electron_temperature all $T
# fix electron density
fix_modify AtC fix electron_density all ${n0}
# bcs for electric potential
fix_modify AtC initial electric_potential all 0
fix_modify AtC fix electric_potential  lbc $V
fix_modify AtC fix_flux electric_potential  rbc $E
fix_modify AtC source electric_potential all $s
thermo  1
thermo_style custom step cpu 
fix_modify AtC  output   poisson1d_noatomsFE 1 text
run     1
