Setup Self-assembly Model for Platonic Solid (Dodecahedron as Example)¶
Platonic solid is a series of 3-dimensional geometry solid that each face is congruent and all faces are regular polygons. Besides, same number of faces will meet at each vertex. The platonic solids can be considered as the most regular 3-D solids because all of their properties are regular. The length of each edge, the angle between each edge and between each face are all identical. There are 5 kinds of Platonic solids existing and dodecahedron will be introduced as an example.
Dodecahedron possesses 12 faces, 20 vertex and 30 edges. The coordinates of each vertex is given as follows:
By simply multiplying the above coordinates by a fixed factor, the effect of changing the size of the model in equal proportions can be achieved, thus allowing the diameter of the model to be adjusted.
For a self-assembly model, the center-of-mass(COM) can be located either in the center of each face or at each vertex for dodecahedron. The face-centered COM will be discussed here because more calculation is involved for this model.
For a dodecahedron with face-centered COM, each monomer will occupy one single face and the COM of each monomer is in the center of each face. Also, each reacting interface is in the middle point of each edge when sigma is ignored for now. Therefore the next step will be calculate the coordinates of each COM and their corresponding legs.
For a regular pentagon, the coordinates of its five vertices are known, where the point coordinates can be derived by the following calculation.
To validate the calculated point is correct, the calculation above is repeated for three times starting with the vertex B and C so that three center point is obtained. The calculated coordinates finally overlap with each other proof that the calculation is correct.
When considering sigma, the length of each leg will be reduced and its length can be calculated as follows.
After calculating the reduced length, the coordinates of each COM and each new interface will be obtained and ready to use.
The angle calculation is explained in detail in the SI (section II) of the NERDSS paper: ‘NERDSS: A Nonequilibrium Simulator for Multibody Self-Assembly at the Cellular Scale’. It will not be repeated here.
Model Creation¶
[1]:
import sys
import os
# Go two levels up from docs/source/ to reach the project root
sys.path.insert(0, os.path.abspath('../../'))
from ionerdss.model_setup.platonic_solids.dode import dode_face
print('Imports successful!')
Imports successful!
Then, choose the desired Platonic solid model and run corresponding function with reasonable radius and sigma value input. The name of function is ‘NameOfPlatonicSolid_Face/Vert(radius, sigma)’.
[2]:
dode_face(radius = 40.0, sigma = 1.0)
File writing complete!
[2]:
0
After running this function, a message indicating ‘File writing complete!’ will show up and two input files will be generated in the same directory with your current Python file. One is ‘parm.inp’ and the other is ‘XXXX.mol’ depending on the model used. Also, if the default built-in parameters (e.g. trajWrite, pdbWrite, onRate3Dka, offRatekb, etc.) need to be modified, users can manually change them accordingly.
Also, avoid generating multiple input files in the same path, or the older .inp file will be overwritten by the newly created one.
5. Running Simulation¶
To run the simulation, copy the ‘nerdss.exe’ file generated in the first step in the same directory as .inp and .mol file. Open the same directory in terminal and run command below in system command line to start simulation:
./nerdss -f parm.inp