Skip to content

Commit f017fc1

Browse files
committed
Merge branch 'main' of https://github.com/12Chao/RMG-Py into cov_dep_therm
2 parents 291086f + a458b1d commit f017fc1

File tree

11 files changed

+70
-2481
lines changed

11 files changed

+70
-2481
lines changed

rmgpy/chemkin.pyx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ def load_transport_file(path, species_dict, skip_missing_species=False):
951951
continue
952952
species = species_dict[label]
953953
species.transport_data = TransportData(
954-
shapeIndex=int(data[0]),
954+
shapeIndex=int(float(data[0])),
955955
sigma=(float(data[2]), 'angstrom'),
956956
epsilon=(float(data[1]), 'K'),
957957
dipoleMoment=(float(data[3]), 'De'),
@@ -1035,15 +1035,16 @@ def load_chemkin_file(path, dictionary_path=None, transport_path=None, read_comm
10351035
# Read in the thermo data from the thermo file
10361036
if thermo_path:
10371037
with open(thermo_path, 'r') as f:
1038-
line0 = f.readline()
1038+
line0 = None
10391039
while line0 != '':
1040-
line = remove_comment_from_line(line0)[0]
1041-
line = line.strip()
1040+
previous_line = f.tell()
1041+
line0 = f.readline()
1042+
line = remove_comment_from_line(line0)[0].strip()
10421043
if 'THERM' in line.upper():
1043-
f.seek(-len(line0), 1)
1044+
f.seek(previous_line)
10441045
read_thermo_block(f, species_dict)
10451046
break
1046-
line0 = f.readline()
1047+
10471048
# Index the reactions now to have identical numbering as in Chemkin
10481049
index = 0
10491050
for reaction in reaction_list:

0 commit comments

Comments
 (0)