Skip to content

Commit 5048034

Browse files
rwestkeceli
authored andcommitted
Make transport writing compatible with Python 2.6
The format syntax where you omit the field numbers was introduced in Python 2.7.
1 parent 67d1cf6 commit 5048034

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

rmgpy/chemkin.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1576,8 +1576,8 @@ def saveTransportFile(path, species):
15761576
(from the chemkin TRANSPORT manual)
15771577
"""
15781578
with open(path, 'w') as f:
1579-
f.write("! {:15} {:8} {:9} {:9} {:9} {:9} {:9} {:9}\n".format('Species','Shape', 'LJ-depth', 'LJ-diam', 'DiplMom', 'Polzblty', 'RotRelaxNum','Data'))
1580-
f.write("! {:15} {:8} {:9} {:9} {:9} {:9} {:9} {:9}\n".format('Name','Index', 'epsilon/k_B', 'sigma', 'mu', 'alpha', 'Zrot','Source'))
1579+
f.write("! {0:15} {1:8} {2:9} {3:9} {4:9} {5:9} {6:9} {7:9}\n".format('Species','Shape', 'LJ-depth', 'LJ-diam', 'DiplMom', 'Polzblty', 'RotRelaxNum','Data'))
1580+
f.write("! {0:15} {1:8} {2:9} {3:9} {4:9} {5:9} {6:9} {7:9}\n".format('Name','Index', 'epsilon/k_B', 'sigma', 'mu', 'alpha', 'Zrot','Source'))
15811581
for spec in species:
15821582
if (not spec.transportData or
15831583
len(spec.molecule) == 0):
@@ -1596,7 +1596,7 @@ def saveTransportFile(path, species):
15961596
shapeIndex = 2
15971597

15981598
if missingData:
1599-
f.write('! {:19s} {!r}\n'.format(label, spec.transportData))
1599+
f.write('! {0:19s} {1!r}\n'.format(label, spec.transportData))
16001600
else:
16011601
f.write('{0:19} {1:d} {2:9.3f} {3:9.3f} {4:9.3f} {5:9.3f} {6:9.3f} ! {7:s}\n'.format(
16021602
label,

rmgpy/rmg/model.py

-4
Original file line numberDiff line numberDiff line change
@@ -746,13 +746,9 @@ def enlarge(self, newObject):
746746

747747
# Generate thermodynamics of new species
748748
logging.info('Generating thermodynamics for new species...')
749-
<<<<<<< HEAD
750749
self.generateThermoDataForListOfSpecies(newSpeciesList)
751-
=======
752750
for spec in newSpeciesList:
753-
spec.generateThermoData(database, quantumMechanics=self.quantumMechanics)
754751
spec.generateTransportData(database)
755-
>>>>>>> c31e9d05281c7a1f1a16d0236c2a90ae816090eb
756752

757753
# Generate kinetics of new reactions
758754
logging.info('Generating kinetics for new reactions...')

0 commit comments

Comments
 (0)