# Test of airebo potential for CNT units metal boundary p p p atom_style atomic newton on read_data lammps_data.dat # read_restart restart.test mass 1 12.0107 mass 2 12.0107 mass 3 12.0107 group bottom type 2 group top type 3 group bulk type 1 pair_style airebo 0 0 0 pair_coeff * * CH.airebo C C C velocity all create 0.5 4928459 rot yes dist gaussian velocity bottom set NULL NULL NULL sum no units box fix 1 all nve fix 2 all temp/rescale 1 0.5 0.5 0.002 1.0 fix 3 all print 4000 "step $s, force $b, disp $d " screen no file force1.txt fix hold1 top setforce NULL NULL NULL fix hold2 bottom setforce NULL NULL NULL #fix hold4 bulk setforce NULL NULL NULL variable n equal "count(bottom)+count(bulk)+count(top)" variable b equal f_hold1[3]*1.60217653 variable s equal step variable e equal etotal/n variable c equal 0 variable d equal bound(all,zmax) variable f equal f_hold2[3]*1.60217653 #variable c equal pzz compute 1 all stress/atom dump stress all custom 1000 dump.*.cfg id type xs ys zs c_1[3] thermo 1000 thermo_style custom step pzz zlo zhi dump data all atom 1000 dump.atom dump_modify data scale no timestep 0.00025 run 50000 print "*****************************************************************************************************************************************" print "displ. step $c, time step $s, axial force $b [nN]" print "*****************************************************************************************************************************************" #variable a loop 2000 fix 3 all print 200 "step $s,force $b, force $f " screen no file force2.txt fix 4 all print 100 "step $s,force $b, disp $d, " screen no file force3.txt #fix hold3 top setforce NULL NULL 0.0 #must move 0.025 A each 1000 steps, change in length = 62.1212-59.6212 = 2.5 A, therefore 100000 steps needed #2.5/0.025 = 100. #fix bottom, increase box size, top crosses pbc's, bottom doesn't but is fixed. zlo = -1000, zhi = 118.175, zhi final = 143.175 #change = 25, 25/0.025=1000. Therefore need 1000000 time steps. Doesn't work due to no attachment across pbc!! #must move 0.025 A each 1000 steps, change in length = 143.875 - 118.875 = 25 A, therefore 1000000 steps needed #25/0.025 = 1000. #Using erate, original box size equals 119.575. Need to move 0.1 A each picosecond, therefore erate = 0.000836. unfix 1 unfix 2 fix 7 all npt 0.5 0.5 5.0 aniso 0.0 0.0 0.0 0.0 NULL NULL 5.0 fix 6 top deform 1000 z final -0.7 71.4212 units box timestep 0.00025 run 500000 #fix 6 all deform 100 z erate 0.0015 units box #fix 7 all npt 0.5 0.5 5.0 aniso 0.0 0.0 0.0 0.0 NULL NULL 5.0 #timestep 0.00025 #run 1000000 #label loop #displace_atoms top move 0 0 0.025 units box #write_restart restart.test #timestep 0.00025 #run 1000 #print "*****************************************************************************************************************************************" #print "displ. step $a, time step $s, axial force $b [nN]" #print "*****************************************************************************************************************************************" #next a #jump in.test loop