Révision 695dcff8 modules/dos_input.py

b/modules/dos_input.py
205 205
def get_subm_script():
206 206
    subm_script = dos_inp.get('Global', 'subm_script', fallback=False)
207 207
    if subm_script and not os.path.isfile(subm_script):
208
        logger.error(f'File {subm_script} not found')
208
        logger.error(f'File {subm_script} not found.')
209 209
        raise FileNotFoundError(f'File {subm_script} not found')
210 210
    return subm_script
211 211

  
......
283 283
def get_isol_inp_file():
284 284
    isol_inp_file = dos_inp.get('Isolated', 'isol_inp_file')
285 285
    if not os.path.isfile(isol_inp_file):
286
        logger.error(f'File {isol_inp_file} not found')
286
        logger.error(f'File {isol_inp_file} not found.')
287 287
        raise FileNotFoundError(f'File {isol_inp_file} not found')
288 288
    return isol_inp_file
289 289

  
......
291 291
def get_molec_file():
292 292
    molec_file = dos_inp.get('Isolated', 'molec_file')
293 293
    if not os.path.isfile(molec_file):
294
        logger.error(f'File {molec_file} not found')
294
        logger.error(f'File {molec_file} not found.')
295 295
        raise FileNotFoundError(f'File {molec_file} not found')
296 296
    return molec_file
297 297

  
......
339 339
def get_screen_inp_file():
340 340
    screen_inp_file = dos_inp.get('Screening', 'screen_inp_file')
341 341
    if not os.path.isfile(screen_inp_file):
342
        logger.error(f'File {screen_inp_file} not found')
342
        logger.error(f'File {screen_inp_file} not found.')
343 343
        raise FileNotFoundError(f'File {screen_inp_file} not found')
344 344
    return screen_inp_file
345 345

  
......
347 347
def get_surf_file():
348 348
    surf_file = dos_inp.get('Screening', 'surf_file')
349 349
    if not os.path.isfile(surf_file):
350
        logger.error(f'File {surf_file} not found')
350
        logger.error(f'File {surf_file} not found.')
351 351
        raise FileNotFoundError(f'File {surf_file} not found')
352 352
    return surf_file
353 353

  
......
549 549
def get_refine_inp_file():  # TODO if not specified try isol_inp_file.
550 550
    refine_inp_file = dos_inp.get('Refinement', 'refine_inp_file')
551 551
    if not os.path.isfile(refine_inp_file):
552
        logger.error(f'File {refine_inp_file} not found')
552
        logger.error(f'File {refine_inp_file} not found.')
553 553
        raise FileNotFoundError(f'File {refine_inp_file} not found')
554 554

  
555 555
    return refine_inp_file
......
572 572
        dos_inp.read(in_file)
573 573
    except MissingSectionHeaderError as e:
574 574
        logger.error('There are options in the input file without a Section '
575
                     'header')
575
                     'header.')
576 576
        err = e
577 577
    except DuplicateOptionError as e:
578 578
        logger.error('There is an option in the input file that has been '
579 579
                     'specified more than once, possibly due to the lack of a '
580
                     'Section header')
580
                     'Section header.')
581 581
        err = e
582 582
    except Exception as e:
583 583
        err = e
......
685 685
        if return_vars['min_coll_height'] is not False and \
686 686
                return_vars['surf_norm_vect'].tolist() not in cart_axes:
687 687
            logger.warning("'min_coll_height' option is only implemented for "
688
                           "'surf_norm_vect' to be one of the x, y or z axes")
688
                           "'surf_norm_vect' to be one of the x, y or z axes.")
689 689

  
690 690
    # Refinement
691 691
    if refinement:
......
708 708
    return_vars_str = "\n\t".join([str(key) + ": " + str(value)
709 709
                                   for key, value in return_vars.items()])
710 710
    logger.info(
711
        f'Correctly read {in_file} parameters: \n\n\t{return_vars_str}\n')
711
        f'Correctly read {in_file} parameters: \n\n\t{return_vars_str}\n.')
712 712

  
713 713
    return return_vars
714 714

  

Formats disponibles : Unified diff