-
Notifications
You must be signed in to change notification settings - Fork 6
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
Oxview export #246
Conversation
@@ -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]: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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). |
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.