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

automatically set Helix rolls based on crossover locations ("relax" the rolls) #843

Closed
dave-doty opened this issue Mar 1, 2023 · 1 comment
Assignees
Labels
closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/ enhancement New feature or request

Comments

@dave-doty
Copy link
Member

dave-doty commented Mar 1, 2023

Unlike "set helix coordinates based on crossovers", this would not adjust helix positions, only their rolls.

Keep each helix in the same position, but adjust the roll to minimize "something" about the strain. One way to do this is to calculate how far is each crossover from being perfect, e.g., if a crossover goes from helix i to j, but instead of the backbone angle pointing straight at j, it is 20 degrees off, then the "error" is 20 degrees. We could minimize the sum of squared errors for each crossover, for instance. This should be a straightforward linear algebra calculation to compute this roll for each helix.

See also UC-Davis-molecular-computing/scadnano-python-package#257

@dave-doty
Copy link
Member Author

Release notes

automatically set Helix rolls based on crossover locations ("relax" the rolls)

In this design, the crossovers are well placed relative to each other, but the helix rolls need to be rotated. As the slice bar shows, with the default roll of 0, the crossovers do not point at the helices they connect to:

image

image

By selecting "Edit-->Helix rolls-->Set helix rolls to unstrain crossovers":

image

The helix rolls are set to minimize "strain" in the crossovers:

image

image

Formally, the strain is defined as the square of the angular distance between the "ideal" angle for the crossover (i.e., the relative angle of the other helix to which it is connecting) and the crossover's current angle. The roll is set so as to minimize this total strain across all crossovers in each helix.

@dave-doty dave-doty added the closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/ label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/ enhancement New feature or request
Projects
None yet
1 participant