# Mark Tschopp, 2010 # ---------- Initialize Simulation --------------------- clear units metal dimension 3 boundary p p p #read data atom_style full read_data graphane2.coor #set atom 1 charge -0.060 #set atom 2 charge 0.060 # ---------- Define Interatomic Potential --------------------- #pair_style tersoff pair_style airebo 2.5 1 0 pair_coeff * * CH.airebo C H pair_coeff * * CH.airebo C C # ---------- Define Settings --------------------- compute peng all pe compute eng all pe/atom compute eatoms all reduce sum c_eng # ---------- Run Minimization --------------------- reset_timestep 0 fix 1 all box/relax iso 0.0 vmax 0.001 thermo 10 thermo_style custom step pe lx ly lz press pxx pyy pzz c_peng dump 2 all custom 1000 md.lammpstrj id type x y z min_style cg minimize 1e-25 1e-25 50000 100000 change_box all y scale 1.1 z volume x volume remap fix 1 all box/relax iso 0.0 vmax 0.001 thermo 10 thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms dump 3 all custom 10 md.lammpstrj id type x y z min_style cg minimize 1e-25 1e-25 50000 100000 variable catoms equal 120 variable hatoms equal 120 variable tenergy equal "c_peng" variable teng equal "c_eatoms" variable length equal "lx" variable ecoh equal "v_energy/v_catoms" print "Total energy (eV) = ${tenergy};" print "Lattice constant (Angstoms) = ${length};" print "Cohesive energy (eV) = ${ecoh};" print "All done!"