当前位置: 首页>>代码示例>>Python>>正文


Python General.destroyLocalSpace方法代码示例

本文整理汇总了Python中General.destroyLocalSpace方法的典型用法代码示例。如果您正苦于以下问题:Python General.destroyLocalSpace方法的具体用法?Python General.destroyLocalSpace怎么用?Python General.destroyLocalSpace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在General的用法示例。


在下文中一共展示了General.destroyLocalSpace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: cleanup

# 需要导入模块: import General [as 别名]
# 或者: from General import destroyLocalSpace [as 别名]
def cleanup(*args):
	if ldir != None and os.path.isdir(ldir):
		General.destroyLocalSpace(ldir)
	sys.exit(0)
开发者ID:vancalory,项目名称:mustpress,代码行数:6,代码来源:runMaster.py

示例2: format

# 需要导入模块: import General [as 别名]
# 或者: from General import destroyLocalSpace [as 别名]
        outfh2.write(resid + '\t' + format(abd, '.3f') + '\n')
        outfh3.write(resid + '\t' + format(ssc, '.3f') + '\n')
        if args.v:
            raw_outstr = [resid + ' :']
            sc_components = sorted(score_components[resid], key = lambda x : (x[0], x[1]))
            for rawsc in sc_components:
                raw_outstr.extend([rawsc[0] + ',' + str(rawsc[1]), rawsc[2], rawsc[3]])
            raw_outstr = '\t'.join(raw_outstr) + '\n'
            outfhv.write(raw_outstr)

outfh1.close()
outfh2.close()
outfh3.close()
if args.v:
    outfhv.close()

print 'Scores calculation done!'

if args.opdb:
    opdb1, opdb2, opdb3 = [ x + '.pdb' for x in (outf1, outf2, outf3)]
    for x in (outf1, outf2, outf3):
        replaceBfactor(args.p, x + '.pdb', x)

if not args.post:
    if args.v:
        os.system('cp -r ' + ldir + '/' + base + ' ' + outdir)
    General.destroyLocalSpace(ldir)

# remove temporary files created
os.remove(list_tmp)
# os.remove(term_support)
开发者ID:vancalory,项目名称:termanal_updating,代码行数:33,代码来源:run.py

示例3: len

# 需要导入模块: import General [as 别名]
# 或者: from General import destroyLocalSpace [as 别名]
args = par.parse_args()

cmd_setup = cmd_setup.replace('dummy.pdb', args.p)
if args.change != None:
    assert len(args.change) % 2 == 0
    for i in range(0, len(args.change), 2):
        cmd_setup.replace(args.change[i], args.change[i+1])

cmd_run = ['/home/grigoryanlab/library/bin/charmrun', '+p'+str(args.nc), '/home/grigoryanlab/library/bin/namd2', 'namdrun_run.ctl >& namdrun_run.out']
cmd_run = ' '.join(cmd_run)

odir = os.getcwd()

# run setup codes
os.system(cmd_setup)
General.destroyLocalSpace(ldir1)
os.chdir(ldir2)
os.system('rm -r vmd*')

# need to have a subprocess with timeout, because wants to stop MD and allow certain time before job terminated
class Command:
    def __init__(self, cmd):
        self.cmd = cmd
        self.process = None

    def run(self, timeout):
        def target():
            print 'Thread started'
            self.process = subprocess.Popen(self.cmd, shell=True)
            self.process.communicate()
            print 'Thread finished'
开发者ID:vancalory,项目名称:PDZ,代码行数:33,代码来源:multiMDsingle.py


注:本文中的General.destroyLocalSpace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。