#this is the file to calculate the enegy of a carbon sheet #-----------------INITIALIZATION----------------- clear units metal dimension 3 boundary s s s atom_style charge #-----------------ATOM DEFINITION---------------- read_data data #-----------------FORCE FIELD-------------------- pair_style comb3 polar_off pair_coeff * * ffield.comb3 C neighbor 2.0 bin neigh_modify delay 10 check yes mass 1 12 #---------------------------Settings---------------------------- 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 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}"