本文整理匯總了Python中EMAN.pre_mpirun方法的典型用法代碼示例。如果您正苦於以下問題:Python EMAN.pre_mpirun方法的具體用法?Python EMAN.pre_mpirun怎麽用?Python EMAN.pre_mpirun使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類EMAN
的用法示例。
在下文中一共展示了EMAN.pre_mpirun方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: reconstruction_by_make3d
# 需要導入模塊: import EMAN [as 別名]
# 或者: from EMAN import pre_mpirun [as 別名]
def reconstruction_by_make3d(imagefile, mapfile, options, mapfile2e, mapfile2o, fscfile):
cmd_prefix = EMAN.pre_mpirun(mpilib = options.mpi, mpi_nodefile = options.mpi_nodefile, single_job_per_node = 1)
cmd_3drec = "%s `which make3d` %s hard=90 lowmem sym=%s mode=2 apix=%g pad=%d usecenter iter=1" % \
(cmd_prefix, imagefile, options.endSym, options.apix, options.pad)
if options.sffile:
cmd_3drec += " wiener3d=%s" % ( options.sffile )
if not options.phasecorrected: cmd_3drec += " flipphase"
cmd = "%s out=%s" % (cmd_3drec, mapfile)
if options.eotest and mapfile2e and mapfile2o:
cmd += "\n%s subset=0/2 out=%s" % (cmd_3drec, mapfile2e)
cmd += "\n%s subset=1/2 out=%s" % (cmd_3drec, mapfile2o)
print cmd
if options.mpi:
os.system(cmd)
else:
runpar_file = "runpar.make3d"
runparfp = open(runpar_file,"w")
runparfp.write("%s\n" % (cmd))
runparfp.close()
cmd = "runpar proc=%d,%d file=%s nofs" % (options.cpus, options.cpus, runpar_file)
print cmd
os.system(cmd)
if not (os.path.exists(mapfile) and os.path.getsize(mapfile)):
print "ERROR: 3D map \"%s\" is not generated properly" % (mapfile)
sys.exit()
if mapfile2e and mapfile2o and os.path.exists(mapfile2e) and os.path.exists(mapfile2o):
cmd = "proc3d %s %s fsc=%s" % (mapfile2e,mapfile2o,fscfile)
print cmd
os.system(cmd)
EMAN.post_mpirun(mpilib = options.mpi)