Commit fab35881 authored by Sherri Hadian's avatar Sherri Hadian
Browse files

changes to the USAGE

parent 7ec3da86
Loading
Loading
Loading
Loading
+0 −174
Original line number Diff line number Diff line
@@ -2,11 +2,7 @@
 "cells": [
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": 1,
=======
   "execution_count": 55,
>>>>>>> development
   "metadata": {},
   "outputs": [],
   "source": [
@@ -58,11 +54,7 @@
   ],
   "source": [
    "# for example: [1, 0, 0], [1, 1, 0] or [1, 1, 1]\n",
<<<<<<< HEAD
    "axis = np.array([1, 1, 2])\n",
=======
    "axis = np.array([1, 1, 1])\n",
>>>>>>> development
    "\n",
    "# list Sigma boundaries < 50\n",
    "csl.print_list(axis,50)\n"
@@ -84,17 +76,6 @@
     "name": "stdout",
     "output_type": "stream",
     "text": [
<<<<<<< HEAD
      "Angle: 52.200277564572765 \n",
      " Sigma: 31 \n",
      " Minimal cells: \n",
      " [[-1 -3  1]\n",
      " [ 4 -1  1]\n",
      " [ 0  1  2]] \n",
      " [[-3 -1  1]\n",
      " [ 2 -3  1]\n",
      " [ 2  1  2]] \n",
=======
      "Angle: 27.79577249602797 \n",
      " Sigma: 13 \n",
      " Minimal cells: \n",
@@ -104,18 +85,13 @@
      " [[ 2 -1  1]\n",
      " [-2 -2  1]\n",
      " [ 1  2  1]] \n",
>>>>>>> development
      "\n"
     ]
    }
   ],
   "source": [
    "# pick a sigma for this axis, ex: 19.\n",
<<<<<<< HEAD
    "sigma = 31\n",
=======
    "sigma = 13\n",
>>>>>>> development
    "\n",
    "theta, m, n = csl.get_theta_m_n_list(axis,sigma)[0]\n",
    "\n",
@@ -138,11 +114,7 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": 6,
=======
   "execution_count": 35,
>>>>>>> development
   "metadata": {},
   "outputs": [
    {
@@ -174,57 +146,32 @@
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
<<<<<<< HEAD
       "      <td>[3, 1, -1]</td>\n",
       "      <td>[1, 3, -1]</td>\n",
=======
       "      <td>[2, 1, -2]</td>\n",
       "      <td>[1, 2, -2]</td>\n",
>>>>>>> development
       "      <td>Mixed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
<<<<<<< HEAD
       "      <td>[-1, -1, -2]</td>\n",
       "      <td>[-1, -1, -2]</td>\n",
=======
       "      <td>[-1, -1, -1]</td>\n",
       "      <td>[-1, -1, -1]</td>\n",
>>>>>>> development
       "      <td>Twist</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
<<<<<<< HEAD
       "      <td>[1, 1, 2]</td>\n",
       "      <td>[1, 1, 2]</td>\n",
=======
       "      <td>[1, 1, 1]</td>\n",
       "      <td>[1, 1, 1]</td>\n",
>>>>>>> development
       "      <td>Twist</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
<<<<<<< HEAD
       "      <td>[1, -4, 0]</td>\n",
       "      <td>[3, -2, -2]</td>\n",
=======
       "      <td>[-1, 2, -2]</td>\n",
       "      <td>[-2, 2, -1]</td>\n",
>>>>>>> development
       "      <td>Mixed</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
<<<<<<< HEAD
       "      <td>[-3, -1, 1]</td>\n",
       "      <td>[-1, -3, 1]</td>\n",
=======
       "      <td>[-2, -1, 2]</td>\n",
       "      <td>[-1, -2, 2]</td>\n",
>>>>>>> development
       "      <td>Mixed</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
@@ -233,16 +180,6 @@
      ],
      "text/plain": [
       "            GB1           GB2   Type\n",
<<<<<<< HEAD
       "0    [3, 1, -1]    [1, 3, -1]  Mixed\n",
       "1  [-1, -1, -2]  [-1, -1, -2]  Twist\n",
       "2     [1, 1, 2]     [1, 1, 2]  Twist\n",
       "3    [1, -4, 0]   [3, -2, -2]  Mixed\n",
       "4   [-3, -1, 1]   [-1, -3, 1]  Mixed"
      ]
     },
     "execution_count": 6,
=======
       "0    [2, 1, -2]    [1, 2, -2]  Mixed\n",
       "1  [-1, -1, -1]  [-1, -1, -1]  Twist\n",
       "2     [1, 1, 1]     [1, 1, 1]  Twist\n",
@@ -251,7 +188,6 @@
      ]
     },
     "execution_count": 35,
