• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python stringSelector.CompoundStringSelector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中MolKit.stringSelector.CompoundStringSelector的典型用法代码示例。如果您正苦于以下问题:Python CompoundStringSelector类的具体用法?Python CompoundStringSelector怎么用?Python CompoundStringSelector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: test_select_add_mols_allAtoms

 def test_select_add_mols_allAtoms(self):
     """
     test selecting with stringRepr of atoms of added mols
     """
     stringSel = CompoundStringSelector()
     selString = self.mols.allAtoms.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, self.mols.allAtoms)
     self.assertEquals(selString, "stringSel:::/+/protease:::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:9,代码来源:test_stringSelector.py


示例2: test_select_subtract_mols

 def test_select_subtract_mols(self):
     """
     test selecting with stringRepr of subtracted mols
     """
     stringSel = CompoundStringSelector()
     diff_mols = self.mols - self.mols1
     selString = diff_mols.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_mols)
     self.assertEquals(selString, "stringSel/+/protease/-/stringSel")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:10,代码来源:test_stringSelector.py


示例3: test_select_subtract_allAtoms

 def test_select_subtract_allAtoms(self):
     """
     test selecting with stringRepr of subtracted allAtoms
     """
     stringSel = CompoundStringSelector()
     diff_atoms = self.mols.allAtoms - self.mols1.allAtoms
     selString = diff_atoms.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_atoms)
     self.assertEquals(selString, "stringSel:::/+/protease:::/-/stringSel:::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:10,代码来源:test_stringSelector.py


示例4: test_select_subtract_residues

 def test_select_subtract_residues(self):
     """
     test selecting with stringRepr of subtracted residues
     """
     stringSel = CompoundStringSelector()
     diff_residues = self.mols.chains.residues - self.mols1.chains.residues
     selString = diff_residues.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_residues)
     self.assertEquals(selString, "stringSel::/+/protease::/-/stringSel::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:10,代码来源:test_stringSelector.py


示例5: test_select_union_atoms_all

 def test_select_union_atoms_all(self):
     """
     test selecting with stringRepr of union 2X atoms returning single copy
     """
     stringSel = CompoundStringSelector()
     diff_atoms = self.mols1.chains.residues.atoms | self.mols1.chains.residues.atoms
     selString = diff_atoms.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_atoms)
     self.assertEquals(selected, self.mols1.chains.residues.atoms)
     self.assertEquals(selString, "stringSel:::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例6: test_select_union_mols_single

 def test_select_union_mols_single(self):
     """
     test selecting with stringRepr of union 2X same mols returning single
     """
     stringSel = CompoundStringSelector()
     diff_mols = self.mols1 | self.mols1
     selString = diff_mols.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_mols)
     self.assertEquals(selected, self.mols1)
     self.assertEquals(selString, "stringSel")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例7: test_select_intersect_residues_empty

 def test_select_intersect_residues_empty(self):
     """
     test selecting with stringRepr of empty intersected residues
     """
     stringSel = CompoundStringSelector()
     diff_residues = self.mols1.chains.residues & self.mols2.chains.residues
     selString = diff_residues.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_residues)
     self.assertEquals(selected, ResidueSet())
     self.assertEquals(selString, "stringSel::/&/protease::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例8: test_select_xor_chains

 def test_select_xor_chains(self):
     """
     test selecting with stringRepr of xor chains
     """
     stringSel = CompoundStringSelector()
     diff_chains = self.mols.chains ^ self.mols1.chains
     selString = diff_chains.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_chains)
     self.assertEquals(selected, self.mols2.chains)
     self.assertEquals(selString, "stringSel:/+/protease:/^/stringSel:")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例9: test_select_xor_allAtoms_all

 def test_select_xor_allAtoms_all(self):
     """
     test selecting with stringRepr of xor allAtoms returning all
     """
     stringSel = CompoundStringSelector()
     diff_atoms = self.mols1.allAtoms ^ self.mols2.allAtoms
     selString = diff_atoms.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_atoms)
     self.assertEquals(selected, self.mols.allAtoms)
     self.assertEquals(selString, "stringSel:::/^/protease:::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例10: test_select_xor_mols_all

 def test_select_xor_mols_all(self):
     """
     test selecting with stringRepr of xor mols returning all
     """
     stringSel = CompoundStringSelector()
     diff_mols = self.mols1 ^ self.mols2
     selString = diff_mols.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_mols)
     self.assertEquals(selected, self.mols)
     self.assertEquals(selString, "stringSel/^/protease")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例11: test_select_xor_residues_all

 def test_select_xor_residues_all(self):
     """
     test selecting with stringRepr of xor residues returning all
     """
     stringSel = CompoundStringSelector()
     diff_residues = self.mols1.chains.residues ^ self.mols2.chains.residues
     selString = diff_residues.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_residues)
     self.assertEquals(selected, self.mols.chains.residues)
     self.assertEquals(selString, "stringSel::/^/protease::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例12: test_select_intersect_allAtoms

 def test_select_intersect_allAtoms(self):
     """
     test selecting with stringRepr of intersected allAtoms
     """
     stringSel = CompoundStringSelector()
     diff_atoms = self.mols1.allAtoms & self.mols2.allAtoms
     selString = diff_atoms.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_atoms)
     self.assertEquals(selected, AtomSet())
     self.assertEquals(selString, "stringSel:::/&/protease:::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例13: test_select_xor_atoms

 def test_select_xor_atoms(self):
     """
     test selecting with stringRepr of xor atoms
     """
     stringSel = CompoundStringSelector()
     diff_atoms = self.mols.chains.residues.atoms ^ self.mols1.chains.residues.atoms
     selString = diff_atoms.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_atoms)
     self.assertEquals(selected, self.mols2.chains.residues.atoms)
     self.assertEquals(selString, "stringSel:::/+/protease:::/^/stringSel:::")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例14: test_select_intersect_chains_empty

 def test_select_intersect_chains_empty(self):
     """
     test selecting with stringRepr of empty intersected chains
     """
     stringSel = CompoundStringSelector()
     diff_chains = self.mols1.chains & self.mols2.chains
     selString = diff_chains.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_chains)
     self.assertEquals(selected, ChainSet())
     self.assertEquals(selString, "stringSel:/&/protease:")
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例15: test_select_intersect_mols_empty

 def test_select_intersect_mols_empty(self):
     """
     test selecting with stringRepr of empty intersect mols
     """
     stringSel = CompoundStringSelector()
     diff_mols = self.mols1 & self.mols2
     selString = diff_mols.stringRepr
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     self.assertEquals(selected, diff_mols)
     self.assertEquals(selString, "stringSel/&/protease")
     self.assertEquals(selected, ProteinSet())
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:11,代码来源:test_stringSelector.py


