本文整理汇总了Python中Biskit.PDBModel.takeChains方法的典型用法代码示例。如果您正苦于以下问题:Python PDBModel.takeChains方法的具体用法?Python PDBModel.takeChains怎么用?Python PDBModel.takeChains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Biskit.PDBModel
的用法示例。
在下文中一共展示了PDBModel.takeChains方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Test
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import takeChains [as 别名]
class Test(BT.BiskitTest):
"""Test class"""
TAGS = [ BT.EXE, BT.LONG ]
def test_bindingE( self ):
"""bindingEnergyDelphi test (Barnase:Barstar)"""
self.com = T.load( T.testRoot() + '/com/ref.complex' )
self.dG = DelphiBindingEnergy( self.com, log=self.log, scale=1.2,
verbose=self.local )
self.r = self.dG.run()
self.assertAlmostEqual( self.r['dG_kt'], 21., 0 )
if self.local:
self.log.add(
'\nFinal result: dG = %3.2f kcal/mol'%self.r['dG_kcal'])
def test_errorcase1( self ):
"""bindinEnergyDelphi test (error case 01)"""
self.m = PDBModel( T.testRoot() + '/delphi/case01.pdb' )
rec = self.m.takeChains( [0,1] )
lig = self.m.takeChains( [2] )
self.com = Complex( rec, lig )
self.dG = DelphiBindingEnergy( self.com, log = self.log, scale=0.5,
verbose=self.local )
self.r = self.dG.run()
if self.local:
self.log.add(
'\nFinal result: dG = %3.2f kcal/mol'%self.r['dG_kcal'])
示例2: inputComplex
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import takeChains [as 别名]
def inputComplex( options ):
if 'c' in options:
return T.load( T.absfile( options['c'] ) )
m = PDBModel( T.absfile( options['i'] ) )
## extract rec and lig chains
rec_chains = T.toIntList( options['r'] )
lig_chains = T.toIntList( options['l'] )
rec = m.takeChains( rec_chains )
lig = m.takeChains( lig_chains )
## create Protein complex
com = Complex( rec, lig )
return com
示例3: _use
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import takeChains [as 别名]
_use()
options = cmdDict( {} )
f1 = absfile( options['i1'] )
f2 = absfile( options['i2'] )
o1 = absfile( options['o1'] )
o2 = absfile( options['o2'] )
errWriteln("loading pdbs...")
m1 = PDBModel( f1 )
m2 = PDBModel( f2 )
if options.has_key('c1'):
m1 = m1.takeChains( toIntList( options['c1'] ) )
if options.has_key('c2'):
m2 = m2.takeChains( toIntList( options['c2'] ) )
m1.removeRes( 'TIP3' )
m2.removeRes( 'TIP3' )
m1.sort()
m2.sort()
errWriteln("compare atoms of pdbs...")
mask1, mask2 = m1.equalAtoms( m2 )
errWriteln("removing %i atoms from %s" % (sum( logical_not( mask1 ) ), f1))
m1.remove( logical_not( mask1 ) )