>>>>>>> development
     "metadata": {},
     "output_type": "execute_result"
    }
@@ -285,11 +221,7 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": 7,
=======
   "execution_count": 36,
>>>>>>> development
   "metadata": {},
   "outputs": [
    {
@@ -320,17 +252,6 @@
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
<<<<<<< HEAD
       "      <th>27</th>\n",
       "      <td>[-3, 7, -2]</td>\n",
       "      <td>[-7, 3, 2]</td>\n",
       "      <td>Symmetric Tilt</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>[3, -7, 2]</td>\n",
       "      <td>[7, -3, -2]</td>\n",
=======
       "      <th>13</th>\n",
       "      <td>[-1, -3, 4]</td>\n",
       "      <td>[1, -4, 3]</td>\n",
@@ -358,7 +279,6 @@
       "      <th>71</th>\n",
       "      <td>[3, -4, 1]</td>\n",
       "      <td>[4, -3, -1]</td>\n",
>>>>>>> development
       "      <td>Symmetric Tilt</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
@@ -367,13 +287,6 @@
      ],
      "text/plain": [
       "            GB1          GB2            Type\n",
<<<<<<< HEAD
       "27  [-3, 7, -2]   [-7, 3, 2]  Symmetric Tilt\n",
       "43   [3, -7, 2]  [7, -3, -2]  Symmetric Tilt"
      ]
     },
     "execution_count": 7,
=======
       "13  [-1, -3, 4]   [1, -4, 3]  Symmetric Tilt\n",
       "15   [1, 3, -4]  [-1, 4, -3]  Symmetric Tilt\n",
       "64  [-3, 4, -1]   [-4, 3, 1]  Symmetric Tilt\n",
@@ -382,7 +295,6 @@
      ]
     },
     "execution_count": 36,
>>>>>>> development
     "metadata": {},
     "output_type": "execute_result"
    }
@@ -405,11 +317,7 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": 8,
=======
   "execution_count": 37,
>>>>>>> development
   "metadata": {},
   "outputs": [],
   "source": [
@@ -616,11 +524,7 @@
    "\n",
    "df['Number'] = Number_atoms  \n",
    "\n",
<<<<<<< HEAD
    "max_num_atoms = 500\n",
=======
    "max_num_atoms = 300\n",
>>>>>>> development
    "df[df['Number'] < max_num_atoms]"
   ]
  },
@@ -637,11 +541,7 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
=======
   "execution_count": 44,
>>>>>>> development
   "metadata": {},
   "outputs": [],
   "source": [
@@ -650,15 +550,9 @@
    "    if str(Gb[i]) == 'Symmetric Tilt':\n",
    "        SymmTiltGbs.append(V1[i])\n",
    "\n",
<<<<<<< HEAD
    "# Find GBs less than Delta (here 5) degrees from any of the symmetric tilt boundaries in this system\n",
    "\n",
    "Delta = 5\n",
=======
    "# Find GBs less than Delta (here 4) degrees from any of the symmetric tilt boundaries in this system\n",
    "\n",
    "Delta = 4\n",
>>>>>>> development
    "Min_angles = []\n",
    "for i in range(len(V1)):\n",
    "    angles = []\n",
@@ -669,11 +563,6 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
   "metadata": {},
   "outputs": [],
=======
   "execution_count": 43,
   "metadata": {},
   "outputs": [
@@ -917,7 +806,6 @@
     "output_type": "execute_result"
    }
   ],
