Loading vdW_structures/viewer.py +11 −0 Original line number Diff line number Diff line Loading @@ -14,4 +14,15 @@ def view_structure(structure, color_map): view.addUnitCell() view.zoomTo() # now rotate so we look *down* a or b instead of the default c if look.lower() == 'a': # default view is along +z (the “c” axis). # To look along +x (the “a” axis), rotate –90° around the Y axis: view.rotate(-90, 'y') elif look.lower() == 'b': # to look along +y (the “b” axis), rotate +90° around the X axis: view.rotate(-90, 'x') # else 'c' or anything else: keep the default return view.show() Loading
vdW_structures/viewer.py +11 −0 Original line number Diff line number Diff line Loading @@ -14,4 +14,15 @@ def view_structure(structure, color_map): view.addUnitCell() view.zoomTo() # now rotate so we look *down* a or b instead of the default c if look.lower() == 'a': # default view is along +z (the “c” axis). # To look along +x (the “a” axis), rotate –90° around the Y axis: view.rotate(-90, 'y') elif look.lower() == 'b': # to look along +y (the “b” axis), rotate +90° around the X axis: view.rotate(-90, 'x') # else 'c' or anything else: keep the default return view.show()