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


Python EDrestraint.findBadfit1方法代码示例

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


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

示例1: calcCC

# 需要导入模块: from restraints import EDrestraint [as 别名]
# 或者: from restraints.EDrestraint import findBadfit1 [as 别名]
def calcCC(crdlist,pts,mapfile,esmin,esmax):
    crdlist1 = VecVecFloat(crdlist)
    pis = VecInt( range(crdlist1.size()) )
    from restraints import EDrestraint
    er  = EDrestraint.makeEDrestraintFromMap(pis, "Xranker", mapfile, esmin, esmax, esmax)
    xcorr = EDrestraint.findBadfit1(mtzfn, f1label, pts, ptinds)
    print "xcor",xcorr,resids[ri]
    return xcorr
开发者ID:swanandgore,项目名称:rappertk,代码行数:10,代码来源:emrefine.py

示例2: score_section

# 需要导入模块: from restraints import EDrestraint [as 别名]
# 或者: from restraints.EDrestraint import findBadfit1 [as 别名]
    def score_section(s, pdbfile, mtzfn, f1label="FP", f2label="FC", philabel="PHIC", maptype="2F1-F2", aasc="mcsc",ptinds=[]) :
        assert aasc in ["pept","mc","sc","mcsc"]
        prot = protein(pdbfile, read_hydrogens=0, read_waters=1, read_hets=1)
        res, resids, resnums, resns, chids, inscodes, pts = prot2res.readProtRes(prot)
        pts = VecVecFloat(pts)
        xcorr = EDrestraint.findBadfit1(mtzfn, f1label, pts, ptinds)
        print "XcorrZ = ", xcorr

        return []
开发者ID:swanandgore,项目名称:rappertk,代码行数:11,代码来源:xcheck2.py

示例3: score

# 需要导入模块: from restraints import EDrestraint [as 别名]
# 或者: from restraints.EDrestraint import findBadfit1 [as 别名]
 def score(s, pdbfile, mtzfn, f1label="FP", f2label="FC", philabel="PHIC", maptype="2F1-F2", aasc="mcsc") :
     assert aasc in ["pept","mc","sc","mcsc"]
     prot = protein(pdbfile, read_hydrogens=0, read_waters=1, read_hets=1)
     res, resids, resnums, resns, chids, inscodes, pts = prot2res.readProtRes(prot)
     pts = VecVecFloat(pts)
     retkeys = []
     badlines = []
     allkeys = list(res.keys()) ; allkeys.sort()
     for ai in range(len(allkeys)) :
         ri = allkeys[ai]
         key = resids[ri]
         if not isAAres(resns[ri]) : continue
         if aasc=="sc" and resns[ri] in ["GLY","ALA"] : continue
         if aasc=="sc" and isAAres(resns[ri]) :
             ptinds = []
             for k,v in res[ri].items() :
                 if not k in [" N  "," CA "," C  "," O  "," CB "] : ptinds.append(v)
             ptinds = VecInt(ptinds)
         elif aasc=="pept" and isAAres(resns[ri]) and ai+1 < len(allkeys) and isAAres(resns[allkeys[ai+1]]) :
             ptinds = []
             for k,v in res[ri].items() :
                 if k in [" C  "," O  "] : ptinds.append(v)
             for k,v in res[ allkeys[ai+1] ].items() :
                 if k in [" N  ",] : ptinds.append(v)
             ptinds = VecInt(ptinds)
         elif aasc=="mc" and isAAres(resns[ri]) :
             ptinds = []
             for k,v in res[ri].items() :
                 if k in [" N  "," CA "," C  "," O  "," CB "] : ptinds.append(v)
             ptinds = VecInt(ptinds)
         elif aasc=="ca" and isAAres(resns[ri]) :
             ptinds = []
             for k,v in res[ri].items() :
                 if k in [" CA "] : ptinds.append(v)
             ptinds = VecInt(ptinds)                
         else :
             ptinds = VecInt( res[ri].values() )
         if re.compile("\.map$").search(mtzfn) and re.compile("\.map$").search(f1label) :
             xcorr = EDrestraint.findBadfit1(mtzfn, f1label, pts, ptinds)
             print "xcor",xcorr,resids[ri]
             
         else :
             xcorr = EDrestraint.findBadfit(mtzfn, f1label, f2label, philabel, pts, ptinds)
         #print "XcorrZ [%s]"%key, xcorr
         if not s.scores.has_key(key) : s.scores[key] = [] ; s.keyorder.append(key)
         s.scores[key].append(xcorr)
         if xcorr < s.cutoff :
             retkeys.append(key) ;
             bl = "[%s]" % key
             badlines.append(bl)
     print len(badlines), "BADRESIDS", aasc, len(s.scores.values()[0]), s.cutoff, "------------------------------------" ;
     for bl in badlines : print bl
     s.gplot() 
     return retkeys
开发者ID:swanandgore,项目名称:rappertk,代码行数:56,代码来源:xcheck2.py


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