variable a loop 2000 processors 4 4 1 read_restart restart.Ni_Eq_ReaxFF change_box all z final -0.2000 150.00 boundary p p f units box #-----------------------------------------------------Variable definition---------------------------------------------- #----------------------------------------------------------------------- variable XCM file xcm.txt variable YCM file ycm.txt variable ZCM file zcm.txt #----------------------------------------------------------------------- variable VX1 file vx1.txt variable VY1 file vy1.txt variable VZ1 file vz1.txt #----------------------------------------------------------------- variable VX2 file vx2.txt variable VY2 file vy2.txt variable VZ2 file vz2.txt #------------------------------------------------------------------- variable X1 file x1.txt variable Y1 file y1.txt variable Z1 file z1.txt #--------------------------------------------------------------------- variable X2 file x2.txt variable Y2 file y2.txt variable Z2 file z2.txt #--------------------------------------------------------------------- # ----------------------------------------------------------------------------- INITIALIZATION ---------------------- timestep 0.25 thermo_style custom step temp epair etotal pxx pyy pzz pe lx ly lz thermo 1000 #----------------------------------------------FORCE FIELD-------------------------------------------------------------- #----------------------------------------------FORCE FIELD-------------------------------------------------------------- pair_style reax/c NULL checkqeq no pair_coeff * * ffield.reax.CHONSFPtClNi Ni H H neighbor 2. bin fix 1 all qeq/reax 1 0.0 10.0 1e-6 reax/c ############################################################################################# bond_style class2 bond_coeff * 0.741 414.218 -805.654 914.129 #----------------------------------------------------------------------------------------- region Ni_B_fix block INF INF INF INF 19 20 units box group NiBfix region Ni_B_fix region mobile block INF INF INF INF 20 INF units box group mobile region mobile group NiB_thermo subtract NiB NiBfix ###########################################################################3 fix 3 mobile nve fix 6 NiB_thermo temp/berendsen 300 300 $(100.0*dt) thermo 1000 thermo_style custom step c_6_temp etotal epair pe pxx pyy pzz lx ly lz thermo_modify lost warn run 2000 ############################################################################ reset_timestep 0 timestep 0.1 region gas_in block 0 24 0 24 50 52 units box molecule Hydrogen hydrogen.molecule create_atoms 0 single ${XCM} ${YCM} ${ZCM} mol Hydrogen 22222 group addatoms type 2 3 group H2_1 type 2 group H2_2 type 3 fix SHAKE addatoms shake 0.0001 100 0 b 1 fix 2 addatoms nve variable dt equal "timestep" fix 8 addatoms wall/reflect zhi EDGE set group H2_1 x ${X1} y ${Y1} z ${Z1} vx ${VX1} vy ${VY1} vz ${VZ1} set group H2_2 x ${X2} y ${Y2} z ${Z2} vx ${VX2} vy ${VY2} vz ${VZ2} ########################################################### variable T equal "elapsed" variable px1 equal xcm(addatoms,x) variable py1 equal xcm(addatoms,y) variable pz1 equal xcm(addatoms,z) #------------------------------------- variable vxcm equal vcm(addatoms,x) variable vycm equal vcm(addatoms,y) variable vzcm equal vcm(addatoms,z) compute PosH1 H2_1 reduce sum x y z vx vy vz compute PosH2 H2_2 reduce sum x y z vx vy vz variable XH1 equal "c_PosH1[1]" variable YH1 equal "c_PosH1[2]" variable ZH1 equal "c_PosH1[3]" variable VXH1 equal "c_PosH1[4]" variable VYH1 equal "c_PosH1[5]" variable VZH1 equal "c_PosH1[6]" #--------------------------------------------------------------- variable XH2 equal "c_PosH2[1]" variable YH2 equal "c_PosH2[2]" variable ZH2 equal "c_PosH2[3]" variable VXH2 equal "c_PosH2[4]" variable VYH2 equal "c_PosH2[5]" variable VZH2 equal "c_PosH2[6]" fix OUTPUT1 H2_1 print 100 "$T ${XH1} ${YH1} ${ZH1} ${VXH1} ${VYH1} ${VZH1}" append POSVELH1.txt screen no fix OUTPUT2 H2_2 print 100 "$T ${XH2} ${YH2} ${ZH2} ${VXH2} ${VYH2} ${VZH2}" append POSVELH2.txt screen no thermo 100 thermo_style custom step c_6_temp v_px1 v_py1 v_pz1 v_vxcm v_vycm v_vzcm thermo_modify lost warn compute cc1 addatoms chunk/atom molecule compute myChunkPCOM addatoms com/chunk cc1 compute myChunkVCOM addatoms vcm/chunk cc1 compute myChunkOMEGA addatoms omega/chunk cc1 compute myChunkANGMOM addatoms angmom/chunk cc1 compute myChunkInertia addatoms inertia/chunk cc1 variable T equal "elapsed" variable Wx equal c_myChunkOMEGA[1][1] variable Wy equal c_myChunkOMEGA[1][2] variable Wz equal c_myChunkOMEGA[1][3] #--------------------------------------------------------------- variable Angmomx equal c_myChunkANGMOM[1][1] variable Angmomy equal c_myChunkANGMOM[1][2] variable Angmomz equal c_myChunkANGMOM[1][3] #------------------------------------------------------- variable Inertiaxx equal c_myChunkInertia[1][1] variable Inertiayy equal c_myChunkInertia[1][2] variable Inertiazz equal c_myChunkInertia[1][3] variable Inertiaxy equal c_myChunkInertia[1][4] variable Inertiayz equal c_myChunkInertia[1][5] variable Inertiaxz equal c_myChunkInertia[1][6] fix OUTPUT3 addatoms print 100 "$T ${Wx} ${Wy} ${Wz}" append outputOmega.txt screen no fix OUTPUT4 addatoms print 100 "$T ${Angmomx} ${Angmomy} ${Angmomz}" append outputAngmom.txt screen no fix OUTPUT5 addatoms print 100 "$T ${Inertiaxx} ${Inertiayy} ${Inertiazz} ${Inertiaxy} ${Inertiayz} ${Inertiaxz}" append outputInertia.txt screen no variable Z_in equal 42 label loop variable b loop 10 run 5000 if "${pz1} > ${Z_in}" then "jump SELF break" next b jump SELF loop label break variable b delete print "Try number: = ${a}" clear next a next XCM next YCM next ZCM next VX1 next VY1 next VZ1 next VX2 next VY2 next VZ2 next X1 next Y1 next Z1 next X2 next Y2 next Z2 jump input_diatomic.in