Exemplo n.º 1
0
        settings['mem_free'] = '3.0G'
        settings['scriptname'] = generated_scriptname
        settings['appname'] = 'minimize_with_cst'
        settings['rosetta_args_list'] =  [
            '-in:file:fullatom', '-ignore_unrecognized_res',
            '-fa_max_dis', '9.0', '-ddg::harmonic_ca_tether', '0.5',
            '-ddg::constraint_weight', '1.0',
            '-ddg::out_pdb_prefix', 'min_cst_0.5',
            '-ddg::sc_min_only', 'false'
        ]
        if arguments['--talaris2014']:
            settings['rosetta_args_list'].extend(['-talaris2014', 'true'])
        elif arguments['--beta_july15']:
            settings['rosetta_args_list'].extend(['-beta_july15'])

        write_run_file(settings)
        job_path = os.path.abspath(output_dir)
        print('''Job files written to directory: %s.\n\nTo launch this job:
        cd %s
        python %s.py\n''' % (job_path, job_path, generated_scriptname))
    except Exception, e:
        print('\nAn exception occurred setting up the preminimization step: "%s".' % str(e))
        sys.stdout.write('Removing the directory %s: ' % output_dir)
        try:
            shutil.rmtree(output_dir)
            print('done.\n')
        except Exception, e2:
            print('failed.\n')
            print(str(e2))
            print(traceback.format_exc())
Exemplo n.º 2
0
    with open(os.path.join(output_data_dir, "job_dict.pickle"), "wb") as f:
        pickle.dump(job_dict, f)

    settings["scriptname"] = "alascan_run"
    settings["appname"] = "rosetta_scripts"
    settings["rosetta_args_list"] = [
        "-parser:view",
        "-inout:dbms:mode",
        "sqlite3",
        "-inout:dbms:database_name",
        "rosetta_output.db3",
        "-no_optH",
        "true",
        "-restore_talaris_behavior",  #TODO: different restore_XXXXXXXX_behaviours are needed per score function
    ]
    settings["tasks_per_process"] = 15
    settings["numjobs"] = "%d" % len(job_dict)
    settings["mem_free"] = "1.0G"
    settings["output_dir"] = output_dir

    write_run_file(settings)
    import sys
    #write a tasklist file
    with open(os.path.abspath(output_dir) + "/task.list", 'w') as f:
        for i in range(len(job_dict)):
            print(
                f'cd {os.path.abspath(output_dir)} && {sys.executable} alascan_run.py {i}',
                file=f)

    print("Job files written to directory:", os.path.abspath(output_dir))