shanilpanara / origamiUROP

Autonomous Generation of DNA Origami Nanostructures - Summer Project
GNU General Public License v3.0
1 stars 3 forks source link

Enforcing 180 degrees turns in structures #49

Closed shanilpanara closed 4 years ago

shanilpanara commented 4 years ago

Summary

In order to explore unstable structures, we want to enforce 180 degree turns between two crossovers (i.e. 180, 540, 900... etc) whether or not this is the natural twist configuration.

We will therefore need a way to control this.

shanilpanara commented 4 years ago

achieved in https://github.com/shanilpanara/origamiUROP/pull/46/commits/6d453b84b110a68cdcbf55d0365624b6aeca4cc1 @debeshmandal

Summary

  1. Find closest half turn for the number of nucleotides
    • i.e. 0.5, 1.5, 2.5
  2. Calculate angle and convert to radians, e.g.:
    • 0.5 = 180° rotation spread between n-1 bonds
    • 1.5 = 540° rotation spread between n-1 bonds
    • 2.5 = 900° rotation spread between n-1 bonds

Variables


Code added directly into generate_helix()

    if enforce_180 and not n == 1:
        half_turns = round_to_multiple(n/bp_per_turn, 0.5, 1)
        # minus one because for x nt there will only be x-1 bonds
        angle = np.radians(360*half_turns / (n-1) )
    else:
        angle = 0.626