Exemplo n.º 1
0
    par = Parameters(os.path.join(args.wfolder, 'resources', 'par.par'), fsource='dict', how='to_dict', multiple=False)
    fg = Parameters(os.path.join(args.wfolder, 'resources', 'fg.par'), fsource='list', how='to_list', multiple=True)
    reaction = Parameters(os.path.join(args.wfolder, 'resources', 'reaction.par'), fsource='list', how='to_list',
                          multiple=True)
    enum_reaction = Parameters(os.path.join(args.wfolder, 'resources', 'enum_reaction.par'), fsource='list',
                               how='to_list', multiple=True)
    deprotection = Parameters(os.path.join(args.wfolder, 'resources', 'deprotection.par'), fsource='list',
                              how='to_list', multiple=True)
    enum_deprotection = Parameters(os.path.join(args.wfolder, 'resources', 'enum_deprotection.par'), fsource='list',
                                   how='to_list', multiple=True)
    headpieces = Parameters(os.path.join(args.wfolder, 'resources', 'headpieces.par'), fsource='list', how='to_list',
                            multiple=True)
    token = '_'.join([path.par['Database_Run'], path.par['run']])
    log = Logger(os.path.join(args.wfolder, 'logs', token + '_e_designer.log'))
    log.update(version)
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'path.par'), 'path parameters')
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'par.par'), 'par parameters')
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'fg.par'), 'fg parameters')
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'reaction.par'), 'reaction parameters')
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'enum_reaction.par'), 'enum_reaction parameters')
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'deprotection.par'), 'deprotection parameters')
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'enum_deprotection.par'),
                           'enum_deprotection parameters')
    log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'headpieces.par'), 'headpieces parameters')
    for item in [path, par, fg, reaction, enum_reaction, deprotection, enum_deprotection, headpieces]:
        if item.success is None:
            error_found = True
            log.update('    Error(s) found while reading parameters: ' + item.path)
            for error in item.errors:
                log.update('        ' + error)
Exemplo n.º 2
0
                 multiple=True)
 calcfg = Parameters(os.path.join(args.wfolder, 'resources', 'calcfg.par'),
                     fsource='list',
                     how='to_list',
                     multiple=True)
 antifg = Parameters(os.path.join(args.wfolder, 'resources', 'antifg.par'),
                     fsource='list',
                     how='to_list',
                     multiple=True)
 headpieces = Parameters(os.path.join(args.wfolder, 'resources',
                                      'headpieces.par'),
                         fsource='list',
                         how='to_list',
                         multiple=True)
 log.update(version)
 log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'db.par'),
                        'db parameters')
 log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'par.par'),
                        'par parameters')
 log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'fg.par'),
                        'fg parameters')
 log.insert_file_in_log(
     os.path.join(args.wfolder, 'resources', 'calcfg.par'),
     'calcfg parameters')
 log.insert_file_in_log(
     os.path.join(args.wfolder, 'resources', 'antifg.par'),
     'antifg parameters')
 log.insert_file_in_log(
     os.path.join(args.wfolder, 'resources', 'headpieces.par'),
     'headpieces parameters')
 desalter = SmilesDesalter()
 calculator = MolPropertyCalculator()
Exemplo n.º 3
0
                  multiple=False)
 reaction = Parameters(os.path.join(args.wfolder, 'resources',
                                    'reaction.par'),
                       fsource='list',
                       how='to_list',
                       multiple=True)
 deprotection = Parameters(os.path.join(args.wfolder, 'resources',
                                        'deprotection.par'),
                           fsource='list',
                           how='to_list',
                           multiple=True)
 token = '_'.join([path.par['Database_Run'], path.par['run']])
 log = Logger(
     os.path.join(args.wfolder, 'logs', token + '_lib_designer.log'))
 log.update(version)
 log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'path.par'),
                        'path parameters')
 log.insert_file_in_log(os.path.join(args.wfolder, 'resources', 'par.par'),
                        'par parameters')
 log.insert_file_in_log(
     os.path.join(args.wfolder, 'resources', 'reaction.par'),
     'reaction parameters')
 log.insert_file_in_log(
     os.path.join(args.wfolder, 'resources', 'deprotection.par'),
     'deprotection parameters')
 for item in [path, par, reaction, deprotection]:
     if item.success is None:
         error_found = True
         log.update('    Error(s) found while reading parameters: ' +
                    item.path)
         for error in item.errors:
             log.update('        ' + error)