runapp.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:chemworkflows 作者: avirshup 项目源码 文件源码
def run_preprocessing(runner, outdir):
    t = runner.preprocess()

    print '\nFINISHED preprocessing. Output directory:'
    print "    ", os.path.abspath(outdir)

    resultjson = {}
    for field in t.outputfields:
        if field == 'pdbstring':
            with open(os.path.join(outdir, 'prep.pdb'), 'w') as outfile:
                print >> outfile, t.getoutput('pdbstring')
        else:
            resultjson[field] = t.getoutput(field)

    with open(os.path.join(outdir, 'prep.json'), 'w') as outfile:
        json.dump(resultjson, outfile)
    with open(os.path.join(outdir, 'workflow_state.dill'), 'w') as outfile:
        dill.dump(runner, outfile)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号