Skip to content

Commit

Permalink
update: rotate along x
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Nov 11, 2024
1 parent e306270 commit ad61c6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Empty file.
8 changes: 5 additions & 3 deletions other/materials_designer/create_nanowire.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@
"cell_type": "code",
"outputs": [],
"source": [
"from mat3ra.made.tools.modify import filter_by_cylinder, rotate\n",
"from mat3ra.made.tools.build.supercell import create_supercell\n",
"from mat3ra.made.tools.modify import filter_by_cylinder\n",
"from mat3ra.made.tools.build.slab import create_slab, SlabConfiguration\n",
"\n",
"slab_config = SlabConfiguration(\n",
Expand All @@ -155,8 +156,9 @@
" xy_supercell_matrix=XY_SUPERCELL_MATRIX,\n",
")\n",
"supercell = create_slab(slab_config)\n",
"cylinder = filter_by_cylinder(supercell, radius=RADIUS)\n",
"nanowire_x = rotate(cylinder, angle=90, axis=\"y\", rotate_cell=True)"
"nanowire_z = filter_by_cylinder(supercell, radius=RADIUS)\n",
"rotate_90_degree_matrix = [[0, 0, 1], [0, 1, 0], [-1, 0, 0]]\n",
"nanowire_x = create_supercell(nanowire_z, matrix=rotate_90_degree_matrix)"
],
"metadata": {
"collapsed": false
Expand Down

0 comments on commit ad61c6e

Please sign in to comment.