#this is the file to calculate vacancy formation energy of carbon fiber #-----------------INITIALIZATION----------------- clear units metal dimension 3 boundary p p p atom_style full #-----------------ATOM DEFINITION---------------- read_data datach4 #-----------------FORCE FIELD-------------------- pair_style comb3 polar_off pair_coeff * * ffield.comb3 C H neighbor 2.0 bin neigh_modify delay 10 check yes mass 1 12 mass 2 1 #---------------------------Settings---------------------------- compute csym all centro/atom fcc compute eng all pe/atom compute eatoms all reduce sum c_eng #----------------------Run Minimization------------------------- reset_timestep 0 thermo 10 thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms temp dump 1 all custom 200 dump.relax.1.* id type xs ys zs c_eng fix 1 all qeq/comb 10 1e-3 min_style cg minimize 1e-15 1e-15 5000 5000 run 0 undump 1 #variable N equal count(all), counts the total number of atoms in the cell #the total number of atoms is stored to the variable N variable N equal count(all) variable No equal $N #variable Ei equal "c_eatoms" computes the initial energy of the cell system before the vacancy #E is needed to store the initial energy of the system to the variable Ei variable E equal "c_eatoms" variable Ei equal $E #--------------------------------------------------------------- ###################################### # SIMULATION DONE print "All done" print "Total number of atoms = ${No}" print "Initial energy of atoms = ${Ei}"