Generate data for missing species

Executing this notebook requires an active internet connection, as it queries the NCI/CADD Chemical Identifier Resolver web service, to help in suggesting and selecting names for the species

In [1]:
import cirpy # pip install this if you don't have it.

import sys
import os
import re
import numpy
import csv
import cPickle as pickle
import pandas as pd
import itertools
import logging
from collections import Counter, defaultdict, OrderedDict
import IPython
from IPython.display import display, Markdown, HTML
def mprint(s):
    "A convenience to format things in Jupyter notebooks via MarkDown syntax"
    display(Markdown(s))

# Add $RMGpy to front of your $PYTHONPATH in case you didn't already
sys.path.insert(1,os.getenv('RMGpy',os.path.expanduser('~/Code/RMG-Py')))
from cantera import ck2cti 
import rmgpy
import rmgpy.molecule, rmgpy.species, rmgpy.data, rmgpy.data.rmg, rmgpy.thermo.thermoengine
In [2]:
model_name = 'butanol'
In [3]:
csv_filename = 'new-species-{}.csv'.format(model_name)
if not os.path.exists(csv_filename):
    with open(csv_filename,'w') as f:
        f.write('SMILES, Name\n')
smiles_names = pd.read_csv(csv_filename, index_col=0)
In [4]:
smiles_names
Out[4]:
Name
SMILES
CCC(=O)CO hydroxybutan2one
C=C=C=C butatriene
O=COC=O formicanhydride
CC(=O)C(C)O Acethoin
CC(C)C(=O)O isobutyricacid
C#CCC but1yne
CCC(O)C=O hydroxybutanal
O=CCCCO hydroxybutan4al
CCCC(=O)O butanoicacid
CC(C=O)CO C(OH)C(C)CHO
CC(=O)CCO hydroxybutan3one
CC(O)CC=O Acetaldol
In [5]:
species_list = []
for smiles in smiles_names.index:
    m = rmgpy.molecule.Molecule(SMILES=smiles)
    species = rmgpy.species.Species(molecule=[m])
    species.generateResonanceIsomers()
    species.props['smiles'] = smiles.strip()
    species_list.append(species)
species_list
Out[5]:
[Species(label="", molecule=[Molecule(SMILES="CCC(=O)CO")]),
 Species(label="", molecule=[Molecule(SMILES="C=C=C=C")]),
 Species(label="", molecule=[Molecule(SMILES="O=COC=O")]),
 Species(label="", molecule=[Molecule(SMILES="CC(=O)C(C)O")]),
 Species(label="", molecule=[Molecule(SMILES="CC(C)C(=O)O")]),
 Species(label="", molecule=[Molecule(SMILES="C#CCC")]),
 Species(label="", molecule=[Molecule(SMILES="CCC(O)C=O")]),
 Species(label="", molecule=[Molecule(SMILES="O=CCCCO")]),
 Species(label="", molecule=[Molecule(SMILES="CCCC(=O)O")]),
 Species(label="", molecule=[Molecule(SMILES="CC(C=O)CO")]),
 Species(label="", molecule=[Molecule(SMILES="CC(=O)CCO")]),
 Species(label="", molecule=[Molecule(SMILES="CC(O)CC=O")])]
In [6]:
rmgDatabase = rmgpy.data.rmg.RMGDatabase()
databasePath = os.path.abspath(os.path.join(os.getenv('RMGpy', '..'), '..', 'RMG-database', 'input'))
print("Loading database from "+databasePath)
rmgDatabase.load(databasePath,
                 kineticsFamilies='default',
                 transportLibraries=['PrimaryTransportLibrary', 'GRI-Mech'],
                 reactionLibraries=[],
                 seedMechanisms=[],
                 thermoLibraries=['primaryThermoLibrary',
                                  'BurkeH2O2',
                                  'thermo_DFT_CCSDTF12_BAC',
                                  'CBS_QB3_1dHR',
                                  'CHO',
                                  'USC-Mech-ii',],
                 solvation=False,
                 )
Loading database from /Users/rwest/Code/RMG-database/input
In [7]:
for s in species_list:
    display(s)
    s.generateTransportData()
    print s.transportData
