# This is the control script for LAMMPS echo both log N=10.out #------------------------------------------------------------------------------- # Stage 2.1: Initialize LAMMPS run for 3-d periodic #------------------------------------------------------------------------------- units metal boundary p p p atom_style full read_data structure.dat pair_style comb3 polar_off pair_coeff * * comb3parameters.dat Cu O variable R equal 0.00198722 variable sysvol equal vol variable sysmass equal mass(all)/6.0221367e+23 variable sysdensity equal v_sysmass/v_sysvol/1.0e-24 variable coulomb equal ecoul+elong variable etotal equal etotal variable pe equal pe variable ke equal ke variable evdwl equal evdwl variable epair equal epair variable ebond equal ebond variable eangle equal eangle variable edihed equal edihed variable eimp equal eimp variable lx equal lx variable ly equal ly variable lz equal lz variable cella equal lx variable cellb equal sqrt(ly*ly+xy*xy) variable cellc equal sqrt(lz*lz+xz*xz+yz*yz) variable cellalpha equal acos((xy*xz+ly*yz)/(v_cellb*v_cellc)) variable cellbeta equal acos(xz/v_cellc) variable cellgamma equal acos(xy/v_cellb) variable p equal press variable pxx equal pxx variable pyy equal pyy variable pzz equal pzz variable pyz equal pyz variable pxz equal pxz variable pxy equal pxy variable sxx equal -pxx variable syy equal -pyy variable szz equal -pzz variable syz equal -pyz variable sxz equal -pxz variable sxy equal -pxy variable fmax equal fmax variable fnorm equal fnorm variable time equal step*dt+0.000001 thermo_style custom step v_time press vol v_sysdensity temp ebond eangle edihed eimp evdwl ecoul pe ke thermo_modify flush yes # # Set up the fixed and movable groups # group movable union all group fixed subtract all movable #------------------------------------------------------------------------------- # Stage 2.2: Set the initial velocities for $T #------------------------------------------------------------------------------- velocity all create 300 72489 dist gaussian mom yes rot no #------------------------------------------------------------------------------- # Stage 2.3: NPT integration for 40 ps with a timestep of 1 fs # Temperature 300 K # Pressure 1 atm #------------------------------------------------------------------------------- reset_timestep 0 thermo_style custom step v_time press vol v_sysdensity temp evdwl ecoul pe ke etotal thermo 400 fix 1 movable npt temp 300 300 0.1 iso 1.01325 1.01325 0.1 drag 0 mtk yes nreset 400 fix 2 movable ave/time 1 3999 4000 v_time c_thermo_temp v_etotal v_pe v_ke v_evdwl v_coulomb file N=10_2.3_averages.txt off 1 fix 3 movable ave/time 4 1 4 v_time c_thermo_temp v_etotal v_pe v_ke v_evdwl v_coulomb file N=10_2.3_instantaneous.txt off 1 fix 4 all qeq/comb 10 0.001 file N=10_fq.out restart 20000 N=10_2.3.restart timestep 0.001 run 40000 restart 0 unfix 1 unfix 2 unfix 3 unfix 4 #------------------------------------------------------------------------------- # Stage 2.4: NVE integration for 30 ps with a timestep of 1 fs #------------------------------------------------------------------------------- reset_timestep 0 thermo_style custom step v_time press temp evdwl ecoul pe ke etotal thermo 300 fix 1 movable nve fix 2 movable ave/time 1 3000 3000 v_time c_thermo_temp v_etotal v_pe v_ke v_evdwl v_coulomb file N=10_2.4_averages.txt fix 3 movable ave/time 3 1 3 v_time c_thermo_temp v_etotal v_pe v_ke v_evdwl v_coulomb file N=10_2.4_instantaneous.txt fix 4 all qeq/comb 10 0.001 file N=10_fq.out restart 30000 N=10_2.4.restart timestep 0.001 run 30000 restart 0 unfix 1 unfix 2 unfix 3 unfix 4