本文整理汇总了Python中General.jobOnCluster方法的典型用法代码示例。如果您正苦于以下问题:Python General.jobOnCluster方法的具体用法?Python General.jobOnCluster怎么用?Python General.jobOnCluster使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类General
的用法示例。
在下文中一共展示了General.jobOnCluster方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: import General [as 别名]
# 或者: from General import jobOnCluster [as 别名]
elif first == True:
cmd.extend(["--ab", "1"])
first = False
else:
cmd.extend(["--ab", "2"])
if args.v:
cmd.append("--v")
if args.low:
cmd.append("--low")
if args.flip:
cmd.append("--flip")
if args.capC:
cmd.append("--capC")
cmd = " ".join(cmd)
job = General.jobOnCluster(
["pyr", cmd], pepid + " model" + str(m), pepid + "/model" + str(m) + ".out/.finished"
)
job.submit(12)
# job.submit(16)
jobs.append(job)
sleep(1)
while len(jobs) > 0:
sleep(300)
for j in jobs:
j.checkjob()
if j.running == 0:
jobs.remove(j)
if j.checkfinish() == 0:
print "Job about " + j.myid + " may have died ..."
if j.tried > 3:
示例2: len
# 需要导入模块: import General [as 别名]
# 或者: from General import jobOnCluster [as 别名]
pdbs.sort()
jobs = []
odir = os.getcwd()
# homo = '/home/anthill/fzheng/home/termanal_upgrade/caspHomoStrict/'
homo = "/home/anthill/fzheng/ironfs/prepareCASP/CASP10_benchmark/homo/"
for pdb in pdbs:
caspid = pdb.split("/")[0]
# caspid = pdb.split('.')[0]
label = args.d + "/" + caspid + "/" + General.getBase(pdb) + "." + args.label
if os.path.isfile(label):
continue
cmd = ["python", src, "--p", pdb, "--o", args.d + "/" + caspid, "--dontuse", homo + caspid + ".homo", "--hrs", "3"]
cmd.append(args.opts)
cmd = " ".join(cmd)
job = General.jobOnCluster([cmd], os.getcwd(), os.path.realpath(label))
job.submit(3)
jobs.append(job)
sleep(0.5)
while len(jobs) > 0:
sleep(120)
for j in jobs:
j.checkjob()
if j.running == 0:
jobs.remove(j)
if j.checkfinish() == 0:
print "Job about " + j.myid + " may have died ..."
# never gives up
# if j.tried > 3:
# print 'have failed 3 times, give up ...'
示例3: str
# 需要导入模块: import General [as 别名]
# 或者: from General import jobOnCluster [as 别名]
if args.wgap != None:
pdb = args.wgap + '/' + mut.dir + '/' + pdb
##
pos = PDB.findPositionInPDB(pdb, str(mut.n), mut.c)
if pos == -1:
print('cannot found the residue in fragment pdb: '+ pdb)
continue
pdb = General.removePath(pdb)
cmd = ['python', selfbin +'/envForMatches.py','--m', matchf, '--n', str(pos-1), '--o', outname]
if args.uplimit != None:
cmd.extend(['--uplimit', args.uplimit])
if args.wgap != None:
cmd.append('--wgap')
cmd = ' '.join(cmd)
job = General.jobOnCluster([cmd], mut.dir, os.path.realpath(outname))
job.submit(3)
jobs.append(job)
sleep(0.5)
os.chdir(odir)
while (len(jobs) > 0):
sleep(120)
for j in jobs:
j.checkjob()
if j.running == 0:
jobs.remove(j)
if j.checkfinish() == 0:
print('Job about ' + j.myid + ' may have died ...')
if j.tried > 3: