Dear Steve,
The sample length in z direction is 60 which is almost half of the box_z size. You can find my input file here. the only problem I think is in calculation of the strain. please let me know you comments.
Yours Sincerely,
Bahman
#Phase 1 ------------------------------------------Simulation main setup-------------------------------------------------
dimension 3
units real
atom_style charge
boundary p p p
variable lz0 equal 60
#simulation box
region box block 0 37.86 0 11.358 0.0 114 units box
create_box 2 box #2 is number of atoms
it was very difficult to finally find these positions
lattice custom 1 a1 3.786 0.00000 0.00000 a2 0.0000 3.786 0.00000 a3 0 0 9.514 &
basis 0.0000 0.2500 0.3750 &
basis 0.0000 0.7500 0.6250 &
basis 0.5000 0.7500 0.8750 &
basis 0.5000 0.2500 0.1250 &
basis 0.0000 0.0000 0.1700 &
basis 0.0000 0.7500 0.4200 &
basis 0.5000 0.2500 0.3300 &
basis 0.5000 0.7500 0.0800 &
basis 0.500 0.5000 0.6700 &
basis 0.500 0.2500 0.9200 &
basis 0.000 0.7500 0.8300 &
basis 0.000 0.2500 0.5800
mass 1 47.86000
mass 2 15.99940
#Phase 2 -------------------------------------------------------tensile model design---------------------------------------------------------
region top_edge block 11.358 26.502 0 11.358 58 ${lz0} units box
create_atoms 2 region top_edge &
basis 1 1 &
basis 2 1 &
basis 3 1 &
basis 4 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2 &
basis 9 2 &
basis 10 2 &
basis 11 2 &
basis 12 2
group top_edge region top_edge
set type 1 charge 2.196
set type 2 charge -1.098
#group model union particle substrate
region middle block 11.358 26.502 0 11.358 2 58 units box
create_atoms 2 region middle &
basis 1 1 &
basis 2 1 &
basis 3 1 &
basis 4 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2 &
basis 9 2 &
basis 10 2 &
basis 11 2 &
basis 12 2
group middle region middle
set type 1 charge 2.196
set type 2 charge -1.098
#group model union particle substrate
region bottom_edge block 11.358 26.502 0 11.358 0 2 units box
create_atoms 2 region bottom_edge &
basis 1 1 &
basis 2 1 &
basis 3 1 &
basis 4 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2 &
basis 9 2 &
basis 10 2 &
basis 11 2 &
basis 12 2
group bottom_edge region bottom_edge
set type 1 charge 2.196
set type 2 charge -1.098
#group model union particle substrate
#Phase 3----------------------------------------Buckingham Potential-----------------------------------------------
pair_style buck/coul/long 15.0
pair_coeff 1 1 717647.40 0.154 121.067
pair_coeff 1 2 391049.10 0.194 290.331
pair_coeff 2 2 271716.30 0.234 696.888
neighbor 2.0 bin # skin distance for real units is by default 2.0
neigh_modify every 1 delay 0 check yes
kspace_style pppm 0.0001
#Phase 4----------------------------------------Compute—how can I monitor Vparticle!!! ------------------------
compute 1 middle stress/atom NULL
compute 2 middle reduce sum c_1[3] # stress in z direction
#----Phase 5-------------------------------------Initial Equilibration at 300K ----------------------------------------
variable nstep1 equal 3000
variable itn equal 100
timestep 1.0 # or 2
velocity all create 300 12345 mom yes rot no
fix 1 middle nvt temp 300.0 300.0 100.0
fix 2 bottom_edge setforce 0.0 0.0 0.0
fix 3 top_edge setforce 0.0 0.0 0.0
thermo {itn}
dump 2 all xyz 100 dump2_tensile.txt
run {nstep1} #2ns=2000000
#----Phase 6---------------------------------------tensile test at the room temperature --------------------
variable counter1 equal 15
variable counter2 equal 10
variable counter3 equal 10
variable nstep2 equal 1000
variable nstep3 equal 3000
variable rate equal 0.001
label flag1
variable i loop ${counter1}
fix 5 top_edge move linear 0 0 ${rate} units box
thermo {itn}
thermo_style custom step temp pe etotal pzz
variable dlz equal "step*v_rate/(v_counter1*v_nstep2)"
variable strain equal "v_dlz*100/v_lz0"
variable stressp equal "pzz"
variable stressc equal "c_2"
fix fprint1 all print {itn} " {strain} {stressc} {stressp} " file Stress_Strain03.txt screen no
run {nstep2}
unfix 5
fix 6 middle nvt temp 300.0 300.0 100.0
dump 3 all xyz 100 dump2_tensile.txt
undump 3
run ${nstep3}
next i
jump SELF flag1
unfix 6
unfix fprint1