# 3d cutting simulation

units         metal    

dimension     3
boundary      p p p

atom_style    atomic
atom_modify   sort 0 2.0

# geometry

lattice       fcc 3.6147 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

region        up_boundary block 0 1.9 2 24 -2 2
region        down_boundary block 0 40 0 1.9 -2 2
region        boundary union 2 up_boundary down_boundary
region        up_thermo block 2 3.9 2 24 -2 2
region        down_thermo block 4 40 2 3.9 -2 2
region        thermo union 2 up_thermo down_thermo
region        newton block 4 40 4 24 -2 2
region        cut union 3 boundary thermo newton

create_box    3 cut

mass          1 64.0
mass          2 64.0
mass          3 64.0

create_atoms  1 region newton
create_atoms  2 region thermo
create_atoms  3 region boundary


neighbor      0.2  bin
neigh_modify  delay 5

# groups

group         newton      type 1
group         thermo      type 2
group         boundary    type 3
group         move        union newton thermo
group         cut         union newton thermo boundary

# temperature
velocity      move create 300.0 4928459
# potentials

#pair_style      hybrid eam morse 9.025
#pair_coeff      * * eam Cu_u6.eam
#pair_coeff      * 6 morse 0.087 51.4 2.05

pair_style      eam
pair_coeff      * * Cu_u6.eam

# computation

thermo          1
compute	        rescalepart move temp
#thermo_style    custom step temp 
thermo_modify   temp rescalepart

# minimization

minimize 1.0e-8 1.0e-8 1000 100000

# fix

fix            fixNpt all npt temp 300.0 300.0 2.5 iso 1.0 1.0 5.0 drag 0.2
#fix             1  all  nve
fix             2  boundary setforce 0.0 0.0 0.0
#fix             3  move  temp/rescale 1 300.0 300.0 5.0 1.0  


timestep	0.01

restart         5000 restart.*

dump            1 all custom 100 substrate-self.lammpstrj id type x y z
dump            image all image 100 cutting-self.*.jpg type type axes yes 0.8 0.02 view 30 -30
dump_modify     image pad 3
run             5000