>>>>>>> development
   "source": [
    "df['Angles'] = Min_angles\n",
    "\n",
@@ -934,19 +822,11 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "GB_plane = [-7, 18, -4]\n",
=======
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "GB_plane = [-7, 5, 2]\n",
>>>>>>> development
    "# lattice parameter\n",
    "LatP = 4\n",
    "basis = 'fcc'"
@@ -954,11 +834,6 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
   "metadata": {},
   "outputs": [],
=======
   "execution_count": 60,
   "metadata": {},
   "outputs": [
@@ -970,7 +845,6 @@
     ]
    }
   ],
>>>>>>> development
   "source": [
    "# just a piece of info, how much of this mixed boundary is tilt or twist?\n",
    "csl.Tilt_Twist_comp(GB_plane, axis, m, n)"
@@ -978,11 +852,6 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
   "metadata": {},
   "outputs": [],
=======
   "execution_count": 65,
   "metadata": {
    "scrolled": true
@@ -997,7 +866,6 @@
     ]
    }
   ],
>>>>>>> development
   "source": [
    "# instantiate a GB:\n",
    "my_gb = gbc.GB_character()\n",
@@ -1008,33 +876,6 @@
    "# Create the bicrystal\n",
    "my_gb.CSL_Bicrystal_Atom_generator()\n",
    "\n",
<<<<<<< HEAD
    "# NOW CREATE MY GB, CONSIDER MICROSCOPIC DEGREES OF FREEDOM:\n",
    "\n",
    "# remove atoms closer than this 'my_gb.overD' fraction of the lattice parameter. If put to 0 no atoms will be removed.\n",
    "# if greater than 0, you must immediately input either g1 (grain 1) or g2 (grain 2) from which atoms shall \n",
    "# be removed.\n",
    "\n",
    "my_gb.overD = 0.3\n",
    "\n",
    "# put in the rigib body translation to False: it shows the as constructed GB after atom removal, put it to True: \n",
    "# you must input two integers a and b to create a grid. by default a= 10 and b= 5 and you will produce 50 initial\n",
    "# structures. For mor info, read the README.\n",
    "\n",
    "rigid = True\n",
    "\n",
    "# supercell dimensions [x,y,z], with x along GB normal and y and z in the GB plane\n",
    "\n",
    "dim = [3, 4, 5]\n",
    "\n",
    "#several possible scenarios:\n",
    "    \n",
    "# my_gb.WriteGBT(my_gb.overD,'g1', False, dim[0], dim[1], dim[2])\n",
    "# my_gb.WriteGBT(0, True, 10, 5, dim[0], dim[1], dim[2])\n",
    "# my_gb.WriteGB(0, False ,dim[0], dim[1], dim[2])\n",
    "\n",
    "my_gb.WriteGB(my_gb.overD,'g1', rigid, 10, 5, dim[0], dim[1], dim[2])\n"
=======
    "# Write a GB :\n",
    "# by default overlap = 0.0, rigid = False, \n",
    "#           dim1, dim2, dim3 = [1, 1, 1]\n",
@@ -1048,16 +889,11 @@
    "#my_gb.WriteGB(overlap= 0.3, whichG= 'g1', rigid= True,a = 3, b= 2, dim2=5 , file='VASP')\n",
    "\n",
    "my_gb.WriteGB(overlap=0.3, whichG='g1', dim1=3, dim2=3, dim3= 2,file='VASP')"
>>>>>>> development
   ]
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
=======
   "execution_count": 66,
>>>>>>> development
   "metadata": {},
   "outputs": [],
   "source": [
@@ -1069,11 +905,7 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
=======
   "execution_count": 63,
>>>>>>> development
   "metadata": {},
   "outputs": [],
   "source": [
@@ -1100,11 +932,6 @@
  },
  {
   "cell_type": "code",
<<<<<<< HEAD
   "execution_count": null,
   "metadata": {},
   "outputs": [],
=======
   "execution_count": 67,
   "metadata": {},
   "outputs": [
@@ -1901,7 +1728,6 @@
     "output_type": "display_data"
    }
   ],
>>>>>>> development
   "source": [
    "%matplotlib notebook\n",
    "plot_gb(X,Y,[0,1,0])"