本文整理汇总了Python中Biskit.PDBModel.remove方法的典型用法代码示例。如果您正苦于以下问题:Python PDBModel.remove方法的具体用法?Python PDBModel.remove怎么用?Python PDBModel.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Biskit.PDBModel
的用法示例。
在下文中一共展示了PDBModel.remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: parseReference
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import remove [as 别名]
def parseReference(self, fpdb, dry_out=None ):
flushPrint("parsing "+fpdb+"...")
m = PDBModel( fpdb )
solute_res = m.atom2resMask( logical_not( m.maskSolvent() ) )
self.lenres = self.lenres or sum( solute_res )
self.lenatoms = len( m ) - sum( m.maskH2O() )
if dry_out:
m.remove( m.maskH2O() )
m.writePdb( dry_out )
flushPrint('done.\n')
示例2: Test
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import remove [as 别名]
class Test(BT.BiskitTest):
"""Test class"""
def test_reduce( self ):
"""AtomCharger test"""
if self.local: self.log.add('\nLoading PDB...')
self.m1 = PDBModel( T.testRoot( 'lig/1A19_dry.model' ) )
self.m2 = T.load( T.testRoot( 'com/ref.complex' ) )
self.m2 = self.m2.model()
if self.local: self.log.add('\nRunning Reduce...')
self.x = Reduce( self.m1, debug=self.DEBUG, verbose=self.local,
log=self.log,
autocap=True )
self.m1 = self.x.run()
if self.local:
self.log.add('\nReduce protein complex')
self.x = Reduce( self.m2, debug=self.DEBUG, verbose=self.local,
log=self.log,
autocap=True )
self.m2 = self.x.run()
if self.local:
self.log.add('\nSetup Residue Library\n')
ac = AtomCharger(log=self.log, verbose=self.local)
if self.local:
self.log.add('match residues to Amber topology')
ac.charge( self.m1 )
ac.charge( self.m2 )
self.assertAlmostEqual( N.sum(self.m1['partial_charge']), -6, 2 )
self.assertAlmostEqual( N.sum(self.m2['partial_charge']), -4, 2 )
self.assert_(N.all(self.m1['partial_charge'] != 0),'unmatched atoms 1')
self.assert_(N.all(self.m2['partial_charge'] != 0),'unmatched atoms 2')
if self.local:
self.log.add('\nNow test handling of atom miss-matches:\n')
self.m3 = PDBModel(self.m1.clone())
self.m3.remove( [0,3,100,101,102,200] )
ac.charge( self.m3 )
self.assertAlmostEqual( N.sum(self.m3['partial_charge']),-8.21, 2)
示例3: errWriteln
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import remove [as 别名]
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 ) )
errWriteln("removing %i atoms from %s" % (sum( logical_not( mask2 ) ), f2))
m2.remove( logical_not( mask2 ) )
errWriteln("writing new pdbs..." )
m1.writePdb( o1 )
m2.writePdb( o2 )