Skip to content

Commit

Permalink
changed return type of Design.to_oxview_format from dict to str
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Mar 28, 2024
1 parent f973c9c commit 3929a3c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -7756,16 +7756,18 @@ def _write_plates_default(self, directory: str, filename: Optional[str], strands
workbook.save(filename_plate)

def to_oxview_format(self, warn_duplicate_strand_names: bool = True,
use_strand_colors: bool = True) -> dict:
use_strand_colors: bool = True) -> str:
"""
Exports to oxView format.
Exports to oxView format: https://github.com/sulcgroup/oxdna-viewer/blob/master/file-format.md
:param warn_duplicate_strand_names:
if True, prints a warning to the screen indicating when strands are found to
have duplicate names. (default: True)
:param use_strand_colors:
if True (default), sets the color of each nucleotide in a strand in oxView to the color
of the strand.
:return:
string in oxView text format
"""
import datetime
self._check_legal_design(warn_duplicate_strand_names)
Expand Down Expand Up @@ -7857,7 +7859,8 @@ def to_oxview_format(self, warn_duplicate_strand_names: bool = True,
'systems': [{'id': 0, 'strands': oxview_strands}],
'forces': [], 'selections': []}

return oxvsystem
text = json.dumps(oxvsystem)
return text

def write_oxview_file(self, directory: str = '.', filename: Optional[str] = None,
warn_duplicate_strand_names: bool = True, use_strand_colors: bool = True) -> None:
Expand Down

0 comments on commit 3929a3c

Please sign in to comment.