TransportData(shapeIndex=2, epsilon=(3912.27,'J/mol'), sigma=(6.37655,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=611.09 K, Pc=34.24 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(2968.28,'J/mol'), sigma=(5.18,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=1.0, comment="""GRI-Mech""")
TransportData(shapeIndex=2, epsilon=(3515.87,'J/mol'), sigma=(5.46152,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=549.17 K, Pc=48.97 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(3934.2,'J/mol'), sigma=(6.40836,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=614.51 K, Pc=33.92 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(4058.35,'J/mol'), sigma=(6.30806,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=633.90 K, Pc=36.69 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(2968.28,'J/mol'), sigma=(5.18,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=1.0, comment="""GRI-Mech""")
TransportData(shapeIndex=2, epsilon=(3870.7,'J/mol'), sigma=(6.40089,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=604.59 K, Pc=33.49 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(3849.65,'J/mol'), sigma=(6.36953,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=601.31 K, Pc=33.8 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(4032.06,'J/mol'), sigma=(6.27406,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=629.80 K, Pc=37.04 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(3870.7,'J/mol'), sigma=(6.40089,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=604.59 K, Pc=33.49 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(3912.27,'J/mol'), sigma=(6.37655,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=611.09 K, Pc=34.24 bar (from Joback method)""")
TransportData(shapeIndex=2, epsilon=(3870.7,'J/mol'), sigma=(6.40089,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=604.59 K, Pc=33.49 bar (from Joback method)""")
In [8]:
# Generate Thermo data
for s in species_list:
    display(s)
    rmgpy.thermo.thermoengine.submit(s)
    print s.thermo
NASA(polynomials=[NASAPolynomial(coeffs=[1.63004,0.0553284,-4.69871e-05,2.34959e-08,-5.17359e-12,-48440.9,21.4649], Tmin=(100,'K'), Tmax=(1039.44,'K')), NASAPolynomial(coeffs=[7.44061,0.0329683,-1.472e-05,2.801e-09,-1.96238e-13,-49648.9,-6.79261], Tmin=(1039.44,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-403.448,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-(Cds-Od)CsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-(Cds-Od)OsHH) + gauche(Cs(RRRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(CsRRR)) + other(R) + group(Cds-OdCsCs) + other(R) + group(Os-CsH) + gauche(Os(CsR)) + other(R) + group(Od-Cd) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[2.72712,0.0232968,-5.35348e-06,-8.19875e-09,4.38155e-12,38934.7,10.2624], Tmin=(100,'K'), Tmax=(1034.86,'K')), NASAPolynomial(coeffs=[7.88454,0.0132763,-5.19962e-06,9.5978e-10,-6.74119e-14,37336.4,-17.3609], Tmin=(1034.86,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(323.307,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(182.918,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cds-CdsHH) + gauche(CsOsCdSs) + other(R) + group(Cds-CdsHH) + gauche(CsOsCdSs) + other(R) + group(Cdd-CdsCds) + other(R) + group(Cdd-CdsCds) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[2.83835,0.0223426,-1.38972e-05,3.49308e-09,-2.44519e-13,-58250,16.6203], Tmin=(100,'K'), Tmax=(1522.34,'K')), NASAPolynomial(coeffs=[9.19078,0.00916701,-4.37895e-06,8.41812e-10,-5.82474e-14,-60591.5,-18.0341], Tmin=(1522.34,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-484.688,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(149.66,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cds-OdOsH) + other(R) + group(Cds-OdOsH) + other(R) + group(Os-(Cds-Od)(Cds-Od)) + gauche(Os(RR)) + other(R) + group(Od-Cd) + other(R) + group(Od-Cd) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.57208,0.0436803,-7.37673e-06,-1.95856e-08,9.94116e-12,-51389.7,23.8196], Tmin=(100,'K'), Tmax=(1027,'K')), NASAPolynomial(coeffs=[12.0397,0.0240071,-9.4556e-06,1.76571e-09,-1.25353e-13,-54652.3,-32.376], Tmin=(1027,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-428.076,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-(Cds-Od)CsOsH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-(Cds-Od)HHH) + gauche(Cs(RRRR)) + other(R) + group(Cds-OdCsCs) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.98765,0.0289013,3.91562e-05,-6.974e-08,2.79849e-11,-59585.4,22.4612], Tmin=(100,'K'), Tmax=(982.535,'K')), NASAPolynomial(coeffs=[12.8899,0.0222704,-8.35714e-06,1.606e-09,-1.19263e-13,-63550.1,-39.2173], Tmin=(982.535,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-496.137,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo library: CHO""")
NASA(polynomials=[NASAPolynomial(coeffs=[2.67641,0.0231721,9.11136e-06,-2.7386e-08,1.24367e-11,18043.6,12.6718], Tmin=(100,'K'), Tmax=(922.967,'K')), NASAPolynomial(coeffs=[7.67374,0.0167518,-5.21796e-06,8.51188e-10,-5.67436e-14,16472.1,-14.5527], Tmin=(922.967,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(149.582,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(224.491,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-CtCsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(CsRRR)) + other(R) + group(Ct-CtCs) + other(R) + group(Ct-CtH) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.57516,0.0432639,-5.11612e-06,-2.21947e-08,1.08813e-11,-47650.2,24.4612], Tmin=(100,'K'), Tmax=(1023.92,'K')), NASAPolynomial(coeffs=[12.135,0.0241417,-9.52282e-06,1.78281e-09,-1.26884e-13,-50972.8,-32.3983], Tmin=(1023.92,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-396.985,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-CsCsHH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-(Cds-Od)CsOsH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.64707,0.0558132,-5.46791e-05,3.64618e-08,-1.11286e-11,-46456,22.7976], Tmin=(100,'K'), Tmax=(763.256,'K')), NASAPolynomial(coeffs=[5.34874,0.0364139,-1.65545e-05,3.16196e-09,-2.21496e-13,-47021.1,5.93921], Tmin=(763.256,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-386.931,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-CsCsHH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-(Cds-Od)CsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cs-CsOsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.43982,0.0478991,-2.07805e-05,-4.76292e-09,4.46252e-12,-59325.1,20.9332], Tmin=(100,'K'), Tmax=(1083.82,'K')), NASAPolynomial(coeffs=[12.0324,0.0244258,-9.91159e-06,1.84891e-09,-1.29835e-13,-62538.7,-35.2547], Tmin=(1083.82,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-494.083,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo library: CHO""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.70748,0.0532362,-4.30752e-05,2.07639e-08,-4.45646e-12,-47149.7,21.7439], Tmin=(100,'K'), Tmax=(1056.83,'K')), NASAPolynomial(coeffs=[7.02944,0.0330929,-1.44848e-05,2.72837e-09,-1.90003e-13,-48274.6,-4.22555], Tmin=(1056.83,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-392.691,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-(Cds-Od)CsCsH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-CsOsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.96753,0.0511362,-3.07965e-05,-1.36906e-08,2.42159e-11,-50209.4,21.0636], Tmin=(100,'K'), Tmax=(528.448,'K')), NASAPolynomial(coeffs=[5.19685,0.0364097,-1.65781e-05,3.16917e-09,-2.22169e-13,-50686.4,6.25996], Tmin=(528.448,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-418.021,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-(Cds-Od)CsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-CsOsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-(Cds-Od)HHH) + gauche(Cs(RRRR)) + other(R) + group(Cds-OdCsCs) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) + other(R)""")
NASA(polynomials=[NASAPolynomial(coeffs=[1.74066,0.0526193,-4.0646e-05,1.81714e-08,-3.61288e-12,-47978.8,21.4151], Tmin=(100,'K'), Tmax=(1126.11,'K')), NASAPolynomial(coeffs=[7.2401,0.033085,-1.46258e-05,2.7672e-09,-1.93081e-13,-49217.4,-5.76964], Tmin=(1126.11,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(-399.574,'kJ/mol'), Cp0=(33.2579,'J/(mol*K)'), CpInf=(315.95,'J/(mol*K)'), comment="""Thermo group additivity estimation: group(Cs-CsCsOsH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-(Cds-Od)CsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsCsR)R)) + other(R) + group(Od-Cd) + other(R)""")
In [10]:
for s in species_list:
    display(s)
    smiles = s.props['smiles']
    names = cirpy.resolve(smiles, 'names')
    iupac = cirpy.resolve(smiles, 'iupac_name')
    
    s.props['names'] = names
    s.props['iupac'] = iupac
    round_trip_smiles = cirpy.resolve(iupac, 'smiles')
    m = rmgpy.molecule.Molecule(SMILES=round_trip_smiles)
    assert s.isIsomorphic(m)
    print iupac
    print names
    
1-Hydroxybutan-2-one
['1-Hydroxybutan-2-one', '5077-67-8', '1-Hydroxy-2-butanone', '1-Hydroxybutan-2-one', '2-Butanone, 1-hydroxy-', '2-Oxobutanol', 'EINECS 225-790-6', 'Ethyl hydroxymethyl ketone', 'FEMA No. 3173']
buta-1,2,3-triene
['buta-1,2,3-triene', '2873-50-9', 'CHEBI:37609', 'buta-1,2,3-triene', 'butatriene', '1,2,3-Butatriene', 'CH2=C=C=CH2']
formyl formate
['formyl formate', 'formic acid formyl ester', 'methanoyl methanoate', '1558-67-4', 'CHEBI:36657', 'formic acid anhydride', 'formic anhydride']
3-hydroxybutan-2-one
['3-hydroxybutan-2-one', '513-86-0', '52217-02-4', '53584-56-8', '(S)-2-Acetoin', '(S)-Acetoin', 'C01769', 'W200808_ALDRICH', '2-01-00-00870 (Beilstein Handbook Reference)', 'AI3-03314', 'Acethoin', 'Acetoin (natural)', 'Acetyl methyl carbinol [UN2621]  [Flammable liquid]', 'BRN 0385636', 'Butan-2-ol-3-one', 'CCRIS 2918', 'EINECS 208-174-1', 'FEMA No. 2008', 'HSDB 974', 'NSC 7609', 'UN2621', 'gamma-Hydroxy-beta-oxobutane', '00540_FLUKA', '(+/-)-3-Hydroxybutan-2-one', '(+/-)-Acetoin', '1-Hydroxethyl methyl ketone', '2-Butanone, 3-hydroxy', '2-Butanone, 3-hydroxy- (8CI,9CI)', '3-Oxo-2-butanol', 'DL-Acetoin', '.gamma.-Hydroxy-.beta.-oxobutane', '1-Hydroxyethyl methyl ketone', '2,3-Butanolone', '2-Butanone, 3-hydroxy-', '2-Hydroxy-3-butanone', 'Acetyl methyl carbinol', 'Methanol, acetylmethyl-', 'NSC7609', '2-Acetoin', 'C00466', 'Dimethylketol', '(R)-2-acetoin', '(R)-3-hydroxy-2-butanone', '(R)-3-hydroxybutan-2-one', '(R)-acetoin', '(R)-dimethylketol', '3-hydroxy-2-butanone', '3-hydroxybutan-2-one', 'ACETOIN', 'acetylmethylcarbinol', 'A17951_ALDRICH', '2-Butanone, 3-hydroxy-, (.+/-.)-', 'Methanol, acetylmethyl', 'W200832_ALDRICH', 'acetylmethyl-', '2-Butanone, 3-hydroxy-, (R)-', 'CHEBI:15688']
2-Methylpropanoic acid
['2-Methylpropanoic acid', 'Isobutyric acid', '79-31-2', '2-methyl-propanoic acid', 'LMFA01020071', '58360_FLUKA', 'InChI=1/C4H8O2/c1-3(2)4(5)6/h3H,1-2H3,(H,5,6', 'I1754_SIGMA', 'ISB', '4-02-00-00843 (Beilstein Handbook Reference)', 'AI3-24260', 'BRN 0635770', 'Caswell No. 503AA', 'EINECS 201-195-7', 'EPA Pesticide Chemical Code 101502', 'FEMA No. 2222', 'HSDB 5228', 'Iso-butyric acid', 'Isobutyric acid (natural)', 'Isobutyric acid [UN2529]  [Flammable liquid]', 'Kyselina isomaselna [Czech]', 'Methylpropanoic acid, 2-', 'NSC 62780', 'Tenox IBP-2', 'Tenox IBP-2 Grain Pr.', 'UN2529', 'alpha-Methylpropanoic acid', 'alpha-Methylpropionic acid', 'W222208_ALDRICH', 'W222216_ALDRICH', '2-Methylpropanoic acid', 'C02632', 'Dimethylacetic acid', 'Isobutanoate', 'Isobutyrate', 'Isobutyric acid', '2-METHYL-PROPIONIC ACID', '.alpha.-Methylpropanoic acid', '.alpha.-Methylpropionic acid', '2-Methylpropionic acid', 'Acetic acid, dimethyl-', 'Cenex RP b2', 'Isobutanoic acid', 'Isopropylformic acid', 'NSC62780', 'Propanoic acid, 2-methyl-', 'Propionic acid, 2-methyl-', 'Tenox EBP 2', 'WLN: QVY1&1', 'CHEBI:16135', 'Isobuttersaeure', 'iso-C3H7COOH', '240168_ALDRICH', 'ALQ', '46935U_SUPELCO']
but-1-yne
['but-1-yne', '107-00-6', 'InChI=1/C4H6/c1-3-4-2/h1H,4H2,2H', 'but-1-yne', '1-BUTYNE', 'EINECS 203-451-3', 'Ethyl acetylene', 'Ethylacetylene, inhibited [UN2452]  [Flammable gas]', 'UN2452', '633755_ALDRICH', 'Ethylacetylene', 'Butyne-1']
2-hydroxybutanal
['2-hydroxybutanal', '2-hydroxybutyraldehyde']
4-hydroxybutanal
['4-hydroxybutanal', '4-Hydroxybutyraldehyde', '25714-71-0', '4-Hydroxybutyraldehyde', 'Butanal, 4-hydroxy-', 'EINECS 247-205-3', 'c0021']
butanoic acid
['butanoic acid', 'butyric acid', '107-92-6', 'butanoic acid', 'butyric acid', 'ethylacetic acid', 'propylformic acid', 'Bio1_000444', 'NCIMech_000707', 'Bio1_001422', 'LS-443', 'CH3-[CH2]2-COOH', 'CHEBI:30772', 'butoic acid', 'BUA', 'C00246', 'LMFA01010004', 'nchembio.2007.56-comp6', '19215_FLUKA', 'NCI60_001424', 'AIDS-096140', 'AIDS096140', 'W222100_ALDRICH', 'W222119_ALDRICH', 'Butyrate, sodium salt', 'Bio1_000933', 'B103500_ALDRICH', '1-Butyric acid', 'Butanic acid', 'Buttersaeure', 'NSC8415', 'WLN: QV3', 'n-Butanoic acid', 'n-Butyric acid', 'InChI=1/C4H8O2/c1-2-3-4(5)6/h2-3H2,1H3,(H,5,6', '4-02-00-00779 (Beilstein Handbook Reference)', 'AI3-15306', 'BRN 0906770', 'Buttersaeure [German]', 'Butyric acid (natural)', 'Butyric acid [UN2820]  [Corrosive]', 'CCRIS 6552', 'EINECS 203-532-3', 'FEMA No. 2221', 'FEMA Number 2221', 'HSDB 940', 'Kyselina maselna [Czech]', 'NSC 8415', 'UN2820', 'Butyric acid [UN2820] [Corrosive]', '1-propanecarboxylic acid', '2-butanoate', 'BUTYRIC_ACID', 'butanoate']
3-hydroxy-2-methylpropanal
['3-hydroxy-2-methylpropanal', '3-hydroxy-2-methyl-propanal', '3-hydroxy-2-methyl-propionaldehyde']
4-Hydroxybutan-2-one
['4-Hydroxybutan-2-one', '68648-26-0', '590-90-9', 'ZINC01672523', '4-Hydroxybutan-2-one', 'AI3-11747', 'EINECS 209-693-6', 'NSC 41219', 'CH3C(O)CH2CH2OH', 'Ketones, C4-6, beta-hydroxy', 'InChI=1/C4H8O2/c1-4(6)2-3-5/h5H,2-3H2,1H', '2-Butanone, 4-hydroxy-', '3-Ketobutan-1-ol', '3-Oxo-1-butanol', '3-Oxobutanol', '4-Butanol-2-one', '4-Hydroxy-2-butanone', 'Methylolacetone', 'Monomethylolacetone', 'NSC41219', 'ghl.PD_Mitscher_leg0.412', 'BUQ', '2-Hydroxyethyl methyl ketone', '252557_ALDRICH']
3-Hydroxybutanal
['3-Hydroxybutanal', '3-Hydroxybutyraldehyde', '115827-11-7', '107-89-1', 'BRN 1735845', 'Aldol [UN2839]  [Poison]', 'HSDB 2663', '4-01-00-03984 (Beilstein Handbook Reference)', 'NSC 7610', 'beta-Hydroxybutyraldehyde', 'AI3-18874', '.beta.-Hydroxybutyraldehyde', '3-Butanolal', '3-Hydroxybutanal', '3-Hydroxybutyraldehyde', 'Acetaldol', 'Aldol', 'Butanal, 3-hydroxy-', 'Butyraldehyde, 3-hydroxy-', 'NSC7610', 'Oxybutanal', 'Oxybutyric aldehyde', 'WLN: VH1YQ1', 'UN2839', 'EINECS 203-530-2']
In [11]:
# If you have a gigantic spreadsheet of imported model data, 
# search it to see if these species have been seen before:
spreadsheet_path = os.path.expanduser('~/Code/RMG-models/modelComparer/output.xls')
if not os.path.exists(spreadsheet_path):
    print "You don't have the spreadsheet, so not checking."
else:
    df = pd.read_excel(spreadsheet_path, sheetname='names', skiprows=4)
    print "Looking for {} names of {} species in {} models".format(df[df.columns[3:]].count().sum(), *df.shape)
    for s in species_list:
        display(s)
        smiles = s.molecule[0].toSMILES()
        formula = s.molecule[0].getFormula()
        print smiles, formula

        for testsmiles in df[df.Formula==formula].Species:
            m = rmgpy.molecule.Molecule(SMILES=str(testsmiles))
            if s.isIsomorphic(m):
                print test_smiles
                d = df[df.Species==test_smiles]
                print set(d.values[0,2:])
                break
        else:
            print "didn't find in table"
Looking for 8251 names of 418 species in 76 models
CCC(=O)CO C4H8O2
didn't find in table
C=C=C=C C4H4
didn't find in table
O=COC=O C2H2O3
didn't find in table
CC(=O)C(C)O C4H8O2
didn't find in table
CC(C)C(=O)O C4H8O2
didn't find in table
C#CCC C4H6
didn't find in table
CCC(O)C=O C4H8O2
didn't find in table
O=CCCCO C4H8O2
didn't find in table
CCCC(=O)O C4H8O2
didn't find in table
CC(C=O)CO C4H8O2
didn't find in table
CC(=O)CCO C4H8O2
didn't find in table
CC(O)CC=O C4H8O2
didn't find in table
In [12]:
# Report possible suggested names, for you to choose from
possibles = {}
for s in species_list:
    possibles[s.props['smiles']] = s.props['names']
possibles
Out[12]:
{'C#CCC': ['but-1-yne',
  '107-00-6',
  'InChI=1/C4H6/c1-3-4-2/h1H,4H2,2H',
  'but-1-yne',
  '1-BUTYNE',
  'EINECS 203-451-3',
  'Ethyl acetylene',
  'Ethylacetylene, inhibited [UN2452]  [Flammable gas]',
  'UN2452',
  '633755_ALDRICH',
  'Ethylacetylene',
  'Butyne-1'],
 'C=C=C=C': ['buta-1,2,3-triene',
  '2873-50-9',
  'CHEBI:37609',
  'buta-1,2,3-triene',
  'butatriene',
  '1,2,3-Butatriene',
  'CH2=C=C=CH2'],
 'CC(=O)C(C)O': ['3-hydroxybutan-2-one',
  '513-86-0',
  '52217-02-4',
  '53584-56-8',
  '(S)-2-Acetoin',
  '(S)-Acetoin',
  'C01769',
  'W200808_ALDRICH',
  '2-01-00-00870 (Beilstein Handbook Reference)',
  'AI3-03314',
  'Acethoin',
  'Acetoin (natural)',
  'Acetyl methyl carbinol [UN2621]  [Flammable liquid]',
  'BRN 0385636',
  'Butan-2-ol-3-one',
  'CCRIS 2918',
  'EINECS 208-174-1',
  'FEMA No. 2008',
  'HSDB 974',
  'NSC 7609',
  'UN2621',
  'gamma-Hydroxy-beta-oxobutane',
  '00540_FLUKA',
  '(+/-)-3-Hydroxybutan-2-one',
  '(+/-)-Acetoin',
  '1-Hydroxethyl methyl ketone',
  '2-Butanone, 3-hydroxy',
  '2-Butanone, 3-hydroxy- (8CI,9CI)',
  '3-Oxo-2-butanol',
  'DL-Acetoin',
  '.gamma.-Hydroxy-.beta.-oxobutane',
  '1-Hydroxyethyl methyl ketone',
  '2,3-Butanolone',
  '2-Butanone, 3-hydroxy-',
  '2-Hydroxy-3-butanone',
  'Acetyl methyl carbinol',
  'Methanol, acetylmethyl-',
  'NSC7609',
  '2-Acetoin',
  'C00466',
  'Dimethylketol',
  '(R)-2-acetoin',
  '(R)-3-hydroxy-2-butanone',
  '(R)-3-hydroxybutan-2-one',
  '(R)-acetoin',
  '(R)-dimethylketol',
  '3-hydroxy-2-butanone',
  '3-hydroxybutan-2-one',
  'ACETOIN',
  'acetylmethylcarbinol',
  'A17951_ALDRICH',
  '2-Butanone, 3-hydroxy-, (.+/-.)-',
  'Methanol, acetylmethyl',
  'W200832_ALDRICH',
  'acetylmethyl-',
  '2-Butanone, 3-hydroxy-, (R)-',
  'CHEBI:15688'],
 'CC(=O)CCO': ['4-Hydroxybutan-2-one',
  '68648-26-0',
  '590-90-9',
  'ZINC01672523',
  '4-Hydroxybutan-2-one',
  'AI3-11747',
  'EINECS 209-693-6',
  'NSC 41219',
  'CH3C(O)CH2CH2OH',
  'Ketones, C4-6, beta-hydroxy',
  'InChI=1/C4H8O2/c1-4(6)2-3-5/h5H,2-3H2,1H',
  '2-Butanone, 4-hydroxy-',
  '3-Ketobutan-1-ol',
  '3-Oxo-1-butanol',
  '3-Oxobutanol',
  '4-Butanol-2-one',
  '4-Hydroxy-2-butanone',
  'Methylolacetone',
  'Monomethylolacetone',
  'NSC41219',
  'ghl.PD_Mitscher_leg0.412',
  'BUQ',
  '2-Hydroxyethyl methyl ketone',
  '252557_ALDRICH'],
 'CC(C)C(=O)O': ['2-Methylpropanoic acid',
  'Isobutyric acid',
  '79-31-2',
  '2-methyl-propanoic acid',
  'LMFA01020071',
  '58360_FLUKA',
  'InChI=1/C4H8O2/c1-3(2)4(5)6/h3H,1-2H3,(H,5,6',
  'I1754_SIGMA',
  'ISB',
  '4-02-00-00843 (Beilstein Handbook Reference)',
  'AI3-24260',
  'BRN 0635770',
  'Caswell No. 503AA',
  'EINECS 201-195-7',
  'EPA Pesticide Chemical Code 101502',
  'FEMA No. 2222',
  'HSDB 5228',
  'Iso-butyric acid',
  'Isobutyric acid (natural)',
  'Isobutyric acid [UN2529]  [Flammable liquid]',
  'Kyselina isomaselna [Czech]',
  'Methylpropanoic acid, 2-',
  'NSC 62780',
  'Tenox IBP-2',
  'Tenox IBP-2 Grain Pr.',
  'UN2529',
  'alpha-Methylpropanoic acid',
  'alpha-Methylpropionic acid',
  'W222208_ALDRICH',
  'W222216_ALDRICH',
  '2-Methylpropanoic acid',
  'C02632',
  'Dimethylacetic acid',
  'Isobutanoate',
  'Isobutyrate',
  'Isobutyric acid',
  '2-METHYL-PROPIONIC ACID',
  '.alpha.-Methylpropanoic acid',
  '.alpha.-Methylpropionic acid',
  '2-Methylpropionic acid',
  'Acetic acid, dimethyl-',
  'Cenex RP b2',
  'Isobutanoic acid',
  'Isopropylformic acid',
  'NSC62780',
  'Propanoic acid, 2-methyl-',
  'Propionic acid, 2-methyl-',
  'Tenox EBP 2',
  'WLN: QVY1&1',
  'CHEBI:16135',
  'Isobuttersaeure',
  'iso-C3H7COOH',
  '240168_ALDRICH',
  'ALQ',
  '46935U_SUPELCO'],
 'CC(C=O)CO': ['3-hydroxy-2-methylpropanal',
  '3-hydroxy-2-methyl-propanal',
  '3-hydroxy-2-methyl-propionaldehyde'],
 'CC(O)CC=O': ['3-Hydroxybutanal',
  '3-Hydroxybutyraldehyde',
  '115827-11-7',
  '107-89-1',
  'BRN 1735845',
  'Aldol [UN2839]  [Poison]',
  'HSDB 2663',
  '4-01-00-03984 (Beilstein Handbook Reference)',
  'NSC 7610',
  'beta-Hydroxybutyraldehyde',
  'AI3-18874',
  '.beta.-Hydroxybutyraldehyde',
  '3-Butanolal',
  '3-Hydroxybutanal',
  '3-Hydroxybutyraldehyde',
  'Acetaldol',
  'Aldol',
  'Butanal, 3-hydroxy-',
  'Butyraldehyde, 3-hydroxy-',
  'NSC7610',
  'Oxybutanal',
  'Oxybutyric aldehyde',
  'WLN: VH1YQ1',
  'UN2839',
  'EINECS 203-530-2'],
 'CCC(=O)CO': ['1-Hydroxybutan-2-one',
  '5077-67-8',
  '1-Hydroxy-2-butanone',
  '1-Hydroxybutan-2-one',
  '2-Butanone, 1-hydroxy-',
  '2-Oxobutanol',
  'EINECS 225-790-6',
  'Ethyl hydroxymethyl ketone',
  'FEMA No. 3173'],
 'CCC(O)C=O': ['2-hydroxybutanal', '2-hydroxybutyraldehyde'],
 'CCCC(=O)O': ['butanoic acid',
  'butyric acid',
  '107-92-6',
  'butanoic acid',
  'butyric acid',
  'ethylacetic acid',
  'propylformic acid',
  'Bio1_000444',
  'NCIMech_000707',
  'Bio1_001422',
  'LS-443',
  'CH3-[CH2]2-COOH',
  'CHEBI:30772',
  'butoic acid',
  'BUA',
  'C00246',
  'LMFA01010004',
  'nchembio.2007.56-comp6',
  '19215_FLUKA',
  'NCI60_001424',
  'AIDS-096140',
  'AIDS096140',
  'W222100_ALDRICH',
  'W222119_ALDRICH',
  'Butyrate, sodium salt',
  'Bio1_000933',
  'B103500_ALDRICH',
  '1-Butyric acid',
  'Butanic acid',
  'Buttersaeure',
  'NSC8415',
  'WLN: QV3',
  'n-Butanoic acid',
  'n-Butyric acid',
  'InChI=1/C4H8O2/c1-2-3-4(5)6/h2-3H2,1H3,(H,5,6',
  '4-02-00-00779 (Beilstein Handbook Reference)',
  'AI3-15306',
  'BRN 0906770',
  'Buttersaeure [German]',
  'Butyric acid (natural)',
  'Butyric acid [UN2820]  [Corrosive]',
  'CCRIS 6552',
  'EINECS 203-532-3',
  'FEMA No. 2221',
  'FEMA Number 2221',
  'HSDB 940',
  'Kyselina maselna [Czech]',
  'NSC 8415',
  'UN2820',
  'Butyric acid [UN2820] [Corrosive]',
  '1-propanecarboxylic acid',
  '2-butanoate',
  'BUTYRIC_ACID',
  'butanoate'],
 'O=CCCCO': ['4-hydroxybutanal',
  '4-Hydroxybutyraldehyde',
  '25714-71-0',
  '4-Hydroxybutyraldehyde',
  'Butanal, 4-hydroxy-',
  'EINECS 247-205-3',
  'c0021'],
 'O=COC=O': ['formyl formate',
  'formic acid formyl ester',
  'methanoyl methanoate',
  '1558-67-4',
  'CHEBI:36657',
  'formic acid anhydride',
  'formic anhydride']}
In [13]:
# Choose and specify some names for each.
# Unforutnately they can't start with a digit, ruling out many IUPAC names
preferred = {
 'C#CCC': 'but1yne',
 'C=C=C=C': 'butatriene',
 'CC(=O)C(C)O': 'Acethoin',
 'CC(=O)CCO': 'hydroxybutan3one',
 'CC(C)C(=O)O': 'isobutyricacid',
 'CC(C=O)CO': 'C(OH)C(C)CHO', # Would prefer 'hydroxy2methylpropan3al' but it's too long
 'CC(O)CC=O': 'Acetaldol',
 'CCC(=O)CO': 'hydroxybutan2one',
 'CCC(O)C=O': 'hydroxybutanal',
 'CCCC(=O)O': 'butanoicacid',
 'O=CCCCO': 'hydroxybutan4al',
 'O=COC=O': 'formicanhydride',
  }
    
In [14]:
# Check if the chosen names can be correctly resolved using NCI/CADD Chemical Identifier Resolver
for s in species_list:
    display(s)
    smiles = s.molecule[0].toSMILES()
    name = preferred[smiles]
    s.label = name
    round_trip_smiles = cirpy.resolve(name, 'smiles')
    print name
    if round_trip_smiles is None:
        print "WARNING: Cannot interpret above name using NCI/CADD Chemical Identifier Resolver:"
        continue
    m = rmgpy.molecule.Molecule(SMILES=round_trip_smiles)
    if not s.isIsomorphic(m):
        print "WARNING: Cannot resolve above name correctly using NCI/CADD Chemical Identifier Resolver:"
    
hydroxybutan2one
butatriene
formicanhydride
Acethoin
isobutyricacid
but1yne
hydroxybutanal
hydroxybutan4al
butanoicacid
WARNING: Cannot resolve name correctly using NCI/CADD Chemical Identifier Resolver:
C(OH)C(C)CHO
hydroxybutan3one
Acetaldol
In [15]:
for s in species_list:
    smiles = s.props['smiles']
    name = s.label
    smiles_names.loc[smiles] = name
smiles_names.to_csv(csv_filename)
smiles_names
Out[15]:
Name
SMILES
CCC(=O)CO hydroxybutan2one
C=C=C=C butatriene
O=COC=O formicanhydride
CC(=O)C(C)O Acethoin
CC(C)C(=O)O isobutyricacid
C#CCC but1yne
CCC(O)C=O hydroxybutanal
O=CCCCO hydroxybutan4al
CCCC(=O)O butanoicacid
CC(C=O)CO C(OH)C(C)CHO
CC(=O)CCO hydroxybutan3one
CC(O)CC=O Acetaldol
In [16]:
thermo_filename = 'new-species-{}-thermo.txt'.format(model_name)
rmgpy.chemkin.saveChemkinFile(thermo_filename, species=species_list, reactions=[])
WARNING:root:Species label is longer than 15 characters and will break CHEMKIN 2.0
WARNING:root:Species label is longer than 15 characters and will break CHEMKIN 2.0
WARNING:root:Species label is longer than 15 characters and will break CHEMKIN 2.0
WARNING:root:Species label is longer than 15 characters and will break CHEMKIN 2.0
In [17]:
print(open(thermo_filename).read())
ELEMENTS
	H
	D /2.014/
	T /3.016/
	C
	CI /13.003/
	O
	OI /18.000/
	N
	Ne
	Ar
	He
	Si
	S
	Cl
END

SPECIES
    hydroxybutan2one    ! hydroxybutan2one
    butatriene          ! butatriene
    formicanhydride     ! formicanhydride
    Acethoin            ! Acethoin
    isobutyricacid      ! isobutyricacid
    but1yne             ! but1yne
    hydroxybutanal      ! hydroxybutanal
    hydroxybutan4al     ! hydroxybutan4al
    butanoicacid        ! butanoicacid
    C(OH)C(C)CHO        ! C(OH)C(C)CHO
    hydroxybutan3one    ! hydroxybutan3one
    Acetaldol           ! Acetaldol
END



THERM ALL
    300.000  1000.000  5000.000

! Thermo group additivity estimation: group(Cs-(Cds-Od)CsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-(Cds-Od)OsHH) + gauche(Cs(RRRR)) + other(R) +
! group(Cs-CsHHH) + gauche(Cs(CsRRR)) + other(R) + group(Cds-OdCsCs) + other(R) + group(Os-CsH) + gauche(Os(CsR)) + other(R) + group(Od-Cd) + other(R)
hydroxybutan2one        H   8C   4O   2     G   100.000  5000.000 1039.44      1
 7.44060964E+00 3.29683385E-02-1.47200084E-05 2.80100001E-09-1.96238001E-13    2
-4.96488516E+04-6.79261439E+00 1.63003760E+00 5.53284406E-02-4.69871089E-05    3
 2.34959120E-08-5.17359159E-12-4.84408876E+04 2.14648779E+01                   4

! Thermo group additivity estimation: group(Cds-CdsHH) + gauche(CsOsCdSs) + other(R) + group(Cds-CdsHH) + gauche(CsOsCdSs) + other(R) + group(Cdd-
! CdsCds) + other(R) + group(Cdd-CdsCds) + other(R)
butatriene              H   4C   4          G   100.000  5000.000 1034.86      1
 7.88454152E+00 1.32763457E-02-5.19961907E-06 9.59779881E-10-6.74118736E-14    2
 3.73363816E+04-1.73609101E+01 2.72711675E+00 2.32968200E-02-5.35348284E-06    3
-8.19875275E-09 4.38154941E-12 3.89347014E+04 1.02623829E+01                   4

! Thermo group additivity estimation: group(Cds-OdOsH) + other(R) + group(Cds-OdOsH) + other(R) + group(Os-(Cds-Od)(Cds-Od)) + gauche(Os(RR)) + other(R)
! + group(Od-Cd) + other(R) + group(Od-Cd) + other(R)
formicanhydride         H   2C   2O   3     G   100.000  5000.000 1522.34      1
 9.19078336E+00 9.16701111E-03-4.37894780E-06 8.41812304E-10-5.82473977E-14    2
-6.05914952E+04-1.80341419E+01 2.83834887E+00 2.23426474E-02-1.38972026E-05    3
 3.49308202E-09-2.44518803E-13-5.82500111E+04 1.66202650E+01                   4

! Thermo group additivity estimation: group(Cs-(Cds-Od)CsOsH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs
! -(Cds-Od)HHH) + gauche(Cs(RRRR)) + other(R) + group(Cds-OdCsCs) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) +
! other(R)
Acethoin                H   8C   4O   2     G   100.000  5000.000 1027.00      1
 1.20396877E+01 2.40070974E-02-9.45560368E-06 1.76570944E-09-1.25353191E-13    2
-5.46523399E+04-3.23759760E+01 1.57207791E+00 4.36802792E-02-7.37673452E-06    3
-1.95856370E-08 9.94116373E-12-5.13897415E+04 2.38195835E+01                   4

! Thermo library: CHO
isobutyricacid          H   8C   4O   2     G   100.000  5000.000  982.53      1
 1.28899213E+01 2.22703503E-02-8.35713620E-06 1.60599547E-09-1.19262703E-13    2
-6.35500767E+04-3.92173185E+01 1.98765459E+00 2.89012847E-02 3.91562382E-05    3
-6.97400312E-08 2.79849328E-11-5.95854001E+04 2.24612114E+01                   4

! Thermo group additivity estimation: group(Cs-CtCsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-CsHHH) + gauche(Cs(CsRRR)) + other(R) + group(Ct-CtCs)
! + other(R) + group(Ct-CtH) + other(R)
but1yne                 H   6C   4          G   100.000  5000.000  922.97      1
 7.67374212E+00 1.67517532E-02-5.21796384E-06 8.51187935E-10-5.67436475E-14    2
 1.64721417E+04-1.45527015E+01 2.67640923E+00 2.31721012E-02 9.11135872E-06    3
-2.73859767E-08 1.24366998E-11 1.80436265E+04 1.26718361E+01                   4

! Thermo group additivity estimation: group(Cs-CsCsHH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-(Cds-Od)CsOsH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) +
! group(Cs-CsHHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) +
! other(R)
hydroxybutanal          H   8C   4O   2     G   100.000  5000.000 1023.92      1
 1.21349703E+01 2.41417375E-02-9.52282101E-06 1.78280978E-09-1.26884170E-13    2
-5.09727730E+04-3.23983202E+01 1.57515530E+00 4.32639443E-02-5.11612395E-06    3
-2.21947166E-08 1.08812682E-11-4.76502075E+04 2.44612150E+01                   4

! Thermo group additivity estimation: group(Cs-CsCsHH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-(Cds-Od)CsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) +
! group(Cs-CsOsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd)
! + other(R)
hydroxybutan4al         H   8C   4O   2     G   100.000  5000.000  763.26      1
 5.34873724E+00 3.64139113E-02-1.65545345E-05 3.16196023E-09-2.21496089E-13    2
-4.70210518E+04 5.93921392E+00 1.64707490E+00 5.58131661E-02-5.46790702E-05    3
 3.64617552E-08-1.11286094E-11-4.64559866E+04 2.27975602E+01                   4

! Thermo library: CHO
butanoicacid            H   8C   4O   2     G   100.000  5000.000 1083.82      1
 1.20323829E+01 2.44258131E-02-9.91159341E-06 1.84891279E-09-1.29834806E-13    2
-6.25386518E+04-3.52547190E+01 1.43982482E+00 4.78991169E-02-2.07804637E-05    3
-4.76291803E-09 4.46251573E-12-5.93251409E+04 2.09332254E+01                   4

! Thermo group additivity estimation: group(Cs-(Cds-Od)CsCsH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-CsOsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) +
! group(Cs-CsHHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) +
! other(R)
C(OH)C(C)CHO            H   8C   4O   2     G   100.000  5000.000 1056.83      1
 7.02943715E+00 3.30928874E-02-1.44847793E-05 2.72836832E-09-1.90002891E-13    2
-4.82745623E+04-4.22555498E+00 1.70747978E+00 5.32361708E-02-4.30751906E-05    3
 2.07638616E-08-4.45645538E-12-4.71496919E+04 2.17439289E+01                   4

! Thermo group additivity estimation: group(Cs-(Cds-Od)CsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs-CsOsHH) + gauche(Cs(CsRRR)) + other(R) + group(Cs
! -(Cds-Od)HHH) + gauche(Cs(RRRR)) + other(R) + group(Cds-OdCsCs) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsRR)R)) + other(R) + group(Od-Cd) +
! other(R)
hydroxybutan3one        H   8C   4O   2     G   100.000  5000.000  528.45      1
 5.19684678E+00 3.64096880E-02-1.65780802E-05 3.16916702E-09-2.22168512E-13    2
-5.06864124E+04 6.25995832E+00 1.96752590E+00 5.11361558E-02-3.07964804E-05    3
-1.36906299E-08 2.42158560E-11-5.02094248E+04 2.10636466E+01                   4

! Thermo group additivity estimation: group(Cs-CsCsOsH) + gauche(Cs(CsCsRR)) + other(R) + group(Cs-(Cds-Od)CsHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) +
! group(Cs-CsHHH) + gauche(Cs(Cs(CsRR)RRR)) + other(R) + group(Cds-OdCsH) + other(R) + group(Os-CsH) + gauche(Os(Cs(CsCsR)R)) + other(R) + group(Od-Cd)
! + other(R)
Acetaldol               H   8C   4O   2     G   100.000  5000.000 1126.11      1
 7.24010014E+00 3.30849855E-02-1.46257892E-05 2.76719589E-09-1.93080790E-13    2
-4.92173739E+04-5.76964397E+00 1.74066171E+00 5.26193333E-02-4.06459966E-05    3
 1.81714288E-08-3.61288044E-12-4.79787834E+04 2.14151138E+01                   4

END



REACTIONS    KCAL/MOLE   MOLES

END


In [18]:
transport_filename = 'new-species-{}-transport.txt'.format(model_name)
rmgpy.chemkin.saveTransportFile(transport_filename,species_list)
WARNING:root:Species label is longer than 15 characters and will break CHEMKIN 2.0
WARNING:root:Species label is longer than 15 characters and will break CHEMKIN 2.0
In [19]:
print(open(transport_filename).read())
! Species         Shape    LJ-depth  LJ-diam   DiplMom   Polzblty  RotRelaxNum Data     
! Name            Index    epsilon/k_B sigma     mu        alpha     Zrot      Source   
hydroxybutan2one    2     470.537     6.377     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=611.09 K, Pc=34.24 bar (from Joback method)
butatriene          2     357.002     5.180     0.000     0.000     1.000    ! GRI-Mech
formicanhydride     2     422.861     5.462     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=549.17 K, Pc=48.97 bar (from Joback method)
Acethoin            2     473.175     6.408     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=614.51 K, Pc=33.92 bar (from Joback method)
isobutyricacid      2     488.107     6.308     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=633.90 K, Pc=36.69 bar (from Joback method)
but1yne             2     357.002     5.180     0.000     0.000     1.000    ! GRI-Mech
hydroxybutanal      2     465.538     6.401     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=604.59 K, Pc=33.49 bar (from Joback method)
hydroxybutan4al     2     463.006     6.370     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=601.31 K, Pc=33.8 bar (from Joback method)
butanoicacid        2     484.944     6.274     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=629.80 K, Pc=37.04 bar (from Joback method)
C(OH)C(C)CHO        2     465.538     6.401     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=604.59 K, Pc=33.49 bar (from Joback method)
hydroxybutan3one    2     470.537     6.377     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=611.09 K, Pc=34.24 bar (from Joback method)
Acetaldol           2     465.538     6.401     0.000     0.000     0.000    ! Epsilon & sigma estimated with Tc=604.59 K, Pc=33.49 bar (from Joback method)

In [20]:
# Check that we can convert it into cantera
outdir = 'CanteraFiles'
new_parser = ck2cti.Parser()
surfaces = new_parser.convertMech(inputFile=thermo_filename,
                              thermoFile=None,
                              transportFile=transport_filename,
                                surfaceFile=None,
                              phaseName='gas',
                              outName=os.path.join(outdir,model_name+'.new-species.cti'),
                                  permissive=True)
Wrote CTI mechanism file to 'CanteraFiles/butanol.new-species.cti'.
Mechanism contains 12 species and 0 reactions.