{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# NANO106 - Symmetry Computations on $m\\overline{3}m$ ($O_h$) Point Group\n", "*by Shyue Ping Ong*\n", "\n", "This notebook demonstrates the computation of orbits in the $m\\overline{3}m$ ($O_h$) point group (more complex than the simple mmm example). It is part of course material for UCSD's NANO106 - Crystallography of Materials." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Initializing the $m\\overline{3}m$ point group.\n", "\n", "Let's start by importing the numpy, sympy and other packages we need. Instead of going through all the steps one by one, we will use the symmetry.point_groups written by Prof Ong, which basically consolidates the information for all point groups in a single module." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The generators for this point group are:\n", "[[0, 0, 1], [1, 0, 0], [0, 1, 0]]\n", "[[0, -1, 0], [1, 0, 0], [0, 0, 1]]\n", "[[-1, 0, 0], [0, -1, 0], [0, 0, -1]]\n", "[[0, 1, 0], [1, 0, 0], [0, 0, 1]]\n", "The order of the point group is 48.\n" ] } ], "source": [ "import numpy as np\n", "from sympy import symbols, Mod\n", "from symmetry.groups import PointGroup\n", "\n", "#Create the point group.\n", "oh = PointGroup(\"m-3m\")\n", "\n", "print \"The generators for this point group are:\"\n", "for m in oh.generators:\n", " print m\n", "print \"The order of the point group is %d.\" % len(oh.symmetry_ops)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Computing Orbits\n", "\n", "Using sympy, we specify the symbolic symbols x, y, z to represent position coordinates. We also define a function to generate the orbit given a set of symmetry operations and a point p." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "x, y, z = symbols(\"x y z\")\n", "\n", "def pt_2_str(pt):\n", " return str([i.args[0] if isinstance(i, Mod) else i for i in pt])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Orbit for General Position" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "For the general position [x y z] on the two-fold axis, the orbit comprise 48 points:\n", "[z, x, y] [-y, x, z] [-x, -y, -z] [y, x, z] [y, z, x] [z, -y, x] [-z, -x, -y] [z, y, x] [-x, z, y] [-x, -y, z] [y, -x, -z] [-x, y, z] [x, y, z] [-y, -x, -z] [x, z, y] [x, -y, z] [x, z, -y] [-y, -z, -x] [z, y, -x] [-y, z, -x] [-x, -z, y] [y, z, -x] [-x, -z, -y] [-y, z, x] [y, -x, z] [z, -x, -y] [-z, y, -x] [z, -x, y] [x, -z, y] [-y, x, -z] [y, -z, -x] [-z, x, y] [z, -y, -x] [-z, x, -y] [y, -z, x] [-z, -y, -x] [-z, -x, y] [z, x, -y] [-z, y, x] [x, -z, -y] [-x, z, -y] [x, y, -z] [-y, -x, z] [-y, -z, x] [-z, -y, x] [y, x, -z] [x, -y, -z] [-x, y, -z]\n" ] } ], "source": [ "p = np.array([x, y, z])\n", "orb = oh.get_orbit(p, tol=0)\n", "print \"For the general position %s on the two-fold axis, the orbit comprise %d points:\" % (str(p), len(orb))\n", "for o in orb:\n", " print pt_2_str(o)," ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Orbit for Special Position on four-fold rotation axis" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "For the special position [0 0 z] on the two-fold axis, the orbit comprise 6 points:\n", "[z, 0, 0] [0, 0, z] [0, 0, -z] [0, z, 0] [-z, 0, 0] [0, -z, 0]\n" ] } ], "source": [ "p = np.array([0, 0, z])\n", "orb = oh.get_orbit(p, tol=0)\n", "\n", "print \"For the special position %s on the two-fold axis, the orbit comprise %d points:\" % (str(p), len(orb))\n", "for o in orb:\n", " print pt_2_str(o)," ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The orbit is similar for the other two-fold axes on the a and b axes are similar." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Orbit for Special Position on three-fold rotation axis\n", "\n", "The three-fold rotation axis are given by (x, x, x)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "For the special position [x x x] on the two-fold axis, the orbit comprise 8 points:\n", "[x, x, x] [-x, x, x] [-x, -x, -x] [x, -x, x] [-x, -x, x] [x, -x, -x] [x, x, -x] [-x, x, -x]\n" ] } ], "source": [ "p = np.array([x, x, x])\n", "orb = oh.get_orbit(p, tol=0)\n", "print \"For the special position %s on the two-fold axis, the orbit comprise %d points:\" % (str(p), len(orb))\n", "for o in orb:\n", " print pt_2_str(o)," ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Orbit for Special Position on two-fold rotation axis\n", "\n", "The two-fold rotation axis are given by (x, x, 0)." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "For the special position [x x 0] on the two-fold axis, the orbit comprise 12 points:\n", "[0, x, x] [-x, x, 0] [-x, -x, 0] [x, x, 0] [x, 0, x] [0, -x, x] [0, -x, -x] [-x, 0, x] [x, -x, 0] [x, 0, -x] [-x, 0, -x] [0, x, -x]\n" ] } ], "source": [ "p = np.array([x, x, 0])\n", "orb = oh.get_orbit(p, tol=0)\n", "print \"For the special position %s on the two-fold axis, the orbit comprise %d points:\" % (str(p), len(orb))\n", "for o in orb:\n", " print pt_2_str(o)," ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Orbit for Special Position on mirror planes\n", "\n", "Positions on the mirror on the a-b plane have coordinates (x, y, 0)." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "For the special position [x y 0] on the two-fold axis, the orbit comprise 24 points:\n", "[0, x, y] [-y, x, 0] [-x, -y, 0] [y, x, 0] [y, 0, x] [0, -y, x] [0, -x, -y] [0, y, x] [-x, 0, y] [y, -x, 0] [-x, y, 0] [x, y, 0] [-y, -x, 0] [x, 0, y] [x, -y, 0] [x, 0, -y] [-y, 0, -x] [0, y, -x] [y, 0, -x] [-x, 0, -y] [-y, 0, x] [0, -x, y] [0, -y, -x] [0, x, -y]\n" ] } ], "source": [ "p = np.array([x, y, 0])\n", "orb = oh.get_orbit(p, tol=0)\n", "print \"For the special position %s on the two-fold axis, the orbit comprise %d points:\" % (str(p), len(orb))\n", "for o in orb:\n", " print pt_2_str(o)," ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The orbit is similar for the other mirror planes on the a-c and b-c planes are similar." ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.9" } }, "nbformat": 4, "nbformat_minor": 0 }