本文整理汇总了Python中Bio.SVDSuperimposer.SVDSuperimposer._rms方法的典型用法代码示例。如果您正苦于以下问题:Python SVDSuperimposer._rms方法的具体用法?Python SVDSuperimposer._rms怎么用?Python SVDSuperimposer._rms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bio.SVDSuperimposer.SVDSuperimposer
的用法示例。
在下文中一共展示了SVDSuperimposer._rms方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: calc_DockQ
# 需要导入模块: from Bio.SVDSuperimposer import SVDSuperimposer [as 别名]
# 或者: from Bio.SVDSuperimposer.SVDSuperimposer import _rms [as 别名]
#.........这里部分代码省略.........
# Print RMSD:
irms=super_imposer.rms
(chain1,chain2)=chain_sample.keys()
ligand_chain=chain1
receptor_chain=chain2
len1=len(chain_res[chain1])
len2=len(chain_res[chain2])
assert len1!=0, "%s chain has zero length!\n" % chain1
assert len2!=0, "%s chain has zero length!\n" % chain2
class1='ligand'
class2='receptor'
if(len(chain_sample[chain1]) > len(chain_sample[chain2])):
receptor_chain=chain1
ligand_chain=chain2
class1='receptor'
class2='ligand'
#print len1
#print len2
#print chain_sample.keys()
#Set to align on receptor
assert len(chain_ref[receptor_chain])==len(chain_sample[receptor_chain]), "Different number of atoms in native and model receptor (chain %c) %d %d\n" % (receptor_chain,len(chain_ref[receptor_chain]),len(chain_sample[receptor_chain]))
super_imposer.set_atoms(chain_ref[receptor_chain], chain_sample[receptor_chain])
super_imposer.apply(sample_model.get_atoms())
receptor_chain_rms=super_imposer.rms
#print receptor_chain_rms
#print dir(super_imposer)
#print chain1_rms
#Grep out the transformed ligand coords
#print ligand_chain
#print chain_ref[ligand_chain]
#print chain_sample[ligand_chain]
#l1=len(chain_ref[ligand_chain])
#l2=len(chain_sample[ligand_chain])
assert len(chain_ref[ligand_chain])!=0 or len(chain_sample[ligand_chain])!=0, "Zero number of equivalent atoms in native and model ligand (chain %s) %d %d.\nCheck that the residue numbers in model and native is consistent\n" % (ligand_chain,len(chain_ref[ligand_chain]),len(chain_sample[ligand_chain]))
assert len(chain_ref[ligand_chain])==len(chain_sample[ligand_chain]), "Different number of atoms in native and model ligand (chain %c) %d %d\n" % (ligand_chain,len(chain_ref[ligand_chain]),len(chain_sample[ligand_chain]))
coord1=np.array([atom.coord for atom in chain_ref[ligand_chain]])
coord2=np.array([atom.coord for atom in chain_sample[ligand_chain]])
#coord1=np.array([atom.coord for atom in chain_ref[receptor_chain]])
#coord2=np.array([atom.coord for atom in chain_sample[receptor_chain]])
#print len(coord1)
#print len(coord2)
sup=SVDSuperimposer()
Lrms = sup._rms(coord1,coord2) #using the private _rms function which does not superimpose