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

Oxview export #246

Merged
merged 6 commits into from
Sep 13, 2022
Merged

Oxview export #246

merged 6 commits into from
Sep 13, 2022

Conversation

cgevans
Copy link
Contributor

@cgevans cgevans commented Sep 9, 2022

Oxview's format is largely similar to a json version of oxDNA files, though we can also set the color of each nucleotide.

This code is currently messy, and needs tests and documentation. It currently exports correctly with my large tile systems, but I haven't tested it more thoroughly.

Closes #173.

@cgevans cgevans changed the base branch from main to dev September 9, 2022 23:23
@cgevans cgevans marked this pull request as ready for review September 11, 2022 14:20
@@ -7807,6 +7881,11 @@ def __str__(self) -> str:
def __repr__(self) -> str:
return '_OxdnaVector({}, {}, {})'.format(self.x, self.y, self.z)

def __iter__(self) -> Iterator[float]:
Copy link
Contributor Author

@cgevans cgevans Sep 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generally convenient, so that list(vector) gives a list [x,y,z]. I don't use it in the code, but do in the tests.

@@ -12,6 +13,7 @@
import scadnano.origami_rectangle as rect
import scadnano.modifications as mod

from scadnano.scadnano import _convert_design_to_oxdna_system
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a cleaner way of testing equality to the oxDNA design. The oxDNA tests already test that export format.

scadnano/scadnano.py Show resolved Hide resolved
@dave-doty
Copy link
Member

Is this ready to merge?

@cgevans
Copy link
Contributor Author

cgevans commented Sep 13, 2022

Is this ready to merge?

It should be: it works, and the tests cover a variety of odd cases. I'll eventually want to do something similar for oxDNA exports, but there are other considerations for that (forces file format, another file to export, etc), and for now, oxview is useful enough (and can export forces files anyway).

@dave-doty dave-doty merged commit a931782 into UC-Davis-molecular-computing:dev Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

export to oxView format
2 participants