def main(): length = 16 helices = [ sc.Helix(major_tick_distance=4, max_offset=length, position=sc.Position3D(x=0, y=0, z=0), min_offset=0), sc.Helix(major_tick_distance=4, max_offset=length, position=sc.Position3D(x=0, y=3, z=3), min_offset=8), sc.Helix(major_tick_distance=4, max_offset=length, position=sc.Position3D(x=2.5, y=-3, z=8), min_offset=0), sc.Helix(major_tick_distance=4, max_offset=length, position=sc.Position3D(x=2.5, y=1, z=11), min_offset=8), ] design = sc.DNADesign(helices=helices, strands=[ sc.Strand([sc.Domain(0, True, 0, length)]), sc.Strand([sc.Domain(1, True, 8, length)]), sc.Strand([sc.Domain(2, True, 0, length)]), sc.Strand([sc.Domain(3, True, 8, length)]), ], grid=sc.Grid.none) return design
def main(): # helices helices = [sc.Helix(max_offset=48), sc.Helix(max_offset=48)] # left staple stap_left_ss1 = sc.Domain(helix=1, forward=True, start=8, end=24) stap_left_ss0 = sc.Domain(helix=0, forward=False, start=8, end=24) stap_left = sc.Strand(domains=[stap_left_ss1, stap_left_ss0]) # right staple stap_right_ss0 = sc.Domain(helix=0, forward=False, start=24, end=40) stap_right_ss1 = sc.Domain(helix=1, forward=True, start=24, end=40) stap_right = sc.Strand(domains=[stap_right_ss0, stap_right_ss1]) stap_right.set_modification_5p(mod.biotin_5p) # scaffold scaf_ss1_left = sc.Domain(helix=1, forward=False, start=8, end=24) scaf_ss0 = sc.Domain(helix=0, forward=True, start=8, end=40) loopout = sc.Loopout(length=3) scaf_ss1_right = sc.Domain(helix=1, forward=False, start=24, end=40) scaf = sc.Strand(domains=[scaf_ss1_left, scaf_ss0, loopout, scaf_ss1_right], is_scaffold=True) # whole design design = sc.DNADesign(helices=helices, strands=[scaf, stap_left, stap_right], grid=sc.square) # deletions and insertions added to design are added to both strands on a helix design.add_deletion(helix=1, offset=20) design.add_insertion(helix=0, offset=14, length=1) design.add_insertion(helix=0, offset=26, length=2) # also assigns complement to strands other than scaf bound to it design.assign_dna(scaf, 'AACGT' * 18) return design
def create_design(): length = 10 helices = [ sc.Helix(max_offset=length, position=sc.Position3D(x=0, y=0, z=2.5), pitch=0, roll=0, yaw=0), sc.Helix(max_offset=length, position=sc.Position3D(x=3, y=3, z=0), pitch=0, roll=0, yaw=0), sc.Helix(max_offset=length, position=sc.Position3D(x=8, y=-3, z=0), pitch=0, roll=0, yaw=0), sc.Helix(max_offset=length, position=sc.Position3D(x=11, y=1, z=0), pitch=0, roll=0, yaw=0), ] stap_ss = sc.Domain(0, True, 0, length) scaf_ss = sc.Domain(0, False, 0, length) stap = sc.Strand([stap_ss]) scaf = sc.Strand([scaf_ss], color=sc.default_scaffold_color) strands = [stap, scaf] design = sc.Design(helices=helices, strands=strands, grid=sc.Grid.none) return design
def main(): helices = [ sc.Helix(idx=2, max_offset=20), sc.Helix(idx=3, max_offset=20), sc.Helix(idx=5, max_offset=20), sc.Helix(idx=7, max_offset=20), sc.Helix(idx=11, max_offset=20), ] design = sc.DNADesign(helices=helices, strands=[]) # design.set_helices_view_order([5, 2, 11, 3, 7]) return design
def main(): num_helices = 16 bases = 48 helices = [sc.Helix() for _ in range(num_helices)] strands = [] for bot in range(num_helices // 2): top = num_helices - bot - 1 helix_top = helices[bot] helix_bot = helices[top] stap_left_ss_top = sc.Domain(top, sc.forward, 0, bases // 3) stap_left_ss_bot = sc.Domain(bot, sc.reverse, 0, bases // 3) stap_mid_ss_bot = sc.Domain(bot, sc.reverse, bases // 3, bases * 2 // 3) stap_mid_ss_top = sc.Domain(top, sc.forward, bases // 3, bases * 2 // 3) stap_right_ss_top = sc.Domain(top, sc.forward, bases * 2 // 3, bases) stap_right_ss_bot = sc.Domain(bot, sc.reverse, bases * 2 // 3, bases) stap_left = sc.Strand([stap_left_ss_bot, stap_left_ss_top]) stap_mid = sc.Strand([stap_mid_ss_top, stap_mid_ss_bot]) stap_right = sc.Strand([stap_right_ss_bot, stap_right_ss_top]) strands.append(stap_left) strands.append(stap_mid) strands.append(stap_right) design = sc.DNADesign(helices=helices, strands=strands, grid=sc.square) return design
def main(): length = 16 helices = [sc.Helix(max_offset=length, grid_position=(h, v, 0)) for v in range(-4, 6) for h in range(-4, 6)] design = sc.DNADesign(helices=helices, strands=[], grid=sc.hexagonal) return design
def precursor_scaffolds() -> sc.Design: #2D design has to be topologically a circle helices = [sc.Helix(max_offset=int(block * cmax)) for _ in range(maxhelix)] scaffolds = [] for helix in range(len(img)): if (1 in img[helix]): for dom in range(len(img[helix])): if (img[helix][dom] == 1) and (img[helix][dom - 1] == 0): start = block * dom if (img[helix][dom] == 0) and (img[helix][dom - 1] == 1): end = block * dom scaffolds.append( sc.Strand([ sc.Domain(helix=2 * helix, forward=((2 * helix) % 2 == 0), start=start, end=end) ])) scaffolds.append( sc.Strand([ sc.Domain(helix=(2 * helix) + 1, forward=((2 * helix + 1) % 2 == 0), start=start, end=end) ])) return sc.Design(helices=helices, strands=scaffolds, grid=sc.square)
def main(): helices = [sc.Helix(0, 25), sc.Helix(1, 25)] s1_left_ss0 = sc.Domain(0, sc.reverse, 0, 5) s1_ss1 = sc.Domain(0, sc.forward, 0, 15) s1_right_ss0 = sc.Domain(0, sc.reverse, 5, 15) s1 = sc.Strand([s1_left_ss0, s1_ss1, s1_right_ss0]) s2_ss1 = sc.Domain(0, sc.forward, 10, 20) s2_ss0 = sc.Domain(0, sc.reverse, 10, 20) s2 = sc.Strand([s2_ss1, s2_ss0]) strands = [s1, s2] design = sc.Design(helices=helices, strands=strands, grid=sc.square) return design
def create_design() -> sc.Design: length = 16 helices = [sc.Helix(max_offset=length, grid_position=(h, v)) for v in range(-4, 6) for h in range(-4, 6)] design = sc.Design(helices=helices, strands=[], grid=sc.honeycomb) return design
def create_design(): length = 30 helices = [ sc.Helix(min_offset=0, max_offset=length, grid_position=(0, 0)), sc.Helix(min_offset=1, max_offset=length, grid_position=(0, 1)), sc.Helix(min_offset=2, max_offset=length, grid_position=(0, 2)), sc.Helix(min_offset=3, max_offset=length, grid_position=(0, 3)), ] stap_ss = sc.Domain(0, True, 0, length - 1) scaf_ss = sc.Domain(0, False, 0, length - 1) stap = sc.Strand([stap_ss]) scaf = sc.Strand([scaf_ss], color=sc.default_scaffold_color) strands = [stap, scaf] design = sc.Design(helices=helices, strands=strands, grid=sc.Grid.square) return design
def create_design() -> sc.Design: blue = sc.Color(r=0, g=0, b=255) black = sc.Color(r=0, g=0, b=0) red = sc.Color(r=255, g=0, b=0) green = sc.Color(r=0, g=150, b=0) cols = 8 rows = 8 helices = [sc.Helix(major_tick_distance=10) for _ in range(rows + 1)] strands = [] for col in range(cols): for row in range(rows): helix = row forward = row % 2 == 0 if forward: offset = col * 20 ss1 = sc.Domain(helix, forward, offset, offset + 20) ss2 = sc.Domain(helix + 1, forward, offset + 20, offset + 40) else: offset = col * 20 ss2 = sc.Domain(helix, forward, offset + 10, offset + 30) ss1 = sc.Domain(helix + 1, forward, offset + 30, offset + 50) if forward: color = blue if col % 2 == 0 else black else: color = red if col % 2 == 0 else green strand = sc.Strand([ss1, ss2], color=color) strands.append(strand) design = sc.Design(helices=helices, strands=strands, grid=sc.square) return design
def create_design() -> sc.Design: helices = [] num_helices, max_bases = 30, 2000 for _ in range(num_helices): helices.append(sc.Helix(max_bases)) design = sc.Design(helices=helices, strands=[], grid=sc.square) return design
def precursor_scaffolds() -> sc.DNADesign: helices = [sc.Helix(max_offset=304) for _ in range(24)] scaffolds = [ sc.Strand( [sc.Domain(helix=helix, forward=helix % 2 == 0, start=8, end=296)]) for helix in range(24) ] return sc.DNADesign(helices=helices, strands=scaffolds, grid=sc.square)
def create_design() -> sc.Design: helices = [sc.Helix(max_offset=24) for _ in range(2)] design = sc.Design(helices=helices, grid=sc.square) design.strand(0, 0).move(8).cross(1).move(-8).as_circular() design.strand(0, 8).move(8).loopout(1, 5).move(-8).as_circular() design.strand(0, 16).move(8).cross(1).move(-8) return design
def create_design(): length = 16 helices = [ sc.Helix(max_offset=length, grid_position=(h, v)) for v in range(10) for h in range(10) ] design = sc.Design(helices=helices, strands=[], grid=sc.hexagonal) return design
def main(): # helices helices = [sc.Helix(max_offset=48), sc.Helix(max_offset=48)] # left staple stap_left_ss1 = sc.Domain(helix=1, forward=True, start=8, end=24) stap_left_ss0 = sc.Domain(helix=0, forward=False, start=8, end=24) stap_left = sc.Strand(domains=[stap_left_ss1, stap_left_ss0]) # right staple stap_right_ss0 = sc.Domain(helix=0, forward=False, start=24, end=40) stap_right_ss1 = sc.Domain(helix=1, forward=True, start=24, end=40) stap_right = sc.Strand(domains=[stap_right_ss0, stap_right_ss1]) # scaffold scaf_ss1_left = sc.Domain(helix=1, forward=False, start=8, end=24) scaf_ss0 = sc.Domain(helix=0, forward=True, start=8, end=40) loopout = sc.Loopout(length=3) scaf_ss1_right = sc.Domain(helix=1, forward=False, start=24, end=40) scaf = sc.Strand( domains=[scaf_ss1_left, scaf_ss0, loopout, scaf_ss1_right], is_scaffold=True) # geometry geometry = sc.Geometry(rise_per_base_pair=0.2, helix_radius=1.2, inter_helix_gap=1.0) # whole design design = sc.DNADesign(helices=helices, strands=[scaf, stap_left, stap_right], grid=sc.square, geometry=geometry) # deletions and insertions added to design are added to both strands on a helix design.add_deletion(helix=1, offset=20) design.add_insertion(helix=0, offset=14, length=1) design.add_insertion(helix=0, offset=26, length=2) # also assigns complement to strands other than scaf bound to it design.assign_dna(scaf, 'AACGT' * 18) return design
def create_design() -> sc.Design: # helices helices = [sc.Helix(max_offset=48), sc.Helix(max_offset=48)] # whole design design = sc.Design(helices=helices, strands=[], grid=sc.square) design.strand(1, 8).to(24).cross(0).to(8) # left staple design.strand(0, 40).to(24).cross(1).to(40).with_modification_5p(mod.biotin_5p) # right staple design.strand(1, 24).to(8).cross(0).to(40).loopout(1, 3).to(24).as_scaffold() # deletions and insertions added to design are added to both strands on a helix design.add_deletion(helix=1, offset=20) design.add_insertion(helix=0, offset=14, length=1) design.add_insertion(helix=0, offset=26, length=2) # also assigns complement to strands other than scaf bound to it design.assign_dna(design.scaffold, 'AACGT' * 18) return design
def create_design() -> sc.Design: length = 9 helices = [sc.Helix(max_offset=length, roll=90)] stap_ss = sc.Domain(0, True, 0, length) scaf_ss = sc.Domain(0, False, 0, length) stap = sc.Strand([stap_ss]) scaf = sc.Strand([scaf_ss], color=sc.default_scaffold_color) strands = [stap, scaf] design = sc.Design(helices=helices, strands=strands, grid=sc.square) design.assign_dna(scaf, 'AACT' * (length // 4)) return design
def main(): length = 9 helices = [sc.Helix(max_offset=length, major_ticks=[2, 5])] stap_ss = sc.Domain(0, True, 0, length) scaf_ss = sc.Domain(0, False, 0, length) stap = sc.Strand([stap_ss]) scaf = sc.Strand([scaf_ss], color=sc.default_scaffold_color) strands = [stap, scaf] design = sc.DNADesign(helices=helices, strands=strands, grid=sc.square) design.assign_dna(scaf, 'AACT' * (length // 4)) return design
def main(): length = 9 helices = [sc.Helix(max_offset=length, rotation=math.pi/2, rotation_anchor=2)] stap_ss = sc.Domain(0, sc.forward, 0, length) scaf_ss = sc.Domain(0, sc.reverse, 0, length) stap = sc.Strand([stap_ss]) scaf = sc.Strand([scaf_ss], color=sc.default_scaffold_color) strands = [stap, scaf] design = sc.DNADesign(helices=helices, strands=strands, grid=sc.square) design.assign_dna(scaf, 'AACT' * (length // 4)) return design
def initial_design() -> sc.Design: max_offset = 1295 helices = [ # below uses cadnano honeycomb coordinates # https://github.com/UC-Davis-molecular-computing/scadnano-python-package/blob/master/misc/cadnano-format-specs/v2.txt sc.Helix(grid_position=(1, 1), max_offset=max_offset), sc.Helix(grid_position=(0, 1), max_offset=max_offset), sc.Helix(grid_position=(0, 2), max_offset=max_offset), sc.Helix(grid_position=(1, 2), max_offset=max_offset), sc.Helix(grid_position=(2, 2), max_offset=max_offset), sc.Helix(grid_position=(2, 1), max_offset=max_offset), ] scafs = [ sc.Strand([sc.Domain(helix=0, forward=True, start=16, end=1276)]), sc.Strand([sc.Domain(helix=1, forward=False, start=16, end=1276)]), sc.Strand([sc.Domain(helix=2, forward=True, start=12, end=1272)]), sc.Strand([sc.Domain(helix=3, forward=False, start=12, end=1272)]), sc.Strand([sc.Domain(helix=4, forward=True, start=19, end=1279)]), sc.Strand([sc.Domain(helix=5, forward=False, start=19, end=1279)]), ] staps = [ sc.Strand([sc.Domain(helix=0, forward=False, start=42, end=1246)]), sc.Strand([sc.Domain(helix=1, forward=True, start=42, end=1246)]), sc.Strand([sc.Domain(helix=2, forward=False, start=42, end=1246)]), sc.Strand([sc.Domain(helix=3, forward=True, start=42, end=1246)]), sc.Strand([sc.Domain(helix=4, forward=False, start=42, end=1246)]), sc.Strand([sc.Domain(helix=5, forward=True, start=42, end=1246)]), ] strands = scafs + staps return sc.Design(helices=helices, strands=strands, grid=sc.honeycomb)
def create_design() -> sc.Design: helices = [sc.Helix(max_offset=288) for _ in range(24)] design = sc.Design(helices=helices, grid=sc.square) add_scaffold_precursors(design) add_scaffold_crossovers(design) add_staple_precursors(design) add_staple_crossovers(design) add_staple_nicks(design) add_twist_correction_deletions(design) design.assign_m13_to_scaffold() return design
def create_design(): length = 9 helices = [ sc.Helix(max_offset=length, major_ticks=[2, 5], position=sc.Position3D(x=1, y=2, z=3), pitch=90) ] stap_ss = sc.Domain(0, True, 0, length) scaf_ss = sc.Domain(0, False, 0, length) stap = sc.Strand([stap_ss]) scaf = sc.Strand([scaf_ss], color=sc.default_scaffold_color) strands = [stap, scaf] design = sc.Design(helices=helices, strands=strands, grid=sc.Grid.none) design.assign_dna(scaf, 'AACT' * (length // 4)) return design
def main(): length = 9 helices = [ sc.Helix(max_offset=length, major_ticks=[2, 5], position3d=sc.Position3D(x=3, y=2, z=1), pitch=90) ] stap_ss = sc.Domain(0, sc.forward, 0, length) scaf_ss = sc.Domain(0, sc.reverse, 0, length) stap = sc.Strand([stap_ss]) scaf = sc.Strand([scaf_ss], color=sc.default_scaffold_color) strands = [stap, scaf] design = sc.DNADesign(helices=helices, strands=strands, grid=sc.square) design.assign_dna(scaf, 'AACT' * (length // 4)) return design
def create_helices(shape_outline, lattice, hex_or_square) -> sc.Design: """Given the outline, complete lattice, and if the lattice is hex or square, creates the base helices without any strands""" if hex_or_square == 'hex': grid_type = sc.hexagonal elif hex_or_square == 'square': grid_type = sc.square else: raise Exception("Error in create_helices(), input for hex_or_square must be eihter 'hex' or 'square'") max_offset = sc_general.find_max(shape_outline) size = len(lattice) helices = [] for i in range(size): position = lattice[i] helices.append(sc.Helix(max_offset = max_offset, grid_position = position)) design = sc.Design(helices = helices, strands = [], grid = grid_type) return design
def create_design() -> sc.Design: num_domains = 9 helices = [sc.Helix(max_offset=(num_domains) * 8)] design: sc.Design = sc.Design(helices=helices, strands=[], grid=sc.square) design.strand(0, (num_domains - 1) * 8) \ .move(-8).with_domain_name('domain 8*') \ .move(-8).with_domain_name('domain 7*') \ .move(-8).with_domain_name('domain 6*') \ .move(-8).with_domain_name('domain 5*') \ .move(-8).with_domain_name('domain 4*') \ .move(-8).with_domain_name('domain 3*') \ .move(-8).with_domain_name('domain 2*') \ .move(-8).with_domain_name('domain 1*') \ .with_name('bottom strand') # domain names match design.strand( 0, 0).move(8).with_domain_name('domain 1').with_name('top strand 1') # domains are aligns but names mismatch design.strand( 0, 8).move(8).with_domain_name('domain 50').with_name('top strand 2') # domain names match design.strand( 0, 16).move(8).with_domain_name('domain 3').with_name('top strand 3') # domain names are the same, not complementary design.strand( 0, 24).move(8).with_domain_name('domain 4*').with_name('top strand 4') # domain names match but domains are mis-aligned design.strand( 0, 32).move(9).with_domain_name('domain 5').with_name('top strand 5') # domain names match but domains are mis-aligned design.strand( 0, 48).move(7).with_domain_name('domain 7').with_name('top strand 7') # no overlap so no mismatch design.strand( 0, 64).move(8).with_domain_name('domain 9').with_name('top strand 9') return design
def _create_helices(num_helices: int, num_bases_per_helix: int) -> List[sc.Helix]: return [ sc.Helix(max_offset=num_bases_per_helix) for _ in range(num_helices) ]
def main(): helices = [ sc.Helix(max_offset=64), sc.Helix(max_offset=64), sc.Helix(max_offset=64) ] # left staple stap_left_ss1 = sc.Domain(helix=1, forward=True, start=0, end=16) stap_left_ss0 = sc.Domain(helix=0, forward=False, start=0, end=16) stap_left = sc.Strand(domains=[stap_left_ss1, stap_left_ss0]) # right staple stap_right_ss0 = sc.Domain(helix=0, forward=False, start=16, end=32) stap_right_ss1 = sc.Domain(helix=1, forward=True, start=16, end=32) stap_right = sc.Strand(domains=[stap_right_ss0, stap_right_ss1]) # scaffold scaf_ss1_left = sc.Domain(helix=1, forward=False, start=0, end=16) scaf_ss0 = sc.Domain(helix=0, forward=True, start=0, end=32) loopout = sc.Loopout(length=3) scaf_ss1_right = sc.Domain(helix=1, forward=False, start=16, end=32) scaf = sc.Strand( domains=[scaf_ss1_left, scaf_ss0, loopout, scaf_ss1_right], is_scaffold=True) ss_extra1 = sc.Domain(helix=1, forward=True, start=32, end=48) ss_extra2 = sc.Domain(helix=1, forward=True, start=48, end=64) ss_extra3 = sc.Domain(helix=2, forward=False, start=32, end=48) ss_extra1b = sc.Domain(helix=1, forward=False, start=32, end=48) ss_extra2b = sc.Domain(helix=1, forward=False, start=48, end=64) ss_extra3b = sc.Domain(helix=2, forward=True, start=32, end=48) ss_extra4 = sc.Domain(helix=2, forward=True, start=16, end=32) ss_extra5 = sc.Domain(helix=2, forward=True, start=0, end=16) s_extra1 = sc.Strand(domains=[ss_extra1]) s_extra2 = sc.Strand(domains=[ss_extra2]) s_extra3 = sc.Strand(domains=[ss_extra3]) s_extra4 = sc.Strand(domains=[ss_extra4]) s_extra5 = sc.Strand(domains=[ss_extra5]) s_extra1b = sc.Strand(domains=[ss_extra1b]) s_extra2b = sc.Strand(domains=[ss_extra2b]) s_extra3b = sc.Strand(domains=[ss_extra3b]) # whole design design = sc.DNADesign(helices=helices, strands=[ scaf, stap_left, stap_right, s_extra1, s_extra2, s_extra3, s_extra4, s_extra1b, s_extra2b, s_extra3b, s_extra5 ], grid=sc.square) # deletions and insertions added to design so they can be added to both strands on a helix design.add_deletion(helix=0, offset=11) design.add_deletion(helix=0, offset=12) design.add_deletion(helix=0, offset=24) design.add_deletion(helix=1, offset=12) design.add_deletion(helix=1, offset=24) design.add_insertion(helix=0, offset=6, length=1) design.add_insertion(helix=0, offset=18, length=2) design.add_insertion(helix=1, offset=6, length=3) design.add_insertion(helix=1, offset=18, length=4) # DNA assigned to whole design so complement can be assigned to strands other than scaf design.assign_dna(scaf, 'AACT' * 18) design.assign_dna(s_extra1, 'AACT' * 4) design.assign_dna(s_extra2, 'GGTA' * 4) return design
def _create_helices(num_helices: int, num_bases_per_helix: int): return [ sc.Helix(max_bases=num_bases_per_helix) for _ in range(num_helices) ]
def create_design(): include_rot = False include_rot = True n = 'north' e = 'east' s = 'south' w = 'west' helices = [ sc.Helix(max_offset=20, group=n, grid_position=(0, 0)), # 0 sc.Helix(max_offset=21, group=n, grid_position=(1, 0)), # 1 sc.Helix(max_offset=19, group=n, grid_position=(1, 1)), # 2 sc.Helix(max_offset=18, group=n, grid_position=(0, 1)), # 3 sc.Helix(max_offset=17, group=n, grid_position=(-1, 1)), # 4 sc.Helix(max_offset=16, group=n, grid_position=(-1, 0)), # 5 sc.Helix(max_offset=24, group=s), # 6 sc.Helix(max_offset=25, group=s), # 7 sc.Helix(max_offset=26, group=w, position=sc.Position3D(x=0, y=0, z=0)), # 8 sc.Helix(max_offset=27, group=w, position=sc.Position3D(x=0, y=3, z=0)), # 9 ] if include_rot: helices.extend([ sc.Helix(max_offset=26, group='r', grid_position=(0, 0)), # 10 sc.Helix(max_offset=27, group='r', grid_position=(0, 1)), # 11 ]) helices.extend([ sc.Helix(idx=13, max_offset=22, group=e), # 13 sc.Helix(idx=15, max_offset=23, group=e), # 15 ]) group_north = sc.HelixGroup(position=sc.Position3D(x=0, y=-10, z=0), grid=sc.honeycomb) group_south = sc.HelixGroup(position=sc.Position3D(x=0, y=10, z=0), helices_view_order=[7, 6], grid=sc.square) group_east = sc.HelixGroup(position=sc.Position3D(x=0, y=0, z=10), grid=sc.square) group_west = sc.HelixGroup(position=sc.Position3D(x=0, y=0, z=-10), grid=sc.Grid.none) groups = { n: group_north, e: group_east, s: group_south, w: group_west, } if include_rot: group_rot = sc.HelixGroup(position=sc.Position3D(x=00, y=10, z=10), pitch=45, grid=sc.square) groups['r'] = group_rot design = sc.Design(helices=helices, groups=groups, strands=[]) design.strand(0, 0).to(8) \ .cross(1).to(0) \ .cross(2).to(8) \ .cross(3).to(0) \ .cross(4).to(8) \ .cross(5).to(0) design.strand(4, 10).to(13) design.strand(6, 0).to(8).cross(7).to(0) design.strand(8, 0).to(8).cross(9).to(0) design.strand(13, 0).to(8).cross(15).to(0) design.strand(8, 8).to(11) design.strand(13, 8).to(11) if include_rot: design.strand(10, 0).to(8).cross(11).to(0) return design