本文整理汇总了Python中Biskit.PDBModel.clone方法的典型用法代码示例。如果您正苦于以下问题:Python PDBModel.clone方法的具体用法?Python PDBModel.clone怎么用?Python PDBModel.clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Biskit.PDBModel
的用法示例。
在下文中一共展示了PDBModel.clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Test
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import clone [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)