| 1 |
# Periodic boundary conditions: |
| 2 |
|
| 3 |
write_once("Data Boundary") { |
| 4 |
0 32.5 xlo xhi |
| 5 |
0 32.5 ylo yhi |
| 6 |
0 32.5 zlo zhi |
| 7 |
} |
| 8 |
|
| 9 |
# Define the molecules we will need |
| 10 |
|
| 11 |
import NIPAM_polymer_10mer.lt # defines NIPAM_polymer_10mer |
| 12 |
import ca++.lt # defines Ca |
| 13 |
import cl-.lt # defines Cl |
| 14 |
import spce_oplsaa2024.lt # defines SPCE |
| 15 |
|
| 16 |
|
| 17 |
# 1) Create a single copy of the polymer. |
| 18 |
# (I moved it by an amount (1.25, 16, 14) to reduce overlapping with the water.) |
| 19 |
|
| 20 |
pol = new NIPAM_polymer_10mer.move(1.25, 14, 12) |
| 21 |
|
| 22 |
|
| 23 |
# 2) Create a random mixture of 3 types of small molecules in a box |
| 24 |
# - 970 water molecules (SPCE), |
| 25 |
# - 1 calcium ion (Ca) |
| 26 |
# - 2 chloride ions (Cl) |
| 27 |
# We will distribute them on a 10x10x10 lattice with spacing 3.25. |
| 28 |
|
| 29 |
solvent = new random([SPCE,Ca,Cl,], [970,1,2,27], 12345) |
| 30 |
[10].move(3.25, 0, 0) |
| 31 |
[10].move(0, 3.25, 0) |
| 32 |
[10].move(0, 0, 3.25) |
| 33 |
|
| 34 |
# (970 of 1000 lattice sites are occupied by water, 1 by a Ca ion, 2 by Cl ions. |
| 35 |
# The remaining 27 lattice sites are unoccupied. "12345" is a random seed. |
| 36 |
# For details read about the "new random" command in section 8.9.1 in the |
| 37 |
# moltemplate manual: "Random multidimensional arrays with exact type counts") |
| 38 |
|