示例16: test_select_subset_chains

 def test_select_subset_chains(self):
     """
     test selecting with stringRepr of subset of chains
     """
     stringSel = CompoundStringSelector()
     diff_chains = self.mols.chains.get('B')
     selString = "(stringSel:/+/protease:\\s\\B)"
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     #selected, msg = stringSel.select(self.mols, selString)
     self.assertEquals(selected, diff_chains)
     self.assertEquals(selected, self.mols.chains[-1:])
     self.assertEquals(selected.stringRepr, selString)
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:12,代码来源:test_stringSelector.py


示例17: test_select_subset_mols

 def test_select_subset_mols(self):
     """
     test selecting with stringRepr for subset
     """
     stringSel = CompoundStringSelector()
     diff_mols = self.mols[-1:]
     selString = "(stringSel/+/protease\\s\\protease)"
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     #selected, msg = stringSel.select(self.mols, selString)
     self.assertEquals(selected, diff_mols)
     self.assertEquals(selected, self.mols[-1:])
     self.assertEquals(selected.stringRepr, selString)
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:12,代码来源:test_stringSelector.py


示例18: test_select_subset_allAtoms

 def test_select_subset_allAtoms(self):
     """
     test selecting with stringRepr of subset allAtoms
     select the first atom in protease from mols.allAtoms
     """
     stringSel = CompoundStringSelector()
     diff_atoms = self.mols.allAtoms.get('0')
     selString = "(stringSel:::/+/protease:::\\s\\0)"
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     #selected, msg = stringSel.select(self.mols, selString)
     self.assertEquals(selected, diff_atoms)
     self.assertEquals(selected, self.mols.allAtoms[0:1])
     self.assertEquals(selected.stringRepr,  selString)
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:13,代码来源:test_stringSelector.py


示例19: test_select_subset_residues

 def test_select_subset_residues(self):
     """
     test selecting with stringRepr of subset residues
     """
     stringSel = CompoundStringSelector()
     #this is the name of the 7th residue in the first molecule
     diff_residues = self.mols.chains.residues.get("HOH617")
     selString = "(stringSel::/+/protease::\\s\\HOH617)"
     selected, msg = stringSel.select(self.mols, selString, returnMsg=True)
     #selected, msg = stringSel.select(self.mols, selString)
     self.assertEquals(selected, diff_residues)
     self.assertEquals(selected, self.mols.chains.residues[7:8])
     self.assertEquals(selected.stringRepr, selString)
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:13,代码来源:test_stringSelector.py


示例20: test_select_set_from_string

 def test_select_set_from_string(self):
     """
      test result using key into Sets
     """
     sets = Sets()
     subset = self.mols.allAtoms[:3]
     set_name = 'first_three_atoms'
     sets.add(set_name, subset)
     selString = ':::' + set_name
     css = CompoundStringSelector()
     result, msg = css.select(self.mols, selString, sets=sets)
     self.assertEqual(result, subset)
     self.assertEquals(result.stringRepr, selString)
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:13,代码来源:test_stringSelector.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python process.client函数代码示例发布时间:2022-05-24
下一篇:
Python molecule.AtomSet类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap