<commit_before>{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import cantera as ct\n",
    "from cantera import ctml_writer "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false,
    "scrolled": false
   },
   "outputs": [
    {
     "ename": "CanteraError",
     "evalue": "\n***********************************************************************\nCanteraError thrown by checkReactionBalance:\nThe following reaction is unbalanced: PLIGH => PRLIGH\n  Element    Reactants    Products\n  C           22           0\n  H           28           0\n  O           9           0\n***********************************************************************\n",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mCanteraError\u001b[0m                              Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-2-a1466d6a9177>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mcti_one\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mct\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mSolution\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'cti_one.cti'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32minterfaces\\cython\\cantera\\base.pyx\u001b[0m in \u001b[0;36mcantera._cantera._SolutionBase.__cinit__ (interfaces\\cython\\cantera\\_cantera.cpp:7861)\u001b[0;34m()\u001b[0m\n",
      "\u001b[0;32minterfaces\\cython\\cantera\\base.pyx\u001b[0m in \u001b[0;36mcantera._cantera._SolutionBase._init_cti_xml (interfaces\\cython\\cantera\\_cantera.cpp:8544)\u001b[0;34m()\u001b[0m\n",
      "\u001b[0;31mCanteraError\u001b[0m: \n***********************************************************************\nCanteraError thrown by checkReactionBalance:\nThe following reaction is unbalanced: PLIGH => PRLIGH\n  Element    Reactants    Products\n  C           22           0\n  H           28           0\n  O           9           0\n***********************************************************************\n"
     ]
    }
   ],
   "source": [
    "cti_one = ct.Solution('cti_one.cti')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "ename": "IndexError",
     "evalue": "list index out of range",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mIndexError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-4-2eb544962fe3>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mctml_writer\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mconvert\u001b[0m\u001b[1;33m(\u001b[0m \u001b[1;34m'cti_one.cti'\u001b[0m \u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32mC:\\Users\\Jiayuan\\Miniconda3\\lib\\site-packages\\cantera\\ctml_writer.py\u001b[0m in \u001b[0;36mconvert\u001b[0;34m(filename, outName, text)\u001b[0m\n\u001b[1;32m   2666\u001b[0m         \u001b[0msys\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mexit\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m4\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   2667\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2668\u001b[0;31m     \u001b[0mwrite\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0moutName\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   2669\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   2670\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;32mC:\\Users\\Jiayuan\\Miniconda3\\lib\\site-packages\\cantera\\ctml_writer.py\u001b[0m in \u001b[0;36mwrite\u001b[0;34m(outName)\u001b[0m\n\u001b[1;32m    372\u001b[0m         \u001b[0mr\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'motz_wise'\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mstr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0m_motz_wise\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m    373\u001b[0m     \u001b[1;32mfor\u001b[0m \u001b[0mrx\u001b[0m \u001b[1;32min\u001b[0m \u001b[0m_reactions\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m--> 374\u001b[0;31m         \u001b[0mrx\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbuild\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    375\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m    376\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[0moutName\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m'STDOUT'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;32mC:\\Users\\Jiayuan\\Miniconda3\\lib\\site-packages\\cantera\\ctml_writer.py\u001b[0m in \u001b[0;36mbuild\u001b[0;34m(self, p)\u001b[0m\n\u001b[1;32m   1306\u001b[0m                 \u001b[0mk\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mkf\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1307\u001b[0m             \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1308\u001b[0;31m                 \u001b[0mk\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mArrhenius\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mA\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mkf\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mb\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mkf\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mE\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mkf\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1309\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkf\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstick\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m   1310\u001b[0m                 \u001b[0mkf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgas_species\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_igspecies\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mIndexError\u001b[0m: list index out of range"
     ]
    }
   ],
   "source": [
    "ctml_writer.convert( 'cti_one.cti' )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "rxn_filter = 'cti_one.cti'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "all_species = ct.Species.listFromFile(rxn_filter)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "all_reactions = ct.Reaction.listFromFile(rxn_filter)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "all_reactions[0].reactants"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
<commit_msg>showing yu the error push<commit_after>{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import cantera as ct\n",
    "from cantera import ctml_writer "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[10000000000000.0, 0, 163254]\n",
      "[10000000000000.0, 0, 163254]\n",
      "[10000000000000.0, 0, 163254]\n",
      "[10000000000000.0, 0, 163254]\n",
      "[10000000000000.0, 0, 184184]\n",
      "[10000000000000.0, 0, 188370]\n",
      "[10000000000000.0, 0, 171626]\n",
      "[10000000000000.0, 0, 179998]\n",
      "[10000000000000.0, 0, 167440]\n",
      "[10000000000000.0, 0, 121394]\n",
      "[40000000000.0, 0, 209300]\n",
      "[40000000000.0, 0, 209300]\n",
      "[10000000000000.0, 0, 133952]\n",
      "[10000000000000.0, 0, 133952]\n",
      "[10000000000000.0, 0, 133952]\n",
      "[5000000000000.0, 0, 133952]\n",
      "[5000000000000.0, 0, 133952]\n",
      "[10000000000000.0, 0, 163254]\n",
      "[10000000000000.0, 0, 133952]\n",
      "[10000000000000.0, 0, 163254]\n",
      "[10000000000000.0, 0, 138138]\n",
      "[10000000000000.0, 0, 163254]\n",
      "[10000000000000.0, 0, 138138]\n",
      "[300000000000.0, 0, 104650]\n",
      "[300000000000.0, 0, 104650]\n",
      "[300000000000.0, 0, 104650]\n",
      "[300000000000.0, 0, 113022]\n",
      "[10000000000000.0, 0, 129766]\n",
      "[10000000000000.0, 0, 196742]\n",
      "[10000000000000.0, 0, 196742]\n",
      "[100000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 108836]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 121394]\n",
      "[1000000000.0, 0, 115115]\n",
      "[1000000000.0, 0, 115115]\n",
      "[1000000000.0, 0, 117208]\n",
      "[1000000000.0, 0, 117208]\n",
      "[100000000.0, 0, 54418]\n",
      "[100000000.0, 0, 54418]\n",
      "[100000000.0, 0, 48139]\n",
      "[100000000.0, 0, 48139]\n",
      "[100000000.0, 0, 12558]\n",
      "[100000000.0, 0, 12558]\n",
      "[100000000.0, 0, 52325]\n",
      "[100000000.0, 0, 52325]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[100000000.0, 0, 12558]\n",
      "[100000000.0, 0, 12558]\n",
      "[100000000.0, 0, 12558]\n",
      "[100000000.0, 0, 12558]\n",
      "[100000000.0, 0, 12558]\n",
      "[100000000.0, 0, 48139]\n",
      "[100000000.0, 0, 48139]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 92092]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[31600000.0, 0, 83720]\n",
      "[50000000.0, 0, 83720]\n",
      "[100000000.0, 0, 48139]\n",
      "[30000000.0, 0, 104650]\n",
      "[30000000.0, 0, 104650]\n",
      "[1, 1, 62790]\n",
      "[1, 1, 62790]\n",
      "[1, 1, 58604]\n",
      "[1, 1, 62790]\n",
      "[1, 1, 66976]\n",
      "[1, 1, 83720]\n",
      "[1, 1, 66976]\n",
      "[1, 1, 66976]\n",
      "[1, 1, 83720]\n",
      "[1, 1, 58604]\n",
      "[200000000.0, 0, 209300]\n",
      "[10000000.0, 0, 138138]\n",
      "[10000000000.0, 0, 209300]\n",
      "[500000000.0, 0, 205114]\n",
      "[500000000.0, 0, 0]\n",
      "[500000000.0, 0, 0]\n",
      "[500000000.0, 0, 0]\n",
      "[10000000000000.0, 0, 125580]\n",
      "[500000000.0, 0, 209300]\n",
      "[500000000.0, 0, 209300]\n",
      "[10000000000000.0, 0, 154812]\n",
      "[10000000000000.0, 0, 168458]\n",
      "[10000000000000.0, 0, 154812]\n",
      "[1000000000.0, 0, 108836]\n",
      "[100000000.0, 0, 121394]\n",
      "[31600000.0, 0, 92092]\n",
      "[31600000.0, 0, 83720]\n",
      "[10000000.0, 0, 138138]\n",
      "[200000000, 0, 66976]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 58604]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 43953]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 41860]\n",
      "[200000000, 0, 79534]\n",
      "[200000000, 0, 52325]\n",
      "[200000000, 0, 52325]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[6324555320.336759, 0, 10465]\n",
      "[632455532.0336759, 0, 28883]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 66976]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 58604]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 43953]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 41860]\n",
      "[200000000, 0, 79534]\n",
      "[200000000, 0, 52325]\n",
      "[200000000, 0, 52325]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[6324555320.336759, 0, 10465]\n",
      "[632455532.0336759, 0, 28883]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 66976]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 58604]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 43953]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 41860]\n",
      "[200000000, 0, 79534]\n",
      "[200000000, 0, 52325]\n",
      "[200000000, 0, 52325]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[6324555320.336759, 0, 10465]\n",
      "[632455532.0336759, 0, 28883]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[100000000, 0, 66976]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 58604]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 43953]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 41860]\n",
      "[100000000, 0, 79534]\n",
      "[100000000, 0, 52325]\n",
      "[100000000, 0, 52325]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[3162277660.1683793, 0, 10465]\n",
      "[316227766.01683795, 0, 28883]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 66976]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 58604]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 43953]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 41860]\n",
      "[100000000, 0, 79534]\n",
      "[100000000, 0, 52325]\n",
      "[100000000, 0, 52325]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[3162277660.1683793, 0, 10465]\n",
      "[316227766.01683795, 0, 28883]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[200000000, 0, 66976]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 58604]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 43953]\n",
      "[200000000, 0, 50232]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 41860]\n",
      "[200000000, 0, 79534]\n",
      "[200000000, 0, 52325]\n",
      "[200000000, 0, 52325]\n",
      "[632455532.0336759, 0, 37674]\n",
      "[200000000, 0, 50232]\n",
      "[6324555320.336759, 0, 10465]\n",
      "[632455532.0336759, 0, 28883]\n",
      "[632455532.0336759, 0, 50232]\n",
      "[200000000, 0, 50232]\n",
      "[100000000, 0, 66976]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 58604]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 43953]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 41860]\n",
      "[100000000, 0, 79534]\n",
      "[100000000, 0, 52325]\n",
      "[100000000, 0, 52325]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[3162277660.1683793, 0, 10465]\n",
      "[316227766.01683795, 0, 28883]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 66976]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 58604]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 43953]\n",
      "[100000000, 0, 50232]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 41860]\n",
      "[100000000, 0, 79534]\n",
      "[100000000, 0, 52325]\n",
      "[100000000, 0, 52325]\n",
      "[316227766.01683795, 0, 37674]\n",
      "[100000000, 0, 50232]\n",
      "[3162277660.1683793, 0, 10465]\n",
      "[316227766.01683795, 0, 28883]\n",
      "[316227766.01683795, 0, 50232]\n",
      "[100000000, 0, 50232]\n",
      "[100000000, 0, 92092]\n",
      "[100000000, 0, 75348]\n",
      "[100000000, 0, 83720]\n",
      "[100000000, 0, 75348]\n",
      "[100000000, 0, 75348]\n",
      "[316227766.01683795, 0, 62790]\n",
      "[100000000, 0, 75348]\n",
      "[100000000, 0, 75348]\n",
      "[316227766.01683795, 0, 69069]\n",
      "[100000000, 0, 75348]\n",
      "[316227766.01683795, 0, 75348]\n",
      "[100000000, 0, 66976]\n",
      "[100000000, 0, 104650]\n",
      "[100000000, 0, 77441]\n",
      "[100000000, 0, 77441]\n",
      "[316227766.01683795, 0, 62790]\n",
      "[100000000, 0, 75348]\n",
      "[3162277660.1683793, 0, 35581]\n",
      "[316227766.01683795, 0, 53999]\n",
      "[316227766.01683795, 0, 75348]\n"
     ]
    },
    {
     "ename": "AttributeError",
     "evalue": "'reaction' object has no attribute 'rev'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-2-3ed0f56f6576>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mctml_writer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconvert\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0;34m'cti_total.cti'\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m/Users/IvanC/miniconda3/lib/python3.5/site-packages/cantera/ctml_writer.py\u001b[0m in \u001b[0;36mconvert\u001b[0;34m(filename, outName, text)\u001b[0m\n\u001b[1;32m   2668\u001b[0m         \u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2669\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2670\u001b[0;31m     \u001b[0mwrite\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0moutName\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   2671\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2672\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/Users/IvanC/miniconda3/lib/python3.5/site-packages/cantera/ctml_writer.py\u001b[0m in \u001b[0;36mwrite\u001b[0;34m(outName)\u001b[0m\n\u001b[1;32m    372\u001b[0m         \u001b[0mr\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'motz_wise'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_motz_wise\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    373\u001b[0m     \u001b[0;32mfor\u001b[0m \u001b[0mrx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0m_reactions\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 374\u001b[0;31m         \u001b[0mrx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbuild\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    375\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    376\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0moutName\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'STDOUT'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/Users/IvanC/miniconda3/lib/python3.5/site-packages/cantera/ctml_writer.py\u001b[0m in \u001b[0;36mbuild\u001b[0;34m(self, p)\u001b[0m\n\u001b[1;32m   1231\u001b[0m         \u001b[0mr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maddChild\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'reaction'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1232\u001b[0m         \u001b[0mr\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'id'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mid\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1233\u001b[0;31m         \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrev\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1234\u001b[0m             \u001b[0mr\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'reversible'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'yes'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1235\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mAttributeError\u001b[0m: 'reaction' object has no attribute 'rev'"
     ]
    }
   ],
   "source": [
    "ctml_writer.convert( 'cti_total.cti' )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "rxn_filter = 'cti_one.cti'\n",
    "rxn_filter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "all_species = ct.Species.listFromFile(rxn_filter)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "all_reactions = ct.Reaction.listFromFile(rxn_filter)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "all_reactions[0].reactants"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "ename": "CanteraError",
     "evalue": "\n***********************************************************************\nCanteraError thrown by checkReactionBalance:\nThe following reaction is unbalanced: PLIGH => PRLIGH\n  Element    Reactants    Products\n  C           22           0\n  H           28           0\n  O           9           0\n***********************************************************************\n",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mCanteraError\u001b[0m                              Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-3-92753bc155b3>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mct\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSolution\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'cti_one.cti'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32minterfaces/cython/cantera/base.pyx\u001b[0m in \u001b[0;36mcantera._cantera._SolutionBase.__cinit__ (interfaces/cython/cantera/_cantera.cpp:7873)\u001b[0;34m()\u001b[0m\n",
      "\u001b[0;32minterfaces/cython/cantera/base.pyx\u001b[0m in \u001b[0;36mcantera._cantera._SolutionBase._init_cti_xml (interfaces/cython/cantera/_cantera.cpp:8556)\u001b[0;34m()\u001b[0m\n",
      "\u001b[0;31mCanteraError\u001b[0m: \n***********************************************************************\nCanteraError thrown by checkReactionBalance:\nThe following reaction is unbalanced: PLIGH => PRLIGH\n  Element    Reactants    Products\n  C           22           0\n  H           28           0\n  O           9           0\n***********************************************************************\n"
     ]
    }
   ],
   "source": [
    "a = ct.Solution('cti_one.cti')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

{'fraction_non_alphanumeric': 0.24231228541573369, 'fraction_numerical': 0.3159053590088073, 'mean_word_length': 2.9343708706504184, 'pattern_counts': {'":': 154, '<': 11, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 212, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3364799', 'n_tokens_mistral': 18114, 'n_tokens_neox': 12693, 'n_words': 1505}