.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples_generated/gallery/cluster.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_generated_gallery_cluster.py: Nanoparticle ============ .. GENERATED FROM PYTHON SOURCE LINES 7-29 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples_generated/gallery/images/sphx_glr_cluster_001.png :alt: cluster :srcset: /examples_generated/gallery/images/sphx_glr_cluster_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples_generated/gallery/images/sphx_glr_cluster_002.png :alt: cluster :srcset: /examples_generated/gallery/images/sphx_glr_cluster_002.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none PosixPath('/builds/ase/ase-deploy/examples/gallery/trunc.Cu.png') | .. code-block:: Python from ase.cluster.cubic import FaceCenteredCubic from ase.io import write surfaces = [(1, 0, 0), (1, 1, 0), (1, 1, 1)] layers = [6, 9, 5] lc = 3.61000 culayer = FaceCenteredCubic('Cu', surfaces, layers, latticeconstant=lc) culayer.rotate(6, 'x', rotate_cell=True) culayer.rotate(2, 'y', rotate_cell=True) renderer = write('layer.Cu.pov', culayer) renderer.render() surfaces = [(1, 0, 0), (1, 1, 1), (1, -1, 1)] layers = [6, 5, -1] trunc = FaceCenteredCubic('Cu', surfaces, layers) trunc.rotate(6, 'x', rotate_cell=True) trunc.rotate(2, 'y', rotate_cell=True) renderer = write('trunc.Cu.pov', trunc) renderer.render() .. _sphx_glr_download_examples_generated_gallery_cluster.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: cluster.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: cluster.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: cluster.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_