Skip to content

Commit c7389b3

Browse files
committed
BugFix: Check the PDep method before using the METHOD_MAP dict
The first iteration will assign the value from this dictionary to pdep['method', the T3 will crash at the second iteration, since the corresponding value is not a key in this dict. Here we first check whether the value is already correct, if not we use the mapping dict.
1 parent e69e8a2 commit c7389b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t3/utils/writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def write_rmg_input_file(rmg: dict,
246246
maximumAtoms=${max_atoms},
247247
)
248248
"""
249-
pdep['method'] = METHOD_MAP[pdep['method']]
249+
pdep['method'] = pdep['method'] if pdep['method'] in list(METHOD_MAP.values()) else METHOD_MAP[pdep['method']]
250250
pdep['T_min'], pdep['T_max'], pdep['T_count'] = pdep['T']
251251
pdep['P_min'], pdep['P_max'], pdep['P_count'] = pdep['P']
252252
pdep['T_count'], pdep['P_count'] = int(pdep['T_count']), int(pdep['P_count'])

0 commit comments

Comments
 (0)