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


Python PDBModel.maskHeavy方法代码示例

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


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

示例1: test_Whatif

# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import maskHeavy [as 别名]
    def test_Whatif(self):
        """Whatif test"""

        from Biskit import PDBModel

        ## Loading PDB...

        f = T.testRoot()+"/com/1BGS.pdb"
        m = PDBModel(f)

        m = m.compress( m.maskProtein() )
        m = m.compress( m.maskHeavy() )

        ## Starting WhatIf
        x = WhatIf( m, debug=0, verbose=0 )

        ## Running
        atomAcc, resAcc, resMask = x.run()

        if self.local:
            ## check that model hasn't changed
            m_ref = PDBModel(f)
            m_ref = m.compress( m.maskProtein() )
            for k in m_ref.atoms.keys():
                if not N0.all(m_ref[k] == m[k]):
                    print 'Not equal ', k
                else:
                    print 'Equal ', k

            ## display exposed residues in PyMol
            from Pymoler import Pymoler
            pm = Pymoler()
            model = pm.addPdb( m, '1' )
            pm.colorRes( '1', resAcc[:,0] )
            pm.show()

            print "\nResult for first 10 atoms/residues: "
            print '\nAccessability (A^2):\n', atomAcc[:10]
            print '\nResidue accessability (A^2)'
            print '[total, backbone, sidechain]:\n', resAcc[:10]
            print '\nExposed residue mask:\n',resMask[:10]
            print '\nTotal atom    accessability (A^2): %.2f'%sum(atomAcc) 
            print '      residue accessability (A^2): %.2f'%sum(resAcc)[0]

        self.assertAlmostEqual( N0.sum(resAcc[:,0]), 2814.6903, 7 ) 
开发者ID:graik,项目名称:biskit,代码行数:47,代码来源:WhatIf.py

示例2: Test

# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import maskHeavy [as 别名]
class Test(BT.BiskitTest):
    """Test case"""

    def test_surfaceRacerTools(self):
        """surfaceRacerTools test"""
        from Biskit import PDBModel
        import Biskit.tools as T
        
        ## load a structure
        self.m = PDBModel( T.testRoot()+'/lig/1A19.pdb' )
        self.m = self.m.compress( self.m.maskProtein() )
        self.m = self.m.compress( self.m.maskHeavy() )
        
        ## some fake surface data
        surf = Numeric.ones( self.m.lenAtoms()) * 10.0

        relExp = relExposure( self.m, surf )
        
##         if self.local:
##             globals().update( locals() )
            
        self.assertEqual( Numeric.sum(relExp), 44276.860852223857 )
开发者ID:ostrokach,项目名称:biskit,代码行数:24,代码来源:surfaceRacerTools.py


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