Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circular Strands #14

Closed
dave-doty opened this issue Jan 29, 2020 · 1 comment
Closed

circular Strands #14

dave-doty opened this issue Jan 29, 2020 · 1 comment
Labels
closed in dev enhancement New feature or request

Comments

@dave-doty
Copy link
Member

dave-doty commented Jan 29, 2020

Add a Boolean field Strand.circular and draw a crossover from last substrand to first. Any equivalent cyclic permutation of the substrands should display in the same way.

Even if one doesn't wish the final design to have circular strands, this will help to avoid the problem that sometimes an intermediate design temporarily creates a circular Strand, even though subsequent edits make it linear again. Currently such designs are simply not allowed.

See UC-Davis-molecular-computing/scadnano#5.

@dave-doty dave-doty added the enhancement New feature or request label Jan 29, 2020
@dave-doty dave-doty changed the title support circular Strands circular Strands Dec 13, 2020
dave-doty added a commit that referenced this issue Dec 13, 2020
…rands

closes #14; add support for circular Strands
@dave-doty
Copy link
Member Author

[BREAKING CHANGE] Since circular strands make it easier to use the Design.add_half_crossover and Design.add_full_crossover methods, we have removed the method Design.add_crossovers and the type Crossover. Previously, that method helped avoid creating circular strands by allowing one to build up a list of Crossovers and add them in bulk, where adding them one at a time would have resulted in an intermediate circular strand, even if the final result had all linear strands. Now that circular strands are supported, this is no longer needed. The recommended method of adding many crossovers at once is simply to call Design.add_half_crossover and/or Design.add_full_crossover repeatedly, i.e., replace

crossovers = [
    Crossover(helix=0, helix2=1, offset=16, forward=True, half=True),
    Crossover(helix=0, helix2=1, offset=24, forward=False, half=True),
    Crossover(helix=2, helix2=3, offset=32, forward=True),
    Crossover(helix=2, helix2=3, offset=40, forward=False),
]
design.add_crossovers(crossovers)

with this instead:

design.add_half_crossover(helix=0, helix2=1, offset=16, forward=True)
design.add_half_crossover(helix=0, helix2=1, offset=24, forward=False)
design.add_full_crossover(helix=2, helix2=3, offset=32, forward=True)
design.add_full_crossover(helix=2, helix2=3, offset=40, forward=False)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed in dev enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant