#prime simulation settings units lj atom_style full boundary p p f #Simulation box description region simulation_box block 0 40 0 40 0 120 create_box 6 simulation_box bond/types 1 extra/bond/per/atom 2 extra/special/per/atom 5 #mass assignment mass * 1.0 #lattice definition lattice sc 1.0 #substrate insertion in the above mentioned box region xy block EDGE EDGE EDGE EDGE 0.0 1.0 side in units box create_atoms 1 region xy units box group substrate region xy set type 1 charge -0.1 fix 2 substrate setforce 0.0 0.0 0.0 #substrate insertion in the above mentioned box #region xyhi block EDGE EDGE EDGE EDGE 119.0 120.0 side in units box #create_atoms 1 region xyhi units box #group substrate2 region xyhi #fix 4 substrate2 setforce 0.0 0.0 0.0 #The fix wall below replaces the actual substrate2 to cover the top of the simulation box. fix wallhi all wall/lj93 zhi 119.0 1.5 1.0 2.5 units box fix_modify wallhi energy yes #polymer insertion in the above mentioned box #The insertions are carried out in specific regions to avoid overlapping and bond atoms missing error molecule pe_positive pe_positive.tmp molecule counter_ion_positive counter-ion_positive.tmp molecule coion co-ion.tmp molecule pe_negative pe_negative.tmp molecule counter_ion_negative counter-ion_negative.tmp region simuboxp block 0.0 EDGE 0.0 EDGE 20.0 40.0 side in units box region simuboxn block 0.0 EDGE 0.0 EDGE 20.0 40.0 side in units box region boxcp block 0.0 EDGE 0.0 EDGE 42.0 82.0 side in units box region boxcn block 0.0 EDGE 0.0 EDGE 84.0 114.0 side in units box region box block EDGE EDGE EDGE EDGE 115.0 118.0 side in units box create_atoms 0 random 30 145678 simuboxp mol pe_positive 789145 units box create_atoms 0 random 900 568745 boxcp mol counter_ion_positive 456879 units box create_atoms 0 random 320 125478 box mol coion 456854 units box write_data basic_setup.polymer group mobile type 2 3 4 group pe type 2 group cionpe1 type 3 #The group mobile consists of pe1 its counter-ion and co-ion(to neutralize the charged substrate) #communication error #comm_modify mode single cutoff 10.0 vel yes #force field parameters #bond coefficient pair_style lj/cut/coul/long 2.5 15.0 pair_modify shift yes bond_style fene special_bonds fene bond_coeff * 15 2.0 1.0 1.0 kspace_style pppm 0.0001 kspace_modify slab 3.0 dielectric 1.0 #polymer and solvent-interaction pair coefficients definition #The interaction parameters of the polymer-substrate-counterions- coions(to neutralize substrate) pair_coeff 1 1 1.0 1.0 2.5 pair_coeff 1 2 1.0 1.0 2.5 pair_coeff 1 3 1.0 1.0 1.12 pair_coeff 1 4 1.0 1.0 1.12 pair_coeff 1 5 1.0 1.0 2.5 pair_coeff 1 6 1.0 1.0 1.12 pair_coeff 2 2 1.0 1.0 2.5 pair_coeff 2 3 1.0 1.0 1.12 pair_coeff 2 4 1.0 1.0 1.12 pair_coeff 2 5 1.0 1.0 2.5 pair_coeff 2 6 1.0 1.0 1.12 pair_coeff 3 3 1.0 1.0 1.12 pair_coeff 3 4 1.0 1.0 1.12 pair_coeff 3 5 1.0 1.0 1.12 pair_coeff 3 6 1.0 1.0 1.12 pair_coeff 4 4 1.0 1.0 1.12 pair_coeff 4 5 1.0 1.0 1.12 pair_coeff 4 6 1.0 1.0 1.12 pair_coeff 5 5 1.0 1.0 2.5 pair_coeff 5 6 1.0 1.0 1.12 pair_coeff 6 6 1.0 1.0 1.12 #pair_coeff * * 1.0 1.0 2.5 #Run settings timestep 0.01 run_style verlet neighbor 0.3 bin #neigh_modify one 10000 check yes once no cluster no binsize 10000 #minimization min_style cg minimize 1e-12 1e-12 50000 10000 #thermo_style custom step atoms temp epair etotal press #thermo 100 #thermo_modify temp add lost/bond ignore lost warn #thermo_style one #thermo_modify lost ignore #NVT fix for the group mobile previously defined fix 3 mobile nve fix 1 mobile langevin 1 1 2.0 48279 shell mkdir img_cdepo1 dump 1 all image 250000 img_cdepo1/*.jpg type type view 90 90 size 1000 1000 zoom 2 shell mkdir restart_cdepo1 restart 1000 restart_cdepo1/poly.restart write_data after_min_40l.polymer #compute cc pe cluster/atom 1.2 #compute layers1 pe chunk/atom bin/1d z 0.0 0.25 units box #fix den pe ave/chunk 100000 1 100000 layers1 density/number file density_n.txt #dump unad pe custom 500000 dump.myunad.txt* id mol type q x y z thermo 1000 run 10000 write_data 06_05_2022_40l.polymer #Rinsing step after depo 1 region cube block EDGE EDGE EDGE EDGE 3.0 119.0 side in units box region cubec block EDGE EDGE EDGE EDGE EDGE 119.0 side in units box delete_atoms porosity pe cube 1.0 482793 bond yes delete_atoms porosity cionpe1 cubec 1.0 482793 bond yes #Deposition of second layer create_atoms 0 random 30 478589 simuboxn mol pe_negative 5478256 units box create_atoms 0 random 900 214489 boxcn mol counter_ion_negative 426589 units box create_atoms 0 random 360 568745 boxcp mol counter_ion_positive 456879 units box group simurun type 3 5 6 group pe2 type 5 group cionpe2 type 6 #Group "mobile2" consists of Polyelectrolyte-2 with its counter-ions #Group "between_sub" consists of all particles except the substrate fix wallhi all wall/lj93 zhi 119.0 1.5 1.0 2.5 units box fix_modify wallhi energy yes #minimization min_style cg minimize 1e-12 1e-12 50000 10000 #NVT fix fix 4 simurun nve fix 5 simurun langevin 1.0 1.0 2.0 48279 shell mkdir img_cdepo2 dump 2 all image 250000 img_cdepo2/*.jpg type type view 90 90 size 1000 1000 zoom 2 shell mkdir restart_cdepo2 restart 1000 restart_cdepo2/poly.restart write_data 06_05_2022_40l_aftermin_depo2.polymer compute layers2 pe2 chunk/atom bin/1d z 0.0 0.25 units box fix den2 pe2 ave/chunk 1000 1 1000 layers2 density/number file density_n_2.txt dump unad2 pe2 custom 1000 dump.myunad2.txt* id mol type q x y z thermo 100 run 10000 write_data after_deletion2.pol #Taking out the unadsorbed polymeric layer 2 region cube2 block EDGE EDGE EDGE EDGE 4.0 119.0 side in units box region cubec2 block EDGE EDGE EDGE EDGE EDGE 119.0 side in units box delete_atoms porosity pe2 cube2 1.0 482793 bond yes delete_atoms porosity cionpe2 cubec2 1.0 482793 bond yes write_data after_deletion_3.pol #deposition of third layer create_atoms 0 random 30 458975 simuboxp mol pe_positive 145256 units box create_atoms 0 random 900 256365 boxcp mol counter_ion_positive 254369 units box create_atoms 0 random 30 256321 boxcn mol counter_ion_negative 458742 units box group mobile type 2 3 4 group pe type 2 group cionpe1 type 3 write_data basic_set_up_3.pol fix wallhi all wall/lj93 zhi 119.0 1.5 1.0 2.5 units box fix_modify wallhi energy yes #minimization min_style cg minimize 1e-12 1e-12 50000 10000 #NVT fix fix 3 mobile nve fix 1 mobile langevin 1.0 1.0 2.0 48279 shell mkdir img_cdepo3 dump 3 all image 250000 img_cdepo3/*.jpg type type view 90 90 size 1000 1000 zoom 2 shell mkdir restart_cdepo3 restart 1000 restart_cdepo3/poly.restart write_data 06_05_2022_40l_aftermin_depo3.polymer #compute layers3 pe chunk/atom bin/1d z 0.0 0.25 units box #fix den3 pe ave/chunk 1000 1 1000 layers3 density/number file density_n_3.txt #dump unad3 pe custom 1000 dump.myunad3.txt* id mol type q x y z thermo 100 run 500000 write_data data_after_3_insertion.pol