# LAMMPS Input File # Licensed under CC BY 4.0 # A Set of Tutorials for the LAMMPS Simulation Package (LiveCoMS, 2025) # By Simon Gravelle, Cecilia M. S. Alvares, Jacob R. Gissinger, and Axel Kohlmeyer # Please cite doi.org/10.33011/livecoms.6.1.3037 # Find more on GitHub: https://github.com/lammpstutorials units metal atom_style atomic boundary f f f read_data breakable.data pair_style airebo 3.0 pair_coeff * * CH.airebo C group carbon_atoms type 1 variable xmax equal bound(carbon_atoms,xmax)-0.5 variable xmin equal bound(carbon_atoms,xmin)+0.5 region rtop block ${xmax} INF INF INF INF INF region rbot block INF ${xmin} INF INF INF INF region rmid block ${xmin} ${xmax} INF INF INF INF group cnt_top region rtop group cnt_bot region rbot group cnt_mid region rmid variable xmax_del equal ${xmax}-2 variable xmin_del equal ${xmin}+2 region rdel block ${xmin_del} ${xmax_del} INF INF INF INF group rdel region rdel delete_atoms random fraction 0.02 no rdel NULL 482793 reset_atoms id sort yes velocity cnt_mid create 300 48455 mom yes rot yes fix mynve1 cnt_top nve fix mynve2 cnt_bot nve fix mynvt cnt_mid nvt temp 300 300 0.1 fix mysf1 cnt_bot setforce 0 0 0 fix mysf2 cnt_top setforce 0 0 0 velocity cnt_bot set 0 0 0 velocity cnt_top set 0 0 0 variable Lcnt equal xcm(cnt_top,x)-xcm(cnt_bot,x) variable Fcnt equal f_mysf1[1]-f_mysf2[1] dump viz all image 500 myimage.*.ppm type type size 1000 400 zoom 4 shiny 0.3 adiam 1.5 box no 0.01 view 0 90 shiny 0.1 fsaa yes dump_modify viz pad 5 backcolor white acolor 1 gray compute Tmid cnt_mid temp thermo 100 thermo_style custom step temp etotal v_Lcnt v_Fcnt thermo_modify temp Tmid line yaml timestep 0.0005 run 10000 velocity cnt_top set 0.75 0 0 velocity cnt_bot set -0.75 0 0 run 30000