Skip to content

Oxview export#246

Merged
dave-doty merged 6 commits intoUC-Davis-molecular-computing:devfrom
cgevans:oxview
Sep 13, 2022
Merged

Oxview export#246
dave-doty merged 6 commits intoUC-Davis-molecular-computing:devfrom
cgevans:oxview

Conversation

@cgevans
Copy link
Copy Markdown
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
@cgevans cgevans requested a review from dave-doty as a code owner September 11, 2022 14:20
def __repr__(self) -> str:
return '_OxdnaVector({}, {}, {})'.format(self.x, self.y, self.z)

def __iter__(self) -> Iterator[float]:
Copy link
Copy Markdown
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.

import scadnano.origami_rectangle as rect
import scadnano.modifications as mod

from scadnano.scadnano import _convert_design_to_oxdna_system
Copy link
Copy Markdown
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.

@dave-doty
Copy link
Copy Markdown
Member

Is this ready to merge?

@cgevans
Copy link
Copy Markdown
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