6060from rmgpy .thermo .wilhoit import Wilhoit
6161from rmgpy .kinetics .uncertainties import RateUncertainty
6262from rmgpy .transport import TransportData
63+ from rmgpy .data .solvation import SoluteTSData
6364from rmgpy .util import as_list
6465
6566from arkane .common import is_pdep
@@ -637,6 +638,7 @@ def load_input_file(path):
637638 'database' : database ,
638639 # Jobs
639640 'kinetics' : kinetics ,
641+ 'SoluteTSData' : SoluteTSData ,
640642 'statmech' : statmech ,
641643 'thermo' : thermo ,
642644 'pressureDependence' : pressureDependence ,
@@ -654,10 +656,15 @@ def load_input_file(path):
654656 load_necessary_databases ()
655657
656658 with open (path , 'r' ) as f :
659+ content = f .read ()
657660 try :
658- exec (f . read () , global_context , local_context )
659- except (NameError , TypeError , SyntaxError ):
661+ exec (content , global_context , local_context )
662+ except (NameError , TypeError , SyntaxError ) as e :
660663 logging .error ('The input file {0!r} was invalid:' .format (path ))
664+ line_number = e .__traceback__ .tb_next .tb_lineno
665+ logging .error (f'Error occurred at or near line { line_number } of { path } .' )
666+ lines = content .splitlines ()
667+ logging .error (f'Line: { lines [line_number - 1 ]} ' )
661668 raise
662669
663670 model_chemistry = local_context .get ('modelChemistry' , None )
0 commit comments