當前位置: 首頁>>代碼示例>>Python>>正文


Python EDrestraint.makeEDrestraintFromMTZ方法代碼示例

本文整理匯總了Python中restraints.EDrestraint.makeEDrestraintFromMTZ方法的典型用法代碼示例。如果您正苦於以下問題:Python EDrestraint.makeEDrestraintFromMTZ方法的具體用法?Python EDrestraint.makeEDrestraintFromMTZ怎麽用?Python EDrestraint.makeEDrestraintFromMTZ使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在restraints.EDrestraint的用法示例。


在下文中一共展示了EDrestraint.makeEDrestraintFromMTZ方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: generateMTZ

# 需要導入模塊: from restraints import EDrestraint [as 別名]
# 或者: from restraints.EDrestraint import makeEDrestraintFromMTZ [as 別名]
 def generateMTZ(s, blist, aiSC) :
     xrlist, optional = [], []
     for b in blist :
         bop = b.getOP()
         edrIP = []
         for i in range(bop.size()) :
             if aiSC[bop[i]] != -1 : edrIP.append(bop[i])
         if len(edrIP) > 0 :
             xrlist.append( EDrestraint.makeEDrestraintFromMTZ(VecInt(edrIP), "EDrestraint on o/p of %s" % b.name(), \
                 s.mtzfn, s.folabel, s.fclabel, s.philabel, s.maptype, s.min, s.max, s.mean) )
             if not "LigandBuilder" in b.name() : optional.append(len(xrlist)-1)
     return xrlist, optional
開發者ID:swanandgore,項目名稱:rappertk,代碼行數:14,代碼來源:prepareChain.py

示例2: score

# 需要導入模塊: from restraints import EDrestraint [as 別名]
# 或者: from restraints.EDrestraint import makeEDrestraintFromMTZ [as 別名]
 def score(s, crdlist, pis=None) :
     crdlist1 = VecVecFloat(crdlist)
     #print "-----------------------------------"
     #for ci in range(crdlist1.size()) :
     #    print crdlist1[ci][0] , crdlist1[ci][0] , crdlist1[ci][0]
     if not pis : pis = VecInt( range(crdlist1.size()) )
     else : pis = VecInt( range(pis) )
     if re.compile("\.map$").search(s.phasedmtz) :
         er = EDrestraint.makeEDrestraintFromMap(pis, "Xranker", s.phasedmtz, s.esmin, s.esmax, s.esmax)
     else :
         er = EDrestraint.makeEDrestraintFromMTZ(pis, "Xranker", s.phasedmtz, s.fplabel, s.fclabel, s.philabel, s.maptype, s.esmin, s.esmax, s.esmax)
     return -1*er.scoreAround(crdlist1)
開發者ID:swanandgore,項目名稱:rappertk,代碼行數:14,代碼來源:xcheck.py

示例3: getTime

# 需要導入模塊: from restraints import EDrestraint [as 別名]
# 或者: from restraints.EDrestraint import makeEDrestraintFromMTZ [as 別名]
def getTime(sf,pdb,sg):
    a,b,c,alpha,beta,gamma = getCRYST(pdb)
    cif2mtz(sf, "base.mtz", a, b, c, alpha, beta, gamma, sg)
    uniqueify("base.mtz", "rfree.mtz")
    sfall(pdb, "rfree.mtz", "phased.mtz")
    xrayRestGen = []
    prot = protein(pdb, read_hydrogens=0, read_waters=0, read_hets=0)
    res, resids, resnums, resns, chids, inscodes, pts = prot2res.readProtRes(prot)
    esmin, esmax, esmean, rcmult, xscoreCutoff = .000, 5., .0, 5, 0.9
    pis = VecInt(resids.keys())
    folabel="FP"
    fclabel="FC"
    philabel="PHIC"
    maptype="2F1-F2"

    if maptype == '2F1-F2' : maptype = 0
    elif maptype == 'F1' : maptype = 1
    else : print "unknown maptype ", maptype ; sys.exit(1)
    er = EDrestraint.makeEDrestraintFromMTZ(pis, "EDrestraint", "phased.mtz", folabel, fclabel, philabel, maptype, esmin, esmax, esmean) 
    score = er.scoreAll(VecVecFloat(pts))
    print score
    sys.exit()
開發者ID:swanandgore,項目名稱:rappertk,代碼行數:24,代碼來源:pdb2res.py


注:本文中的restraints.EDrestraint.makeEDrestraintFromMTZ方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。