# This is the control script for LAMMPS. Run LAMMPS on GPU echo both log 2.1_Initialize.out #------------------------------------------------------------------------------- # Stage 2.1: Initialize LAMMPS run for 3-d periodic #------------------------------------------------------------------------------- units real boundary p p p atom_style full atom_modify map array box tilt large read_data structure.dat pair_style reax/c NULL checkqeq no safezone 10.0 mincap 1000 pair_coeff * * parameters.dat C H O Si 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 Nthermo equal 0 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 variable surfacetension equal 0.5*v_lz*(0.5*(v_sxx+v_syy)-v_szz) thermo_style custom step v_time press vol v_sysdensity temp ebond eangle edihed eimp evdwl ecoul etail elong pe ke thermo_modify flush yes # # Set up the fixed and movable groups # group movable union all group fixed subtract all movable compute sum_f1 movable reduce sum fx fy fz variable sum_fx equal c_sum_f1[1] variable sum_fy equal c_sum_f1[2] variable sum_fz equal c_sum_f1[3] # # Subsets # group subset_thermoset id 1 2 3 4 5 6 7 8 9 10 group subset_thermoset id 11 12 13 14 15 16 17 18 19 20 group subset_thermoset id 21 22 23 24 25 26 27 28 29 30 group subset_thermoset id 31 32 33 34 35 36 37 38 39 40 group subset_thermoset id 41 42 43 44 45 46 47 48 49 50 group subset_thermoset id 51 52 53 54 55 56 57 58 59 60 group subset_thermoset id 61 62 63 64 65 66 67 68 69 70 group subset_thermoset id 71 72 73 74 75 76 77 78 79 80 group subset_thermoset id 81 82 83 84 85 86 87 88 89 90 group subset_thermoset id 91 92 93 94 95 96 97 98 99 100 group subset_thermoset id 101 102 103 104 105 106 107 108 109 110 group subset_thermoset id 111 112 113 114 115 116 117 118 119 120 group subset_thermoset id 121 122 123 124 125 126 127 128 129 130 group subset_thermoset id 131 132 133 134 135 136 137 138 139 140 group subset_thermoset id 141 142 143 144 145 146 147 148 149 150 group subset_thermoset id 151 152 153 154 155 156 157 158 159 160 group subset_thermoset id 161 162 163 164 165 166 167 168 169 170 group subset_thermoset id 171 172 173 174 175 176 177 178 179 180 group subset_thermoset id 181 182 183 184 185 186 187 188 189 190 group subset_thermoset id 191 192 193 194 195 196 197 198 199 200 group subset_thermoset id 201 202 203 204 205 206 207 208 209 210 group subset_thermoset id 211 212 213 214 215 216 217 218 219 220 group subset_thermoset id 221 222 223 224 225 226 227 228 229 230 group subset_thermoset id 231 232 233 234 235 236 237 238 239 240 group subset_thermoset id 241 242 243 244 245 246 247 248 249 250 group subset_thermoset id 251 252 253 254 255 256 257 258 259 260 group subset_thermoset id 261 262 263 264 265 266 267 268 269 270 group subset_thermoset id 271 272 273 274 275 276 277 278 279 280 group subset_thermoset id 281 282 283 284 285 286 287 288 289 290 group subset_thermoset id 291 292 293 294 295 296 297 298 299 300 group subset_thermoset id 301 302 303 304 305 306 307 308 309 310 group subset_thermoset id 311 312 313 314 315 316 317 318 319 320 group subset_thermoset id 321 322 323 324 325 326 327 328 329 330 group subset_thermoset id 331 332 333 334 335 336 337 338 339 340 group subset_thermoset id 341 342 343 344 345 346 347 348 349 350 group subset_thermoset id 351 352 353 354 355 356 357 358 359 360 group subset_thermoset id 361 362 363 364 365 366 367 368 369 370 group subset_thermoset id 371 372 373 374 375 376 377 378 379 380 group subset_thermoset id 381 382 383 384 385 386 387 388 389 390 group subset_thermoset id 391 392 393 394 395 396 397 398 399 400 group subset_thermoset id 401 402 403 404 405 406 407 408 409 410 group subset_thermoset id 411 412 413 414 415 416 417 418 419 420 group subset_thermoset id 421 422 423 424 425 426 427 428 429 430 group subset_thermoset id 431 432 433 434 435 436 437 438 439 440 group subset_thermoset id 441 442 443 444 445 446 447 448 449 450 group subset_thermoset id 451 452 453 454 455 456 457 458 459 460 group subset_thermoset id 461 462 463 464 465 466 467 468 469 470 group subset_thermoset id 471 472 473 474 475 476 477 478 479 480 group subset_thermoset id 481 482 483 484 485 486 487 488 489 490 group subset_thermoset id 491 492 493 494 495 496 497 498 499 500 group subset_thermoset id 501 502 503 504 505 506 507 508 509 510 group subset_thermoset id 511 512 513 514 515 516 517 518 519 520 group subset_thermoset id 521 522 523 524 525 526 527 528 529 530 group subset_thermoset id 531 532 533 534 535 536 537 538 539 540 group subset_thermoset id 541 542 543 544 545 546 547 548 549 550 group subset_thermoset id 551 552 553 554 555 556 557 558 559 560 group subset_thermoset id 561 562 563 564 565 566 567 568 569 570 group subset_thermoset id 571 572 573 574 575 576 group subset_TMOS id 577 578 579 580 581 582 583 584 585 log 2.2_Velocities.out #------------------------------------------------------------------------------- # Stage 2.2: Set the initial velocities for $T #------------------------------------------------------------------------------- velocity movable create 300 72489 dist gaussian mom yes rot no log 2.3_Deposition.out #------------------------------------------------------------------------------- # Stage 2.3: NVE integration for Deposition for 100 ps with a timestep of 0.2 fs #------------------------------------------------------------------------------- group deposition_atoms_TMOS id 577 578 579 580 581 582 583 584 group deposition_atoms_TMOS id 585 delete_atoms group deposition_atoms_TMOS molecule depositing_species_TMOS deposition_TMOS.dat region deposition_region_TMOS block EDGE EDGE EDGE EDGE 50 60 units box region evaporation_region block EDGE EDGE EDGE EDGE 90 EDGE units box group evaporation_group dynamic all region evaporation_region every 1000 uncompute thermo_temp compute thermo_temp movable temp thermo_style custom step v_time press vol v_sysdensity temp ebond eangle edihed eimp evdwl ecoul etail elong pe ke thermo ${Nthermo} fix 1 movable nve fix 2 evaporation_group reax/c/species 1 1 1000 removed_fragments.out element C H O Si terse yes fix 3 all evaporate 1000 1000 evaporation_region 781778893 molecule yes fix dlan subset_thermoset langevin 300 300 20.0 19 tally yes fix 4 movable ave/time 1 50000 50000 v_time c_thermo_temp c_thermo_press v_sysvol v_sysdensity v_etotal v_pe v_ke v_evdwl v_coulomb v_sxx v_syy v_szz v_syz v_sxz v_sxy f_dlan file 2.3_averages.txt off 1 fix 5 movable ave/time 50 1 50 v_time c_thermo_temp c_thermo_press v_sysvol v_sysdensity v_etotal v_pe v_ke v_evdwl v_coulomb v_sxx v_syy v_szz v_syz v_sxz v_sxy f_dlan file 2.3_instantaneous.txt fix 6 all qeq/reax 1 0.0 10.0 1.0e-6 reax/c fix deposition_TMOS_1 deposition_atoms_TMOS deposit 25 0 20000 781778893 region deposition_region_TMOS mol depositing_species_TMOS vz -0.0085422355970294159 -0.010440510174147065 vx 0.0 0.0 vy 0.0 0.0 near 1.50 id next units box fix deposition_TMOS_2 deposition_atoms_TMOS nve dump trj all custom 50000 2.3.Trajectory.xyz id mol type q xs ys zs fix trjE all ave/time 50000 1 50000 v_etotal v_pe v_ke file 2.3.energies.txt dump trj_TMOS deposition_atoms_TMOS custom 50000 2.3.trajectory_1.xyz id mol type q xs ys zs timestep 0.2 run 500000 write_dump all xyz final_2.3.xyz modify element C H O Si undump trj unfix trjE undump trj_TMOS write_dump deposition_atoms_TMOS custom 2.3.deposited_1.xyz id mol type q xs ys zs restart 0 dump sci all custom 500000 2.3.xyz id mol type q xs ys zs run 0 undump sci unfix 1 unfix 2 unfix 3 unfix 4 unfix 5 unfix 6 unfix deposition_TMOS_1 unfix deposition_TMOS_2 unfix dlan