def generate(polygon_vertices: np.ndarray, title: str = "polygon_name", DNAout: bool = False, PLOTout: bool = False): print(f"{title}: Making polygon...") polygon = BoundaryPolygon(polygon_vertices) print(f"{title}: ...constructing scaffolding lattice...") lattice = polygon.dna_snake(straightening_factor=5, start_side="left", grid_size=[0.34, 2.5]) print(f"{title}: ...calculating route.") route = lattice.route() if PLOTout: print(f"{title}: Generating and saving lattice plot.") plot_list = [lattice.quantised_array, lattice.crossover_coords] lattice.plot(plot_list, poly=True, fout=title, root=ROOT + "/lattice-plot_out/", aspect=6) route.plot() if DNAout: system = route.system() print(f"{title}: Generating and saving oxDNA files.") system.write_oxDNA(prefix=title, root=ROOT + "/oxDNA_out/") print(f"{title}: Generating and saving LAMMPS files.") system.write_LAMMPS(prefix=title, root=ROOT + "/LAMMPS_out/")
def generate(polygon_vertices: np.ndarray, DNAout: str = None, PLOTout: str = None): polygon = BoundaryPolygon(polygon_vertices) lattice = polygon.dna_snake(straightening_factor=5, start_side="left") route = lattice.route() if PLOTout: plot_list = [lattice.quantised_array, lattice.crossover_coords] lattice.plot(plot_list, poly=True) route.plot()