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
@@ -635,6 +636,7 @@ def load_input_file(path):
635636 'database' : database ,
636637 # Jobs
637638 'kinetics' : kinetics ,
639+ 'SoluteTSData' : SoluteTSData ,
638640 'statmech' : statmech ,
639641 'thermo' : thermo ,
640642 'pressureDependence' : pressureDependence ,
@@ -652,10 +654,15 @@ def load_input_file(path):
652654 load_necessary_databases ()
653655
654656 with open (path , 'r' ) as f :
657+ content = f .read ()
655658 try :
656- exec (f . read () , global_context , local_context )
657- except (NameError , TypeError , SyntaxError ):
659+ exec (content , global_context , local_context )
660+ except (NameError , TypeError , SyntaxError ) as e :
658661 logging .error ('The input file {0!r} was invalid:' .format (path ))
662+ line_number = e .__traceback__ .tb_next .tb_lineno
663+ logging .error (f'Error occurred at or near line { line_number } of { path } .' )
664+ lines = content .splitlines ()
665+ logging .error (f'Line: { lines [line_number - 1 ]} ' )
659666 raise
660667
661668 model_chemistry = local_context .get ('modelChemistry' , None )
0 commit comments