diff --git a/TCutility/results/adf.py b/TCutility/results/adf.py index df98cb17..b0b46220 100644 --- a/TCutility/results/adf.py +++ b/TCutility/results/adf.py @@ -28,19 +28,9 @@ def get_calc_settings(info: Result) -> Result: reader_ams = cache.get(info.files['ams.rkf']) ret = Result() - # get the run type of the calculation - # read and split user input into words - user_input = reader_ams.read('General', 'user input').strip() - words = user_input.split() - - # default task is SinglePoint - ret.task = 'SinglePoint' - for i, word in enumerate(words): - # task is always given with the task keyword - if word.lower() == 'task': - ret.task = words[i+1] - break - + # set the calculation task at a higher level + ret.task = info.input.task + # determine if calculation used relativistic corrections # if it did, variable 'escale' will be present in 'SFOs' # if it didnt, only variable 'energy' will be present diff --git a/TCutility/results/dftb.py b/TCutility/results/dftb.py index db2efaa3..a9d7e884 100644 --- a/TCutility/results/dftb.py +++ b/TCutility/results/dftb.py @@ -13,18 +13,8 @@ def get_calc_settings(info: Result) -> Result: reader_ams = cache.get(info.files['ams.rkf']) ret = Result() - # get the run type of the calculation - # read and split user input into words - user_input = str(reader_ams.read('General', 'user input')).strip() - words = user_input.split() - - # default task is SinglePoint - ret.task = 'SinglePoint' - for i, word in enumerate(words): - # task is always given with the task keyword - if word.lower() == 'task': - ret.task = words[i+1] - break + # set the calculation task at a higher level + ret.task = info.input.task # read properties of the calculation number_of_properties = int(reader_dftb.read('Properties', 'nEntries')) # type: ignore plams does not include type hints. Returns int