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

fix oxDNA export bug with incorrect helix coordinates in 3D #811

Closed
zoombya opened this issue Sep 22, 2022 · 3 comments
Closed

fix oxDNA export bug with incorrect helix coordinates in 3D #811

zoombya opened this issue Sep 22, 2022 · 3 comments
Assignees
Labels
bug Something isn't working closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/

Comments

@zoombya
Copy link

zoombya commented Sep 22, 2022

Hi guys, great thanks for your work.
I have a great problem with exporting structures from scadnano to oxDNA.

  1. any 3D structure designed in scadnano if I directly export to oxDNA get's flattened regardless of the lattice.
  2. if I first export the structure to candnano2 and import using taco -> the structures look turned inside out.
    Attached is a 12hb exhibiting all these issues.
    And screenshots of the 2 mentioned export options.
    220921_0845_12hb_1kb.zip

image

image

image

image

@dave-doty dave-doty added the bug Something isn't working label Sep 22, 2022
@dave-doty
Copy link
Member

Hmm, I can reproduce this behavior. Not sure what's going on.

I tried exporting with the Python package and it seems to work:
image

So I suggest that as a workaround for you for now. Install the scadnano Python package using the instructions here: https://github.com/UC-Davis-molecular-computing/scadnano-python-package#installation

Then put this code in a file named export.py:

import scadnano as sc


def main() -> None:
    design = sc.Design.from_scadnano_file('220921_0845_12hb_1kb.sc')
    design.write_oxdna_files()


if __name__ == '__main__':
    main()

FInally, run python export.py at the command line.

It will generate two files export.dat and export.top.

@dave-doty dave-doty changed the title oxDNA export fix oxDNA export bug with incorrect helix coordinates in honeycomb grid Sep 23, 2022
@zoombya
Copy link
Author

zoombya commented Sep 23, 2022

great thanks, Dave.
It happens in both Hex and SQ lattices.

@dave-doty dave-doty changed the title fix oxDNA export bug with incorrect helix coordinates in honeycomb grid fix oxDNA export bug with incorrect helix coordinates in 3D Sep 25, 2022
@dave-doty
Copy link
Member

Here's a minimal example of the problem. It appears 3D coordinates are simply being calculated incorrectly, possibly by the function util.grid_position_to_position3d. This also fails to convert the square grid to the none grid:

In square grid:

image

After converting to none grid:

image

In the above image, helices 1 and 2 are on top of each other.

homaho1 added a commit that referenced this issue Sep 30, 2022
…na-export-bug-with-incorrect-helix-coordinates-in-3d

closes #811 fix oxDNA export bug with incorrect helix coordinates in 3D
@homaho1 homaho1 added the closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/ label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

7 participants