This algorithm utilizes the symmetry of a 'voxel' containing a particular cargo in 3D space, and combinatorically searches for the minimum number of unique DNA bonds or 'colors' needed to facilitate the self-assembly of such a particle design.
Install the requirements requirements.txt
and the current algorithm can all be run from the jupyter notebook in /notebooks/algorithm.ipynb
- Create a Lattice structure with Voxel/Bond objects
- Build out the 'Surroundings'
- Create SymmetryDf containing all possible truth values of symmetries between any two voxels
On a high level, the current coloring algorithm is as follows:
"Preprocessing"
- Define all structurally unique voxels using SymmetryDf
- Paint all bonds between structural voxels
- Paint self-symmetries
- MapPaint the rest of the Lattice
"Main loop"
- For each Voxel in Lattice -> for each Bond in Voxel
- Paint that bond and its partner bond (if both are unpainted)
- Paint both with their self-symmetries
- MapPaint the rest of the Lattice
The MapPaint function accounts for the following binding constraints:
- Bond color complimentarity
- No palindromic binding
To test out a simple GUI to create and visualize a lattice (doesn't implement coloring algorithm yet), run the following in the directory root:
python main.py
- Left button drag / Arrow keys: Rotates the scene around a central point
- Middle button drag: Pan the scene by moving the central “look-at” point within the x-y plane
- Middle button drag + CTRL: Pan the scene by moving the central “look-at” point along the z axis
- Wheel spin: zoom in/out
- Wheel + CTRL(or CMD): change field-of-view angle