Skip to content

Commit

Permalink
Update scadnano.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Feb 1, 2022
1 parent ca2522d commit 35d0e56
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -5966,7 +5966,8 @@ def to_oxdna_format(self, warn_duplicate_strand_names: bool = True) -> Tuple[str
system = _convert_design_to_oxdna_system(self)
return system.ox_dna_output()

def write_oxdna_files(self, directory: str = '.', filename_no_extension: Optional[str] = None) -> None:
def write_oxdna_files(self, directory: str = '.', filename_no_extension: Optional[str] = None,
warn_duplicate_strand_names: bool = True) -> None:
"""Write text file representing this :any:`Design`,
suitable for reading by oxdna (https://sulcgroup.github.io/oxdna-viewer/),
with the output files having the same name as the running script but with ``.py`` changed to
Expand All @@ -5987,8 +5988,11 @@ def write_oxdna_files(self, directory: str = '.', filename_no_extension: Optiona
directory in which to put file (default: current working directory)
:param filename_no_extension:
filename without extension (default: name of running script without ``.py``).
:param warn_duplicate_strand_names:
If True, prints a warning to the screen indicating when
strands are found to have duplicate names.
"""
dat, top = self.to_oxdna_format()
dat, top = self.to_oxdna_format(warn_duplicate_strand_names)

write_file_same_name_as_running_python_script(dat, 'dat', directory, filename_no_extension)
write_file_same_name_as_running_python_script(top, 'top', directory, filename_no_extension)
Expand Down

0 comments on commit 35d0e56

Please sign in to comment.