# ------------- initialisation ---------------- atom_style full units real dimension 3 boundary p p p # ------------- variables ---------------- variable T equal 300 variable Ctype equal 1 variable Htype equal 2 variable seed equal 1 variable pressure equal 0.0001 variable 1atm equal -0.000033 # ------------- potential types ---------------- pair_style airebo 2.5 1 1 pair_modify tail yes bond_style harmonic angle_style harmonic dihedral_style none # ------------- Data ---------------- read_data dataMem.data variable natoms equal "count(all)" # ------------- Groups and regions ---------------- group carbon type ${Ctype} variable ymax equal bound(carbon,ymax)-4.5 variable ymin equal bound(carbon,ymin)+4.5 region rtop block INF INF ${ymax} INF INF INF region rbot block INF INF INF ${ymin} INF INF region rmid block INF INF ${ymin} ${ymax} INF INF group gtop region rtop group gbot region rbot group gmid region rmid # ------------- Coefficients ---------------- pair_coeff * * CH.airebo_real C H bond_coeff * 0.0 0.0 angle_coeff * 0.0 0.0 # ------------- neighboring ---------------- neighbor 4.0 bin neigh_modify every 1 delay 0 check yes velocity gmid create ${T} 48455 mom yes rot yes fix mynve all nve compute Tmid gmid temp fix myber gmid temp/berendsen ${T} ${T} 0.1 fix_modify myber temp Tmid # ------------- Minimization ---------------- fix relax all box/relax x 0.0 y 0.0 minimize 1.0e-4 1.0e-6 100 1000 unfix relax # ------------- Mechanical test ---------------- fix mysf1 gtop setforce 0 NULL 0 fix mysf2 gbot setforce 0 NULL 0 velocity gtop set 0 NULL 0 velocity gbot set 0 NULL 0 variable pos equal xcm(gtop,y) fix at1 all ave/time 10 100 1000 v_pos file cnt_deflection.dat fix at2 all ave/time 10 100 1000 f_mysf1[1] f_mysf2[1] file force.dat dump mydmp all atom 1000 dump.lammpstrj thermo 100 thermo_modify temp Tmid # Run timestep 0.0005 run 5000 variable var loop 50 label loop displace_atoms gtop move 0 0.1 0 displace_atoms gbot move 0 -0.1 0 run 1000 next var jump input1.in loop