Skip to content

Commit

Permalink
cleaned up unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Aug 20, 2023
1 parent 9ea350b commit 7d938b5
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions tests/scadnano_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8382,7 +8382,7 @@ def test_2_helix_3_crossover(self) -> None:
self.assertAlmostEqual(exp_h0_roll, self.design2h.helices[0].roll)
self.assertAlmostEqual(exp_h1_roll, self.design2h.helices[1].roll)

def test_2_helix_2_crossovers(self) -> None:
def test_2_helix_2_crossovers_call_relax_twice(self) -> None:
'''
0 1
012345678901234
Expand All @@ -8394,21 +8394,8 @@ def test_2_helix_2_crossovers(self) -> None:
design2h = sc.Design(helices=helices, grid=sc.square)
design2h.draw_strand(0, 0).move(5).cross(1).move(-5)
design2h.draw_strand(0, 5).move(6).cross(1).move(-6)
f1 = 4 / 10.5
f2 = 10 / 10.5
a1 = f1 * 360 % 360
a2 = f2 * 360 % 360

# rules for angles:
# - add 150 if on reverse strand to account for minor groove
# - subtract angle of helix crossover is connecting to

# ave_h0 = (a1 - 180 + a2 - 180) / 2
# exp_h0_roll = (-ave_h0) % 360
exp_h0_roll = 120.0

# ave_h1 = (a1 + 150 + a2 + 150) / 2
# exp_h1_roll = (-ave_h1) % 360
exp_h1_roll = 150.0

design2h.relax_helix_rolls()
Expand Down

0 comments on commit 7d938b5

Please sign in to comment.