# This script will strain the system in the x-direction until 20% strain at 300 K and 1.0 atm. Using IFF-R bond coefficients ########################## ### Simulation history ### ########################## # IFF # densify 125 Nylon 6 monomers to a cube at a rate of 10 A/ns until a density of 1.084 g/cc is achieved. NVT at 300 K. # Polymerized over 200 ps at 300 K. NVT. Delete water molecules after 200 ps. Then run nve/limit 0.1 for 50 ps. Then run NVT at 300 K for 100 ps to stabilize the system after the removal of all water molecules. Then run NPT iso at 300 K and 1.0 atm for 100 ps to ensure system is ready for the equilibration run. Crosslink percent = 114/125 = 0.912. Networking percent = (125-14)/125 = 0.888. # Equilibrated for 2 ns at 300 K and 1.0 atm (NPT aniso). ################################# ### Initialization & Settings ### ################################# # Debugging echo screen units real dimension 3 boundary p p p variable myid string N0228IFFRPlyYM1125 variable data string N0228IFFRPlyEq125.dat log ${myid}.log.lammps variable thermo_freq equal 1000 variable dump_freq equal 10*${thermo_freq} timestep 1 #fs variable strain equal 0.2 variable strain_rate_s equal 2e8 #in 1/s variable dir equal 1 # dir 1 means x # dir 2 means y # dir 3 means z ############################## ### Force Field Parameters ### ############################## atom_style full bond_style hybrid class2 morse angle_style class2 dihedral_style class2 improper_style class2 special_bonds lj/coul 0 0 1 pair_style lj/class2/coul/long 10.0 pair_modify mix sixthpower kspace_style pppm 1e-6 read_data ${data} # Include IFF-R bond coefficients include N6_IFFR.coeff variable strain_rate_fs equal ${strain_rate_s}*1e-15 # in 1/fs variable totaltime equal ${strain}/${strain_rate_fs} # total time in femtoseconds variable steps equal ${totaltime}/dt variable quarter_steps equal $(round(v_steps/4)) variable eeng equal time*${strain_rate_fs} variable etrue equal ln(1+v_eeng) ############################## ########### Strains ########## ############################## variable tmp equal lx variable lx0 equal ${tmp} variable tmp equal ly variable ly0 equal ${tmp} variable tmp equal lz variable lz0 equal ${tmp} variable eengx equal (lx-${lx0})/${lx0} variable eengy equal (ly-${ly0})/${ly0} variable eengz equal (lz-${lz0})/${lz0} variable etruex equal ln(1+v_eengx) variable etruey equal ln(1+v_eengy) variable etruez equal ln(1+v_eengz) ############################## ########## Stresses ########## ############################## compute p all pressure thermo_temp variable sxx equal -0.101325*c_p[1] #in MPa variable syy equal -0.101325*c_p[2] #in MPa variable szz equal -0.101325*c_p[3] #in MPa fix sxx_ave all ave/time 1 ${thermo_freq} ${thermo_freq} v_sxx fix syy_ave all ave/time 1 ${thermo_freq} ${thermo_freq} v_syy fix szz_ave all ave/time 1 ${thermo_freq} ${thermo_freq} v_szz ############################## ### Thermo & Dump Settings ### ############################## compute kpa all ke/atom compute ppa all pe/atom thermo ${thermo_freq} thermo_style custom step temp press etotal ke pe epair ebond eangle edihed eimp elong lx ly lz pxx pyy pzz v_etrue v_eengx v_eengy v_eengz v_etruex v_etruey v_etruez v_sxx v_syy v_szz f_sxx_ave f_syy_ave f_szz_ave vol density v_dir dump 1 all custom/gz ${dump_freq} ${myid}.lammpstrj.gz x y z type id c_ppa c_kpa #################### ### Run Settings ### #################### neigh_modify delay 0 every 1 check yes one 2500 page 100000 if "${dir} == 1" then & "fix 1 all npt temp 300 300 100 y 1 1 1000 z 1 1 1000" & "fix 2 all deform 1 x erate ${strain_rate_fs}" if "${dir} == 2" then & "fix 1 all npt temp 300 300 100 x 1 1 1000 z 1 1 1000" & "fix 2 all deform 1 y erate ${strain_rate_fs}" if "${dir} == 3" then & "fix 1 all npt temp 300 300 100 x 1 1 1000 y 1 1 1000" & "fix 2 all deform 1 z erate ${strain_rate_fs}" # Breaking up the runs resets the pppm grid points which increases accuracy when box size changes run ${quarter_steps} run ${quarter_steps} run ${quarter_steps} run ${quarter_steps} write_data ${myid}_${dir}.dat