<commit_before>{
 "metadata": {
  "name": "",
  "signature": "sha256:365eef33de923ba7365c8cb50f95cdd68c9ba64c6f7cd2c3ff41e03601742c46"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import smact.lattice as lattice\n",
      "import smact.builder as builder\n",
      "import smact.core as core\n",
      "import copy\n",
      "import os\n",
      "import csv\n",
      "import numpy as np"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# get correct path for datafiles when called from another directory\n",
      "smact_directory = '../../smact'\n",
      "# Append a trailing slash to make coherent directory name - this would select the\n",
      "# root directory in the case of no prefix, so we need to check\n",
      "if smact_directory:\n",
      "    smact_directory = smact_directory + '/'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "site_A = lattice.Site([0,0,0],[+1,+2,+3])\n",
      "site_B = lattice.Site([0.5,0.5,0.5],[+5,+4,+3,+2])\n",
      "site_C = lattice.Site([0.5,0.5,0.5],[-2,-1])\n",
      "perovskite = lattice.Lattice([site_A,site_B,site_C],space_group=221)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "search = core.ordered_elements(3,87)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "A_list = []\n",
      "B_list = []\n",
      "C_list = [['O',-2,1.35],['S',-2,1.84],['Se',-2,1.98],['F',-1,1.285],['Br',-1,1.96],['I',-1,2.2]]\n",
      "for element in search:\n",
      "    with open(smact_directory + 'data/shannon_radii.csv','rU') as f:\n",
      "        reader = csv.reader(f)\n",
      "        r_shannon=False\n",
      "        for row in reader:\n",
      "            if row[2]==\"12_n\" and row[0]==element and int(row[1]) in site_A.oxidation_states:\n",
      "                A_list.append([row[0],row[1],row[4]])\n",
      "            if row[2]==\"6_n\" and row[0]==element and int(row[1]) in site_B.oxidation_states:\n",
      "                B_list.append([row[0],row[1],row[4]])\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 14
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "charge_balanced = []\n",
      "goldschmidt_cubic = []\n",
      "goldschmidt_ortho = []\n",
      "a_too_large = []\n",
      "A_B_similar = []\n",
      "pauling_perov = []\n",
      "for A in A_list:\n",
      "    for B in B_list:\n",
      "        if B[0] != A[0]:\n",
      "            for C in C_list:\n",
      "                if C[0] != A[0] and C[0] != B[0]:\n",
      "                    if int(A[1])+int(B[1])+3*int(C[1]) == 0:\n",
      "                         charge_balanced.append([A[0],B[0],C[0]])\n",
      "                         paul_a = core.Element(A[0]).pauling_eneg\n",
      "                         paul_b = core.Element(B[0]).pauling_eneg\n",
      "                         paul_c = core.Element(C[0]).pauling_eneg\n",
      "                         electroneg_makes_sense = core.pauling_test([A[1],B[1],C[1]], [paul_a,paul_b,paul_c])\n",
      "                         if electroneg_makes_sense:\n",
      "                             pauling_perov.append([A[0],B[0],C[0]])\n",
      "                         tol = (float(A[2]) + C[2])/(np.sqrt(2)*(float(B[2])+C[2]))\n",
      "                         if tol > 1.0:\n",
      "                            a_too_large.append([A[0],B[0],C[0]])\n",
      "                         if tol > 0.9 and tol <= 1.0:\n",
      "                            goldschmidt_cubic.append([A[0],B[0],C[0]])\n",
      "                         if tol >= 0.71 and tol < 0.9:\n",
      "                            goldschmidt_ortho.append([A[0],B[0],C[0]])\n",
      "                         if tol < 0.71:\n",
      "                            A_B_similar.append([A[0],B[0],C[0]])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 17
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "print 'Number of possible charge neutral perovskites from', search[0], 'to', search[len(search)-1], '=', len(charge_balanced)\n",
      "print 'Number of Pauling senseibe perovskites from', search[0], 'to', search[len(search)-1], '=', len(pauling_perov)\n",
      "print 'Number of possible cubic perovskites from', search[0], 'to', search[len(search)-1], '=', len(goldschmidt_cubic)\n",
      "print 'Number of possible ortho perovskites from', search[0], 'to', search[len(search)-1], '=', len(goldschmidt_ortho)\n",
      "print 'Number of possible hexagonal perovskites from', search[0], 'to', search[len(search)-1], '=', len(a_too_large)\n",
      "print 'Number of possible non-perovskites from', search[0], 'to', search[len(search)-1], '=', len(A_B_similar)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of possible charge neutral perovskites from Li to Rn = 1673\n",
        "Number of Pauling senseibe perovskites from Li to Rn = 192\n",
        "Number of possible cubic perovskites from Li to Rn = 600\n",
        "Number of possible ortho perovskites from Li to Rn = 635\n",
        "Number of possible hexagonal perovskites from Li to Rn = 438\n",
        "Number of possible non-perovskites from Li to Rn = 0\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "print goldschmidt_cubic"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "[['Na', 'Be', 'Br'], ['Na', 'Be', 'I'], ['Na', 'Mg', 'F'], ['Na', 'V', 'F'], ['Na', 'V', 'S'], ['Na', 'V', 'Se'], ['Na', 'Cr', 'F'], ['Na', 'Cr', 'S'], ['Na', 'Cr', 'Se'], ['Na', 'Mn', 'F'], ['Na', 'Fe', 'F'], ['Na', 'Co', 'F'], ['Na', 'Ni', 'F'], ['Na', 'Cu', 'F'], ['Na', 'Zn', 'F'], ['Na', 'Ge', 'F'], ['Na', 'As', 'S'], ['Na', 'As', 'Se'], ['Na', 'Nb', 'O'], ['Na', 'Nb', 'S'], ['Na', 'Nb', 'Se'], ['Na', 'Mo', 'O'], ['Na', 'Mo', 'S'], ['Na', 'Mo', 'Se'], ['Na', 'Tc', 'O'], ['Na', 'Tc', 'S'], ['Na', 'Tc', 'Se'], ['Na', 'Ru', 'S'], ['Na', 'Ru', 'Se'], ['Na', 'Rh', 'S'], ['Na', 'Rh', 'Se'], ['Na', 'Sb', 'O'], ['Na', 'Sb', 'S'], ['Na', 'Sb', 'Se'], ['Na', 'Ta', 'O'], ['Na', 'Ta', 'S'], ['Na', 'Ta', 'Se'], ['Na', 'W', 'O'], ['Na', 'W', 'S'], ['Na', 'W', 'Se'], ['Na', 'Re', 'S'], ['Na', 'Re', 'Se'], ['Na', 'Os', 'S'], ['Na', 'Os', 'Se'], ['Na', 'Ir', 'S'], ['Na', 'Ir', 'Se'], ['Na', 'Pt', 'F'], ['Na', 'Pt', 'S'], ['Na', 'Pt', 'Se'], ['Na', 'Au', 'S'], ['Na', 'Au', 'Se'], ['Na', 'Bi', 'O'], ['K', 'Mg', 'Br'], ['K', 'Mg', 'I'], ['K', 'Ca', 'F'], ['K', 'Ti', 'F'], ['K', 'Ti', 'Br'], ['K', 'V', 'F'], ['K', 'V', 'Br'], ['K', 'V', 'I'], ['K', 'Cr', 'Br'], ['K', 'Cr', 'I'], ['K', 'Mn', 'Br'], ['K', 'Mn', 'I'], ['K', 'Fe', 'Br'], ['K', 'Fe', 'I'], ['K', 'Co', 'Br'], ['K', 'Co', 'I'], ['K', 'Ni', 'Br'], ['K', 'Ni', 'I'], ['K', 'Cu', 'Br'], ['K', 'Cu', 'I'], ['K', 'Zn', 'Br'], ['K', 'Zn', 'I'], ['K', 'Ge', 'Br'], ['K', 'Ge', 'I'], ['K', 'Nb', 'S'], ['K', 'Nb', 'Se'], ['K', 'Mo', 'Se'], ['K', 'Tc', 'Se'], ['K', 'Pd', 'F'], ['K', 'Pd', 'Br'], ['K', 'Ag', 'F'], ['K', 'Cd', 'F'], ['K', 'Sb', 'Se'], ['K', 'I', 'O'], ['K', 'Ta', 'S'], ['K', 'Ta', 'Se'], ['K', 'W', 'Se'], ['K', 'Re', 'Se'], ['K', 'Pt', 'F'], ['K', 'Pt', 'Br'], ['K', 'Pt', 'I'], ['K', 'Bi', 'S'], ['K', 'Bi', 'Se'], ['Ca', 'Si', 'Se'], ['Ca', 'S', 'Se'], ['Ca', 'Ti', 'O'], ['Ca', 'Ti', 'S'], ['Ca', 'Ti', 'Se'], ['Ca', 'V', 'O'], ['Ca', 'V', 'S'], ['Ca', 'V', 'Se'], ['Ca', 'Cr', 'S'], ['Ca', 'Cr', 'Se'], ['Ca', 'Mn', 'S'], ['Ca', 'Mn', 'Se'], ['Ca', 'Fe', 'O'], ['Ca', 'Fe', 'S'], ['Ca', 'Fe', 'Se'], ['Ca', 'Co', 'S'], ['Ca', 'Co', 'Se'], ['Ca', 'Ni', 'S'], ['Ca', 'Ni', 'Se'], ['Ca', 'Ge', 'S'], ['Ca', 'Ge', 'Se'], ['Ca', 'Se', 'S'], ['Ca', 'Zr', 'O'], ['Ca', 'Nb', 'O'], ['Ca', 'Mo', 'O'], ['Ca', 'Mo', 'S'], ['Ca', 'Tc', 'O'], ['Ca', 'Tc', 'S'], ['Ca', 'Ru', 'O'], ['Ca', 'Ru', 'S'], ['Ca', 'Ru', 'Se'], ['Ca', 'Rh', 'O'], ['Ca', 'Rh', 'S'], ['Ca', 'Rh', 'Se'], ['Ca', 'Pd', 'O'], ['Ca', 'Pd', 'S'], ['Ca', 'Pd', 'Se'], ['Ca', 'Sn', 'O'], ['Ca', 'Tb', 'O'], ['Ca', 'Hf', 'O'], ['Ca', 'Ta', 'O'], ['Ca', 'W', 'O'], ['Ca', 'Re', 'O'], ['Ca', 'Re', 'S'], ['Ca', 'Os', 'O'], ['Ca', 'Os', 'S'], ['Ca', 'Ir', 'O'], ['Ca', 'Ir', 'S'], ['Ca', 'Ir', 'Se'], ['Ca', 'Pt', 'O'], ['Ca', 'Pt', 'S'], ['Ca', 'Pt', 'Se'], ['Rb', 'Mg', 'Br'], ['Rb', 'Mg', 'I'], ['Rb', 'Ca', 'F'], ['Rb', 'Ti', 'F'], ['Rb', 'Ti', 'Br'], ['Rb', 'Ti', 'I'], ['Rb', 'V', 'Br'], ['Rb', 'V', 'I'], ['Rb', 'Cr', 'Br'], ['Rb', 'Cr', 'I'], ['Rb', 'Mn', 'Br'], ['Rb', 'Mn', 'I'], ['Rb', 'Fe', 'Br'], ['Rb', 'Fe', 'I'], ['Rb', 'Co', 'Br'], ['Rb', 'Co', 'I'], ['Rb', 'Ni', 'Br'], ['Rb', 'Ni', 'I'], ['Rb', 'Cu', 'Br'], ['Rb', 'Cu', 'I'], ['Rb', 'Zn', 'Br'], ['Rb', 'Zn', 'I'], ['Rb', 'Ge', 'Br'], ['Rb', 'Ge', 'I'], ['Rb', 'Nb', 'Se'], ['Rb', 'Pd', 'F'], ['Rb', 'Pd', 'Br'], ['Rb', 'Pd', 'I'], ['Rb', 'Ag', 'F'], ['Rb', 'Cd', 'F'], ['Rb', 'I', 'O'], ['Rb', 'I', 'S'], ['Rb', 'Dy', 'F'], ['Rb', 'Tm', 'F'], ['Rb', 'Yb', 'F'], ['Rb', 'Ta', 'Se'], ['Rb', 'Pt', 'Br'], ['Rb', 'Pt', 'I'], ['Rb', 'Hg', 'F'], ['Rb', 'Bi', 'S'], ['Rb', 'Bi', 'Se'], ['Sr', 'Ti', 'S'], ['Sr', 'Ti', 'Se'], ['Sr', 'V', 'S'], ['Sr', 'V', 'Se'], ['Sr', 'Cr', 'S'], ['Sr', 'Cr', 'Se'], ['Sr', 'Mn', 'S'], ['Sr', 'Mn', 'Se'], ['Sr', 'Fe', 'S'], ['Sr', 'Fe', 'Se'], ['Sr', 'Co', 'S'], ['Sr', 'Co', 'Se'], ['Sr', 'Ni', 'S'], ['Sr', 'Ni', 'Se'], ['Sr', 'Ge', 'S'], ['Sr', 'Ge', 'Se'], ['Sr', 'Se', 'S'], ['Sr', 'Zr', 'O'], ['Sr', 'Zr', 'S'], ['Sr', 'Nb', 'O'], ['Sr', 'Nb', 'S'], ['Sr', 'Nb', 'Se'], ['Sr', 'Mo', 'O'], ['Sr', 'Mo', 'S'], ['Sr', 'Mo', 'Se'], ['Sr', 'Tc', 'O'], ['Sr', 'Tc', 'S'], ['Sr', 'Tc', 'Se'], ['Sr', 'Ru', 'S'], ['Sr', 'Ru', 'Se'], ['Sr', 'Rh', 'S'], ['Sr', 'Rh', 'Se'], ['Sr', 'Pd', 'S'], ['Sr', 'Pd', 'Se'], ['Sr', 'Sn', 'O'], ['Sr', 'Sn', 'S'], ['Sr', 'Sn', 'Se'], ['Sr', 'Tb', 'O'], ['Sr', 'Hf', 'O'], ['Sr', 'Hf', 'S'], ['Sr', 'Ta', 'O'], ['Sr', 'Ta', 'S'], ['Sr', 'Ta', 'Se'], ['Sr', 'W', 'O'], ['Sr', 'W', 'S'], ['Sr', 'W', 'Se'], ['Sr', 'Re', 'O'], ['Sr', 'Re', 'S'], ['Sr', 'Re', 'Se'], ['Sr', 'Os', 'O'], ['Sr', 'Os', 'S'], ['Sr', 'Os', 'Se'], ['Sr', 'Ir', 'O'], ['Sr', 'Ir', 'S'], ['Sr', 'Ir', 'Se'], ['Sr', 'Pt', 'O'], ['Sr', 'Pt', 'S'], ['Sr', 'Pt', 'Se'], ['Sr', 'Pb', 'O'], ['Cd', 'Si', 'S'], ['Cd', 'Si', 'Se'], ['Cd', 'S', 'Se'], ['Cd', 'Ti', 'O'], ['Cd', 'Ti', 'S'], ['Cd', 'V', 'O'], ['Cd', 'V', 'S'], ['Cd', 'V', 'Se'], ['Cd', 'Cr', 'O'], ['Cd', 'Cr', 'S'], ['Cd', 'Cr', 'Se'], ['Cd', 'Mn', 'S'], ['Cd', 'Mn', 'Se'], ['Cd', 'Fe', 'O'], ['Cd', 'Fe', 'S'], ['Cd', 'Fe', 'Se'], ['Cd', 'Co', 'S'], ['Cd', 'Co', 'Se'], ['Cd', 'Ni', 'S'], ['Cd', 'Ni', 'Se'], ['Cd', 'Ge', 'S'], ['Cd', 'Ge', 'Se'], ['Cd', 'Se', 'S'], ['Cd', 'Zr', 'O'], ['Cd', 'Nb', 'O'], ['Cd', 'Mo', 'O'], ['Cd', 'Tc', 'O'], ['Cd', 'Ru', 'O'], ['Cd', 'Ru', 'S'], ['Cd', 'Rh', 'O'], ['Cd', 'Rh', 'S'], ['Cd', 'Rh', 'Se'], ['Cd', 'Pd', 'O'], ['Cd', 'Pd', 'S'], ['Cd', 'Sn', 'O'], ['Cd', 'Hf', 'O'], ['Cd', 'Ta', 'O'], ['Cd', 'W', 'O'], ['Cd', 'Re', 'O'], ['Cd', 'Re', 'S'], ['Cd', 'Os', 'O'], ['Cd', 'Os', 'S'], ['Cd', 'Ir', 'O'], ['Cd', 'Ir', 'S'], ['Cd', 'Pt', 'O'], ['Cd', 'Pt', 'S'], ['Cs', 'Mg', 'I'], ['Cs', 'Ca', 'F'], ['Cs', 'Ca', 'Br'], ['Cs', 'Ca', 'I'], ['Cs', 'Ti', 'Br'], ['Cs', 'Ti', 'I'], ['Cs', 'V', 'Br'], ['Cs', 'V', 'I'], ['Cs', 'Cr', 'Br'], ['Cs', 'Cr', 'I'], ['Cs', 'Mn', 'I'], ['Cs', 'Fe', 'I'], ['Cs', 'Co', 'I'], ['Cs', 'Ni', 'I'], ['Cs', 'Cu', 'I'], ['Cs', 'Zn', 'I'], ['Cs', 'Ge', 'I'], ['Cs', 'Sr', 'F'], ['Cs', 'Pd', 'Br'], ['Cs', 'Pd', 'I'], ['Cs', 'Ag', 'Br'], ['Cs', 'Ag', 'I'], ['Cs', 'Cd', 'Br'], ['Cs', 'Cd', 'I'], ['Cs', 'I', 'O'], ['Cs', 'I', 'S'], ['Cs', 'I', 'Se'], ['Cs', 'Eu', 'F'], ['Cs', 'Dy', 'F'], ['Cs', 'Tm', 'F'], ['Cs', 'Tm', 'Br'], ['Cs', 'Yb', 'F'], ['Cs', 'Yb', 'Br'], ['Cs', 'Pt', 'Br'], ['Cs', 'Pt', 'I'], ['Cs', 'Hg', 'F'], ['Cs', 'Hg', 'Br'], ['Cs', 'Pb', 'F'], ['Cs', 'Bi', 'Se'], ['Ba', 'Ti', 'S'], ['Ba', 'Ti', 'Se'], ['Ba', 'V', 'Se'], ['Ba', 'Fe', 'Se'], ['Ba', 'Zr', 'S'], ['Ba', 'Zr', 'Se'], ['Ba', 'Nb', 'S'], ['Ba', 'Nb', 'Se'], ['Ba', 'Mo', 'S'], ['Ba', 'Mo', 'Se'], ['Ba', 'Tc', 'S'], ['Ba', 'Tc', 'Se'], ['Ba', 'Ru', 'S'], ['Ba', 'Ru', 'Se'], ['Ba', 'Rh', 'S'], ['Ba', 'Rh', 'Se'], ['Ba', 'Pd', 'S'], ['Ba', 'Pd', 'Se'], ['Ba', 'Sn', 'S'], ['Ba', 'Sn', 'Se'], ['Ba', 'Te', 'O'], ['Ba', 'Ce', 'O'], ['Ba', 'Ce', 'S'], ['Ba', 'Pr', 'O'], ['Ba', 'Pr', 'S'], ['Ba', 'Tb', 'O'], ['Ba', 'Tb', 'S'], ['Ba', 'Tb', 'Se'], ['Ba', 'Hf', 'S'], ['Ba', 'Hf', 'Se'], ['Ba', 'Ta', 'S'], ['Ba', 'Ta', 'Se'], ['Ba', 'W', 'S'], ['Ba', 'W', 'Se'], ['Ba', 'Re', 'S'], ['Ba', 'Re', 'Se'], ['Ba', 'Os', 'S'], ['Ba', 'Os', 'Se'], ['Ba', 'Ir', 'S'], ['Ba', 'Ir', 'Se'], ['Ba', 'Pt', 'S'], ['Ba', 'Pt', 'Se'], ['Ba', 'Pb', 'O'], ['Ba', 'Pb', 'S'], ['Ba', 'Pb', 'Se'], ['Ba', 'Po', 'O'], ['La', 'Al', 'S'], ['La', 'Al', 'Se'], ['La', 'P', 'S'], ['La', 'P', 'Se'], ['La', 'Sc', 'O'], ['La', 'Ti', 'O'], ['La', 'Ti', 'S'], ['La', 'V', 'O'], ['La', 'V', 'S'], ['La', 'V', 'Se'], ['La', 'Cr', 'O'], ['La', 'Cr', 'S'], ['La', 'Cr', 'Se'], ['La', 'Mn', 'O'], ['La', 'Mn', 'S'], ['La', 'Mn', 'Se'], ['La', 'Fe', 'O'], ['La', 'Fe', 'S'], ['La', 'Fe', 'Se'], ['La', 'Co', 'O'], ['La', 'Co', 'S'], ['La', 'Co', 'Se'], ['La', 'Ni', 'O'], ['La', 'Ni', 'S'], ['La', 'Ni', 'Se'], ['La', 'Cu', 'S'], ['La', 'Cu', 'Se'], ['La', 'Ga', 'O'], ['La', 'Ga', 'S'], ['La', 'Ga', 'Se'], ['La', 'As', 'O'], ['La', 'As', 'S'], ['La', 'As', 'Se'], ['La', 'Nb', 'O'], ['La', 'Mo', 'O'], ['La', 'Ru', 'O'], ['La', 'Rh', 'O'], ['La', 'Rh', 'S'], ['La', 'Pd', 'O'], ['La', 'Ag', 'O'], ['La', 'Sb', 'O'], ['La', 'Ta', 'O'], ['La', 'Ir', 'O'], ['Ce', 'Al', 'S'], ['Ce', 'Al', 'Se'], ['Ce', 'P', 'S'], ['Ce', 'P', 'Se'], ['Ce', 'Sc', 'O'], ['Ce', 'Ti', 'O'], ['Ce', 'V', 'O'], ['Ce', 'V', 'S'], ['Ce', 'Cr', 'O'], ['Ce', 'Cr', 'S'], ['Ce', 'Cr', 'Se'], ['Ce', 'Mn', 'O'], ['Ce', 'Mn', 'S'], ['Ce', 'Mn', 'Se'], ['Ce', 'Fe', 'O'], ['Ce', 'Fe', 'S'], ['Ce', 'Fe', 'Se'], ['Ce', 'Co', 'O'], ['Ce', 'Co', 'S'], ['Ce', 'Co', 'Se'], ['Ce', 'Ni', 'O'], ['Ce', 'Ni', 'S'], ['Ce', 'Ni', 'Se'], ['Ce', 'Cu', 'S'], ['Ce', 'Cu', 'Se'], ['Ce', 'Ga', 'O'], ['Ce', 'Ga', 'S'], ['Ce', 'Ga', 'Se'], ['Ce', 'As', 'O'], ['Ce', 'As', 'S'], ['Ce', 'As', 'Se'], ['Ce', 'Nb', 'O'], ['Ce', 'Mo', 'O'], ['Ce', 'Ru', 'O'], ['Ce', 'Rh', 'O'], ['Ce', 'Pd', 'O'], ['Ce', 'Ag', 'O'], ['Ce', 'Sb', 'O'], ['Ce', 'Ta', 'O'], ['Ce', 'Ir', 'O'], ['Nd', 'Al', 'O'], ['Nd', 'Al', 'S'], ['Nd', 'Al', 'Se'], ['Nd', 'P', 'S'], ['Nd', 'P', 'Se'], ['Nd', 'Ti', 'O'], ['Nd', 'V', 'O'], ['Nd', 'Cr', 'O'], ['Nd', 'Mn', 'O'], ['Nd', 'Fe', 'O'], ['Nd', 'Fe', 'S'], ['Nd', 'Co', 'O'], ['Nd', 'Co', 'S'], ['Nd', 'Ni', 'O'], ['Nd', 'Ni', 'S'], ['Nd', 'Cu', 'O'], ['Nd', 'Cu', 'S'], ['Nd', 'Cu', 'Se'], ['Nd', 'Ga', 'O'], ['Nd', 'As', 'O'], ['Nd', 'As', 'S'], ['Nd', 'Mo', 'O'], ['Nd', 'Ru', 'O'], ['Nd', 'Rh', 'O'], ['Nd', 'Ir', 'O'], ['Sm', 'Al', 'O'], ['Sm', 'Al', 'S'], ['Sm', 'Al', 'Se'], ['Sm', 'P', 'S'], ['Sm', 'P', 'Se'], ['Sm', 'Ti', 'O'], ['Sm', 'V', 'O'], ['Sm', 'Cr', 'O'], ['Sm', 'Mn', 'O'], ['Sm', 'Fe', 'O'], ['Sm', 'Co', 'O'], ['Sm', 'Ni', 'O'], ['Sm', 'Cu', 'O'], ['Sm', 'Cu', 'S'], ['Sm', 'Cu', 'Se'], ['Sm', 'Ga', 'O'], ['Sm', 'As', 'O'], ['Sm', 'Ru', 'O'], ['Sm', 'Rh', 'O'], ['Sm', 'Ir', 'O'], ['Tl', 'Mg', 'Br'], ['Tl', 'Mg', 'I'], ['Tl', 'Ca', 'F'], ['Tl', 'Ti', 'F'], ['Tl', 'Ti', 'Br'], ['Tl', 'Ti', 'I'], ['Tl', 'V', 'Br'], ['Tl', 'V', 'I'], ['Tl', 'Cr', 'Br'], ['Tl', 'Cr', 'I'], ['Tl', 'Mn', 'Br'], ['Tl', 'Mn', 'I'], ['Tl', 'Fe', 'Br'], ['Tl', 'Fe', 'I'], ['Tl', 'Co', 'Br'], ['Tl', 'Co', 'I'], ['Tl', 'Ni', 'Br'], ['Tl', 'Ni', 'I'], ['Tl', 'Cu', 'Br'], ['Tl', 'Cu', 'I'], ['Tl', 'Zn', 'Br'], ['Tl', 'Zn', 'I'], ['Tl', 'Ge', 'Br'], ['Tl', 'Ge', 'I'], ['Tl', 'Nb', 'Se'], ['Tl', 'Pd', 'F'], ['Tl', 'Pd', 'Br'], ['Tl', 'Pd', 'I'], ['Tl', 'Ag', 'F'], ['Tl', 'Cd', 'F'], ['Tl', 'I', 'O'], ['Tl', 'Tm', 'F'], ['Tl', 'Yb', 'F'], ['Tl', 'Ta', 'Se'], ['Tl', 'Pt', 'Br'], ['Tl', 'Pt', 'I'], ['Tl', 'Hg', 'F'], ['Tl', 'Bi', 'S'], ['Tl', 'Bi', 'Se'], ['Pb', 'Ti', 'S'], ['Pb', 'Ti', 'Se'], ['Pb', 'V', 'S'], ['Pb', 'V', 'Se'], ['Pb', 'Cr', 'S'], ['Pb', 'Cr', 'Se'], ['Pb', 'Mn', 'S'], ['Pb', 'Mn', 'Se'], ['Pb', 'Fe', 'S'], ['Pb', 'Fe', 'Se'], ['Pb', 'Co', 'S'], ['Pb', 'Co', 'Se'], ['Pb', 'Ni', 'Se'], ['Pb', 'Ge', 'S'], ['Pb', 'Ge', 'Se'], ['Pb', 'Zr', 'O'], ['Pb', 'Zr', 'S'], ['Pb', 'Zr', 'Se'], ['Pb', 'Nb', 'O'], ['Pb', 'Nb', 'S'], ['Pb', 'Nb', 'Se'], ['Pb', 'Mo', 'S'], ['Pb', 'Mo', 'Se'], ['Pb', 'Tc', 'S'], ['Pb', 'Tc', 'Se'], ['Pb', 'Ru', 'S'], ['Pb', 'Ru', 'Se'], ['Pb', 'Rh', 'S'], ['Pb', 'Rh', 'Se'], ['Pb', 'Pd', 'S'], ['Pb', 'Pd', 'Se'], ['Pb', 'Sn', 'O'], ['Pb', 'Sn', 'S'], ['Pb', 'Sn', 'Se'], ['Pb', 'Ce', 'O'], ['Pb', 'Pr', 'O'], ['Pb', 'Tb', 'O'], ['Pb', 'Tb', 'S'], ['Pb', 'Hf', 'O'], ['Pb', 'Hf', 'S'], ['Pb', 'Hf', 'Se'], ['Pb', 'Ta', 'O'], ['Pb', 'Ta', 'S'], ['Pb', 'Ta', 'Se'], ['Pb', 'W', 'O'], ['Pb', 'W', 'S'], ['Pb', 'W', 'Se'], ['Pb', 'Re', 'S'], ['Pb', 'Re', 'Se'], ['Pb', 'Os', 'S'], ['Pb', 'Os', 'Se'], ['Pb', 'Ir', 'S'], ['Pb', 'Ir', 'Se'], ['Pb', 'Pt', 'S'], ['Pb', 'Pt', 'Se']]\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "code",<commit_msg>Changing counting rules<commit_after>{
 "metadata": {
  "name": "",
  "signature": "sha256:1fb2cb844c8433b5b2d3094a1250c3d0058ea0cbb85d1be79fcc5499ea27b3d4"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import smact.lattice as lattice\n",
      "import smact.builder as builder\n",
      "import smact.core as core\n",
      "import copy\n",
      "import os\n",
      "import csv\n",
      "import numpy as np"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# get correct path for datafiles when called from another directory\n",
      "smact_directory = '../../smact'\n",
      "# Append a trailing slash to make coherent directory name - this would select the\n",
      "# root directory in the case of no prefix, so we need to check\n",
      "if smact_directory:\n",
      "    smact_directory = smact_directory + '/'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "site_A = lattice.Site([0,0,0],[+1,+2,+3])\n",
      "site_B = lattice.Site([0.5,0.5,0.5],[+5,+4,+3,+2])\n",
      "site_C = lattice.Site([0.5,0.5,0.5],[-2,-1])\n",
      "perovskite = lattice.Lattice([site_A,site_B,site_C],space_group=221)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "search = core.ordered_elements(3,87)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "A_list = []\n",
      "B_list = []\n",
      "C_list = [['O',-2,1.35],['S',-2,1.84],['Se',-2,1.98],['F',-1,1.285],['Br',-1,1.96],['I',-1,2.2]]\n",
      "for element in search:\n",
      "    with open(smact_directory + 'data/shannon_radii.csv','rU') as f:\n",
      "        reader = csv.reader(f)\n",
      "        r_shannon=False\n",
      "        for row in reader:\n",
      "            if row[2]==\"12_n\" and row[0]==element and int(row[1]) in site_A.oxidation_states:\n",
      "                A_list.append([row[0],row[1],row[4]])\n",
      "            if row[2]==\"6_n\" and row[0]==element and int(row[1]) in site_B.oxidation_states:\n",
      "                B_list.append([row[0],row[1],row[4]])\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "charge_balanced = []\n",
      "goldschmidt_cubic = []\n",
      "goldschmidt_ortho = []\n",
      "a_too_large = []\n",
      "A_B_similar = []\n",
      "pauling_perov = []\n",
      "for A in A_list:\n",
      "    for B in B_list:\n",
      "        if B[0] != A[0]:\n",
      "            for C in C_list:\n",
      "                if C[0] != A[0] and C[0] != B[0]:\n",
      "                    if int(A[1])+int(B[1])+3*int(C[1]) == 0:\n",
      "                         charge_balanced.append([A[0],B[0],C[0]])\n",
      "                         paul_a = core.Element(A[0]).pauling_eneg\n",
      "                         paul_b = core.Element(B[0]).pauling_eneg\n",
      "                         paul_c = core.Element(C[0]).pauling_eneg\n",
      "                         electroneg_makes_sense = core.pauling_test([A[1],B[1],C[1]], [paul_a,paul_b,paul_c],threshold = 0)\n",
      "                         if electroneg_makes_sense:\n",
      "                             pauling_perov.append([A[0],B[0],C[0]])\n",
      "                         tol = (float(A[2]) + C[2])/(np.sqrt(2)*(float(B[2])+C[2]))\n",
      "                         if tol > 1.0:\n",
      "                            a_too_large.append([A[0],B[0],C[0]])\n",
      "                         if tol > 0.9 and tol <= 1.0:\n",
      "                            goldschmidt_cubic.append([A[0],B[0],C[0]])\n",
      "                         if tol >= 0.71 and tol < 0.9:\n",
      "                            goldschmidt_ortho.append([A[0],B[0],C[0]])\n",
      "                         if tol < 0.71:\n",
      "                            A_B_similar.append([A[0],B[0],C[0]])"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 10
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "print 'Number of possible charge neutral perovskites from', search[0], 'to', search[len(search)-1], '=', len(charge_balanced)\n",
      "print 'Number of Pauling senseibe perovskites from', search[0], 'to', search[len(search)-1], '=', len(pauling_perov)\n",
      "print 'Number of possible cubic perovskites from', search[0], 'to', search[len(search)-1], '=', len(goldschmidt_cubic)\n",
      "print 'Number of possible ortho perovskites from', search[0], 'to', search[len(search)-1], '=', len(goldschmidt_ortho)\n",
      "print 'Number of possible hexagonal perovskites from', search[0], 'to', search[len(search)-1], '=', len(a_too_large)\n",
      "print 'Number of possible non-perovskites from', search[0], 'to', search[len(search)-1], '=', len(A_B_similar)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of possible charge neutral perovskites from Li to Rn = 1673\n",
        "Number of Pauling senseibe perovskites from Li to Rn = 1640\n",
        "Number of possible cubic perovskites from Li to Rn = 600\n",
        "Number of possible ortho perovskites from Li to Rn = 635\n",
        "Number of possible hexagonal perovskites from Li to Rn = 438\n",
        "Number of possible non-perovskites from Li to Rn = 0\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "print goldschmidt_cubic"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "[['Na', 'Be', 'Br'], ['Na', 'Be', 'I'], ['Na', 'Mg', 'F'], ['Na', 'V', 'F'], ['Na', 'V', 'S'], ['Na', 'V', 'Se'], ['Na', 'Cr', 'F'], ['Na', 'Cr', 'S'], ['Na', 'Cr', 'Se'], ['Na', 'Mn', 'F'], ['Na', 'Fe', 'F'], ['Na', 'Co', 'F'], ['Na', 'Ni', 'F'], ['Na', 'Cu', 'F'], ['Na', 'Zn', 'F'], ['Na', 'Ge', 'F'], ['Na', 'As', 'S'], ['Na', 'As', 'Se'], ['Na', 'Nb', 'O'], ['Na', 'Nb', 'S'], ['Na', 'Nb', 'Se'], ['Na', 'Mo', 'O'], ['Na', 'Mo', 'S'], ['Na', 'Mo', 'Se'], ['Na', 'Tc', 'O'], ['Na', 'Tc', 'S'], ['Na', 'Tc', 'Se'], ['Na', 'Ru', 'S'], ['Na', 'Ru', 'Se'], ['Na', 'Rh', 'S'], ['Na', 'Rh', 'Se'], ['Na', 'Sb', 'O'], ['Na', 'Sb', 'S'], ['Na', 'Sb', 'Se'], ['Na', 'Ta', 'O'], ['Na', 'Ta', 'S'], ['Na', 'Ta', 'Se'], ['Na', 'W', 'O'], ['Na', 'W', 'S'], ['Na', 'W', 'Se'], ['Na', 'Re', 'S'], ['Na', 'Re', 'Se'], ['Na', 'Os', 'S'], ['Na', 'Os', 'Se'], ['Na', 'Ir', 'S'], ['Na', 'Ir', 'Se'], ['Na', 'Pt', 'F'], ['Na', 'Pt', 'S'], ['Na', 'Pt', 'Se'], ['Na', 'Au', 'S'], ['Na', 'Au', 'Se'], ['Na', 'Bi', 'O'], ['K', 'Mg', 'Br'], ['K', 'Mg', 'I'], ['K', 'Ca', 'F'], ['K', 'Ti', 'F'], ['K', 'Ti', 'Br'], ['K', 'V', 'F'], ['K', 'V', 'Br'], ['K', 'V', 'I'], ['K', 'Cr', 'Br'], ['K', 'Cr', 'I'], ['K', 'Mn', 'Br'], ['K', 'Mn', 'I'], ['K', 'Fe', 'Br'], ['K', 'Fe', 'I'], ['K', 'Co', 'Br'], ['K', 'Co', 'I'], ['K', 'Ni', 'Br'], ['K', 'Ni', 'I'], ['K', 'Cu', 'Br'], ['K', 'Cu', 'I'], ['K', 'Zn', 'Br'], ['K', 'Zn', 'I'], ['K', 'Ge', 'Br'], ['K', 'Ge', 'I'], ['K', 'Nb', 'S'], ['K', 'Nb', 'Se'], ['K', 'Mo', 'Se'], ['K', 'Tc', 'Se'], ['K', 'Pd', 'F'], ['K', 'Pd', 'Br'], ['K', 'Ag', 'F'], ['K', 'Cd', 'F'], ['K', 'Sb', 'Se'], ['K', 'I', 'O'], ['K', 'Ta', 'S'], ['K', 'Ta', 'Se'], ['K', 'W', 'Se'], ['K', 'Re', 'Se'], ['K', 'Pt', 'F'], ['K', 'Pt', 'Br'], ['K', 'Pt', 'I'], ['K', 'Bi', 'S'], ['K', 'Bi', 'Se'], ['Ca', 'Si', 'Se'], ['Ca', 'S', 'Se'], ['Ca', 'Ti', 'O'], ['Ca', 'Ti', 'S'], ['Ca', 'Ti', 'Se'], ['Ca', 'V', 'O'], ['Ca', 'V', 'S'], ['Ca', 'V', 'Se'], ['Ca', 'Cr', 'S'], ['Ca', 'Cr', 'Se'], ['Ca', 'Mn', 'S'], ['Ca', 'Mn', 'Se'], ['Ca', 'Fe', 'O'], ['Ca', 'Fe', 'S'], ['Ca', 'Fe', 'Se'], ['Ca', 'Co', 'S'], ['Ca', 'Co', 'Se'], ['Ca', 'Ni', 'S'], ['Ca', 'Ni', 'Se'], ['Ca', 'Ge', 'S'], ['Ca', 'Ge', 'Se'], ['Ca', 'Se', 'S'], ['Ca', 'Zr', 'O'], ['Ca', 'Nb', 'O'], ['Ca', 'Mo', 'O'], ['Ca', 'Mo', 'S'], ['Ca', 'Tc', 'O'], ['Ca', 'Tc', 'S'], ['Ca', 'Ru', 'O'], ['Ca', 'Ru', 'S'], ['Ca', 'Ru', 'Se'], ['Ca', 'Rh', 'O'], ['Ca', 'Rh', 'S'], ['Ca', 'Rh', 'Se'], ['Ca', 'Pd', 'O'], ['Ca', 'Pd', 'S'], ['Ca', 'Pd', 'Se'], ['Ca', 'Sn', 'O'], ['Ca', 'Tb', 'O'], ['Ca', 'Hf', 'O'], ['Ca', 'Ta', 'O'], ['Ca', 'W', 'O'], ['Ca', 'Re', 'O'], ['Ca', 'Re', 'S'], ['Ca', 'Os', 'O'], ['Ca', 'Os', 'S'], ['Ca', 'Ir', 'O'], ['Ca', 'Ir', 'S'], ['Ca', 'Ir', 'Se'], ['Ca', 'Pt', 'O'], ['Ca', 'Pt', 'S'], ['Ca', 'Pt', 'Se'], ['Rb', 'Mg', 'Br'], ['Rb', 'Mg', 'I'], ['Rb', 'Ca', 'F'], ['Rb', 'Ti', 'F'], ['Rb', 'Ti', 'Br'], ['Rb', 'Ti', 'I'], ['Rb', 'V', 'Br'], ['Rb', 'V', 'I'], ['Rb', 'Cr', 'Br'], ['Rb', 'Cr', 'I'], ['Rb', 'Mn', 'Br'], ['Rb', 'Mn', 'I'], ['Rb', 'Fe', 'Br'], ['Rb', 'Fe', 'I'], ['Rb', 'Co', 'Br'], ['Rb', 'Co', 'I'], ['Rb', 'Ni', 'Br'], ['Rb', 'Ni', 'I'], ['Rb', 'Cu', 'Br'], ['Rb', 'Cu', 'I'], ['Rb', 'Zn', 'Br'], ['Rb', 'Zn', 'I'], ['Rb', 'Ge', 'Br'], ['Rb', 'Ge', 'I'], ['Rb', 'Nb', 'Se'], ['Rb', 'Pd', 'F'], ['Rb', 'Pd', 'Br'], ['Rb', 'Pd', 'I'], ['Rb', 'Ag', 'F'], ['Rb', 'Cd', 'F'], ['Rb', 'I', 'O'], ['Rb', 'I', 'S'], ['Rb', 'Dy', 'F'], ['Rb', 'Tm', 'F'], ['Rb', 'Yb', 'F'], ['Rb', 'Ta', 'Se'], ['Rb', 'Pt', 'Br'], ['Rb', 'Pt', 'I'], ['Rb', 'Hg', 'F'], ['Rb', 'Bi', 'S'], ['Rb', 'Bi', 'Se'], ['Sr', 'Ti', 'S'], ['Sr', 'Ti', 'Se'], ['Sr', 'V', 'S'], ['Sr', 'V', 'Se'], ['Sr', 'Cr', 'S'], ['Sr', 'Cr', 'Se'], ['Sr', 'Mn', 'S'], ['Sr', 'Mn', 'Se'], ['Sr', 'Fe', 'S'], ['Sr', 'Fe', 'Se'], ['Sr', 'Co', 'S'], ['Sr', 'Co', 'Se'], ['Sr', 'Ni', 'S'], ['Sr', 'Ni', 'Se'], ['Sr', 'Ge', 'S'], ['Sr', 'Ge', 'Se'], ['Sr', 'Se', 'S'], ['Sr', 'Zr', 'O'], ['Sr', 'Zr', 'S'], ['Sr', 'Nb', 'O'], ['Sr', 'Nb', 'S'], ['Sr', 'Nb', 'Se'], ['Sr', 'Mo', 'O'], ['Sr', 'Mo', 'S'], ['Sr', 'Mo', 'Se'], ['Sr', 'Tc', 'O'], ['Sr', 'Tc', 'S'], ['Sr', 'Tc', 'Se'], ['Sr', 'Ru', 'S'], ['Sr', 'Ru', 'Se'], ['Sr', 'Rh', 'S'], ['Sr', 'Rh', 'Se'], ['Sr', 'Pd', 'S'], ['Sr', 'Pd', 'Se'], ['Sr', 'Sn', 'O'], ['Sr', 'Sn', 'S'], ['Sr', 'Sn', 'Se'], ['Sr', 'Tb', 'O'], ['Sr', 'Hf', 'O'], ['Sr', 'Hf', 'S'], ['Sr', 'Ta', 'O'], ['Sr', 'Ta', 'S'], ['Sr', 'Ta', 'Se'], ['Sr', 'W', 'O'], ['Sr', 'W', 'S'], ['Sr', 'W', 'Se'], ['Sr', 'Re', 'O'], ['Sr', 'Re', 'S'], ['Sr', 'Re', 'Se'], ['Sr', 'Os', 'O'], ['Sr', 'Os', 'S'], ['Sr', 'Os', 'Se'], ['Sr', 'Ir', 'O'], ['Sr', 'Ir', 'S'], ['Sr', 'Ir', 'Se'], ['Sr', 'Pt', 'O'], ['Sr', 'Pt', 'S'], ['Sr', 'Pt', 'Se'], ['Sr', 'Pb', 'O'], ['Cd', 'Si', 'S'], ['Cd', 'Si', 'Se'], ['Cd', 'S', 'Se'], ['Cd', 'Ti', 'O'], ['Cd', 'Ti', 'S'], ['Cd', 'V', 'O'], ['Cd', 'V', 'S'], ['Cd', 'V', 'Se'], ['Cd', 'Cr', 'O'], ['Cd', 'Cr', 'S'], ['Cd', 'Cr', 'Se'], ['Cd', 'Mn', 'S'], ['Cd', 'Mn', 'Se'], ['Cd', 'Fe', 'O'], ['Cd', 'Fe', 'S'], ['Cd', 'Fe', 'Se'], ['Cd', 'Co', 'S'], ['Cd', 'Co', 'Se'], ['Cd', 'Ni', 'S'], ['Cd', 'Ni', 'Se'], ['Cd', 'Ge', 'S'], ['Cd', 'Ge', 'Se'], ['Cd', 'Se', 'S'], ['Cd', 'Zr', 'O'], ['Cd', 'Nb', 'O'], ['Cd', 'Mo', 'O'], ['Cd', 'Tc', 'O'], ['Cd', 'Ru', 'O'], ['Cd', 'Ru', 'S'], ['Cd', 'Rh', 'O'], ['Cd', 'Rh', 'S'], ['Cd', 'Rh', 'Se'], ['Cd', 'Pd', 'O'], ['Cd', 'Pd', 'S'], ['Cd', 'Sn', 'O'], ['Cd', 'Hf', 'O'], ['Cd', 'Ta', 'O'], ['Cd', 'W', 'O'], ['Cd', 'Re', 'O'], ['Cd', 'Re', 'S'], ['Cd', 'Os', 'O'], ['Cd', 'Os', 'S'], ['Cd', 'Ir', 'O'], ['Cd', 'Ir', 'S'], ['Cd', 'Pt', 'O'], ['Cd', 'Pt', 'S'], ['Cs', 'Mg', 'I'], ['Cs', 'Ca', 'F'], ['Cs', 'Ca', 'Br'], ['Cs', 'Ca', 'I'], ['Cs', 'Ti', 'Br'], ['Cs', 'Ti', 'I'], ['Cs', 'V', 'Br'], ['Cs', 'V', 'I'], ['Cs', 'Cr', 'Br'], ['Cs', 'Cr', 'I'], ['Cs', 'Mn', 'I'], ['Cs', 'Fe', 'I'], ['Cs', 'Co', 'I'], ['Cs', 'Ni', 'I'], ['Cs', 'Cu', 'I'], ['Cs', 'Zn', 'I'], ['Cs', 'Ge', 'I'], ['Cs', 'Sr', 'F'], ['Cs', 'Pd', 'Br'], ['Cs', 'Pd', 'I'], ['Cs', 'Ag', 'Br'], ['Cs', 'Ag', 'I'], ['Cs', 'Cd', 'Br'], ['Cs', 'Cd', 'I'], ['Cs', 'I', 'O'], ['Cs', 'I', 'S'], ['Cs', 'I', 'Se'], ['Cs', 'Eu', 'F'], ['Cs', 'Dy', 'F'], ['Cs', 'Tm', 'F'], ['Cs', 'Tm', 'Br'], ['Cs', 'Yb', 'F'], ['Cs', 'Yb', 'Br'], ['Cs', 'Pt', 'Br'], ['Cs', 'Pt', 'I'], ['Cs', 'Hg', 'F'], ['Cs', 'Hg', 'Br'], ['Cs', 'Pb', 'F'], ['Cs', 'Bi', 'Se'], ['Ba', 'Ti', 'S'], ['Ba', 'Ti', 'Se'], ['Ba', 'V', 'Se'], ['Ba', 'Fe', 'Se'], ['Ba', 'Zr', 'S'], ['Ba', 'Zr', 'Se'], ['Ba', 'Nb', 'S'], ['Ba', 'Nb', 'Se'], ['Ba', 'Mo', 'S'], ['Ba', 'Mo', 'Se'], ['Ba', 'Tc', 'S'], ['Ba', 'Tc', 'Se'], ['Ba', 'Ru', 'S'], ['Ba', 'Ru', 'Se'], ['Ba', 'Rh', 'S'], ['Ba', 'Rh', 'Se'], ['Ba', 'Pd', 'S'], ['Ba', 'Pd', 'Se'], ['Ba', 'Sn', 'S'], ['Ba', 'Sn', 'Se'], ['Ba', 'Te', 'O'], ['Ba', 'Ce', 'O'], ['Ba', 'Ce', 'S'], ['Ba', 'Pr', 'O'], ['Ba', 'Pr', 'S'], ['Ba', 'Tb', 'O'], ['Ba', 'Tb', 'S'], ['Ba', 'Tb', 'Se'], ['Ba', 'Hf', 'S'], ['Ba', 'Hf', 'Se'], ['Ba', 'Ta', 'S'], ['Ba', 'Ta', 'Se'], ['Ba', 'W', 'S'], ['Ba', 'W', 'Se'], ['Ba', 'Re', 'S'], ['Ba', 'Re', 'Se'], ['Ba', 'Os', 'S'], ['Ba', 'Os', 'Se'], ['Ba', 'Ir', 'S'], ['Ba', 'Ir', 'Se'], ['Ba', 'Pt', 'S'], ['Ba', 'Pt', 'Se'], ['Ba', 'Pb', 'O'], ['Ba', 'Pb', 'S'], ['Ba', 'Pb', 'Se'], ['Ba', 'Po', 'O'], ['La', 'Al', 'S'], ['La', 'Al', 'Se'], ['La', 'P', 'S'], ['La', 'P', 'Se'], ['La', 'Sc', 'O'], ['La', 'Ti', 'O'], ['La', 'Ti', 'S'], ['La', 'V', 'O'], ['La', 'V', 'S'], ['La', 'V', 'Se'], ['La', 'Cr', 'O'], ['La', 'Cr', 'S'], ['La', 'Cr', 'Se'], ['La', 'Mn', 'O'], ['La', 'Mn', 'S'], ['La', 'Mn', 'Se'], ['La', 'Fe', 'O'], ['La', 'Fe', 'S'], ['La', 'Fe', 'Se'], ['La', 'Co', 'O'], ['La', 'Co', 'S'], ['La', 'Co', 'Se'], ['La', 'Ni', 'O'], ['La', 'Ni', 'S'], ['La', 'Ni', 'Se'], ['La', 'Cu', 'S'], ['La', 'Cu', 'Se'], ['La', 'Ga', 'O'], ['La', 'Ga', 'S'], ['La', 'Ga', 'Se'], ['La', 'As', 'O'], ['La', 'As', 'S'], ['La', 'As', 'Se'], ['La', 'Nb', 'O'], ['La', 'Mo', 'O'], ['La', 'Ru', 'O'], ['La', 'Rh', 'O'], ['La', 'Rh', 'S'], ['La', 'Pd', 'O'], ['La', 'Ag', 'O'], ['La', 'Sb', 'O'], ['La', 'Ta', 'O'], ['La', 'Ir', 'O'], ['Ce', 'Al', 'S'], ['Ce', 'Al', 'Se'], ['Ce', 'P', 'S'], ['Ce', 'P', 'Se'], ['Ce', 'Sc', 'O'], ['Ce', 'Ti', 'O'], ['Ce', 'V', 'O'], ['Ce', 'V', 'S'], ['Ce', 'Cr', 'O'], ['Ce', 'Cr', 'S'], ['Ce', 'Cr', 'Se'], ['Ce', 'Mn', 'O'], ['Ce', 'Mn', 'S'], ['Ce', 'Mn', 'Se'], ['Ce', 'Fe', 'O'], ['Ce', 'Fe', 'S'], ['Ce', 'Fe', 'Se'], ['Ce', 'Co', 'O'], ['Ce', 'Co', 'S'], ['Ce', 'Co', 'Se'], ['Ce', 'Ni', 'O'], ['Ce', 'Ni', 'S'], ['Ce', 'Ni', 'Se'], ['Ce', 'Cu', 'S'], ['Ce', 'Cu', 'Se'], ['Ce', 'Ga', 'O'], ['Ce', 'Ga', 'S'], ['Ce', 'Ga', 'Se'], ['Ce', 'As', 'O'], ['Ce', 'As', 'S'], ['Ce', 'As', 'Se'], ['Ce', 'Nb', 'O'], ['Ce', 'Mo', 'O'], ['Ce', 'Ru', 'O'], ['Ce', 'Rh', 'O'], ['Ce', 'Pd', 'O'], ['Ce', 'Ag', 'O'], ['Ce', 'Sb', 'O'], ['Ce', 'Ta', 'O'], ['Ce', 'Ir', 'O'], ['Nd', 'Al', 'O'], ['Nd', 'Al', 'S'], ['Nd', 'Al', 'Se'], ['Nd', 'P', 'S'], ['Nd', 'P', 'Se'], ['Nd', 'Ti', 'O'], ['Nd', 'V', 'O'], ['Nd', 'Cr', 'O'], ['Nd', 'Mn', 'O'], ['Nd', 'Fe', 'O'], ['Nd', 'Fe', 'S'], ['Nd', 'Co', 'O'], ['Nd', 'Co', 'S'], ['Nd', 'Ni', 'O'], ['Nd', 'Ni', 'S'], ['Nd', 'Cu', 'O'], ['Nd', 'Cu', 'S'], ['Nd', 'Cu', 'Se'], ['Nd', 'Ga', 'O'], ['Nd', 'As', 'O'], ['Nd', 'As', 'S'], ['Nd', 'Mo', 'O'], ['Nd', 'Ru', 'O'], ['Nd', 'Rh', 'O'], ['Nd', 'Ir', 'O'], ['Sm', 'Al', 'O'], ['Sm', 'Al', 'S'], ['Sm', 'Al', 'Se'], ['Sm', 'P', 'S'], ['Sm', 'P', 'Se'], ['Sm', 'Ti', 'O'], ['Sm', 'V', 'O'], ['Sm', 'Cr', 'O'], ['Sm', 'Mn', 'O'], ['Sm', 'Fe', 'O'], ['Sm', 'Co', 'O'], ['Sm', 'Ni', 'O'], ['Sm', 'Cu', 'O'], ['Sm', 'Cu', 'S'], ['Sm', 'Cu', 'Se'], ['Sm', 'Ga', 'O'], ['Sm', 'As', 'O'], ['Sm', 'Ru', 'O'], ['Sm', 'Rh', 'O'], ['Sm', 'Ir', 'O'], ['Tl', 'Mg', 'Br'], ['Tl', 'Mg', 'I'], ['Tl', 'Ca', 'F'], ['Tl', 'Ti', 'F'], ['Tl', 'Ti', 'Br'], ['Tl', 'Ti', 'I'], ['Tl', 'V', 'Br'], ['Tl', 'V', 'I'], ['Tl', 'Cr', 'Br'], ['Tl', 'Cr', 'I'], ['Tl', 'Mn', 'Br'], ['Tl', 'Mn', 'I'], ['Tl', 'Fe', 'Br'], ['Tl', 'Fe', 'I'], ['Tl', 'Co', 'Br'], ['Tl', 'Co', 'I'], ['Tl', 'Ni', 'Br'], ['Tl', 'Ni', 'I'], ['Tl', 'Cu', 'Br'], ['Tl', 'Cu', 'I'], ['Tl', 'Zn', 'Br'], ['Tl', 'Zn', 'I'], ['Tl', 'Ge', 'Br'], ['Tl', 'Ge', 'I'], ['Tl', 'Nb', 'Se'], ['Tl', 'Pd', 'F'], ['Tl', 'Pd', 'Br'], ['Tl', 'Pd', 'I'], ['Tl', 'Ag', 'F'], ['Tl', 'Cd', 'F'], ['Tl', 'I', 'O'], ['Tl', 'Tm', 'F'], ['Tl', 'Yb', 'F'], ['Tl', 'Ta', 'Se'], ['Tl', 'Pt', 'Br'], ['Tl', 'Pt', 'I'], ['Tl', 'Hg', 'F'], ['Tl', 'Bi', 'S'], ['Tl', 'Bi', 'Se'], ['Pb', 'Ti', 'S'], ['Pb', 'Ti', 'Se'], ['Pb', 'V', 'S'], ['Pb', 'V', 'Se'], ['Pb', 'Cr', 'S'], ['Pb', 'Cr', 'Se'], ['Pb', 'Mn', 'S'], ['Pb', 'Mn', 'Se'], ['Pb', 'Fe', 'S'], ['Pb', 'Fe', 'Se'], ['Pb', 'Co', 'S'], ['Pb', 'Co', 'Se'], ['Pb', 'Ni', 'Se'], ['Pb', 'Ge', 'S'], ['Pb', 'Ge', 'Se'], ['Pb', 'Zr', 'O'], ['Pb', 'Zr', 'S'], ['Pb', 'Zr', 'Se'], ['Pb', 'Nb', 'O'], ['Pb', 'Nb', 'S'], ['Pb', 'Nb', 'Se'], ['Pb', 'Mo', 'S'], ['Pb', 'Mo', 'Se'], ['Pb', 'Tc', 'S'], ['Pb', 'Tc', 'Se'], ['Pb', 'Ru', 'S'], ['Pb', 'Ru', 'Se'], ['Pb', 'Rh', 'S'], ['Pb', 'Rh', 'Se'], ['Pb', 'Pd', 'S'], ['Pb', 'Pd', 'Se'], ['Pb', 'Sn', 'O'], ['Pb', 'Sn', 'S'], ['Pb', 'Sn', 'Se'], ['Pb', 'Ce', 'O'], ['Pb', 'Pr', 'O'], ['Pb', 'Tb', 'O'], ['Pb', 'Tb', 'S'], ['Pb', 'Hf', 'O'], ['Pb', 'Hf', 'S'], ['Pb', 'Hf', 'Se'], ['Pb', 'Ta', 'O'], ['Pb', 'Ta', 'S'], ['Pb', 'Ta', 'Se'], ['Pb', 'W', 'O'], ['Pb', 'W', 'S'], ['Pb', 'W', 'Se'], ['Pb', 'Re', 'S'], ['Pb', 'Re', 'Se'], ['Pb', 'Os', 'S'], ['Pb', 'Os', 'Se'], ['Pb', 'Ir', 'S'], ['Pb', 'Ir', 'Se'], ['Pb', 'Pt', 'S'], ['Pb', 'Pt', 'Se']]\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "code",
{'fraction_non_alphanumeric': 0.43824346859366314, 'fraction_numerical': 0.011534185658699278, 'mean_word_length': 3.4680243387557432, 'pattern_counts': {'":': 140, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4148314', 'n_tokens_mistral': 17139, 'n_tokens_neox': 15709, 'n_words': 4464}