本文整理汇总了Python中Biskit.PDBModel.profile方法的典型用法代码示例。如果您正苦于以下问题:Python PDBModel.profile方法的具体用法?Python PDBModel.profile怎么用?Python PDBModel.profile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Biskit.PDBModel
的用法示例。
在下文中一共展示了PDBModel.profile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LongTest
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import profile [as 别名]
class LongTest( BT.BiskitTest ):
TAGS = [ BT.EXE, BT.LONG ]
def prepare(self):
from Biskit import PDBModel
self.f = T.testRoot() + '/com/1BGS.pdb'
self.M = PDBModel( self.f )
self.M = self.M.compress( self.M.maskProtein() )
self.d = PDBDope( self.M )
def test_conservation(self):
"""PDBDope.addConservation (Hmmer) test"""
if self.local: print "Adding conservation data...",
self.d.addConservation()
if self.local: print 'Done.'
## display in Pymol
if self.local:
print "Starting PyMol..."
from Biskit.Pymoler import Pymoler
pm = Pymoler()
pm.addPdb( self.M, 'm' )
pm.colorAtoms( 'm', N.clip(self.M.profile('cons_ent'), 0.0, 100.0) )
pm.show()
def test_delphi(self):
"""PDBDope.addDelphi test"""
if self.local:
self.log.add( 'Calculating Delphi electrostatic potential' )
self.log.add( '' )
self.d.addDelphi( scale=1.2 )
self.assertAlmostEqual( self.M['delphi']['scharge'], 0.95, 1 )
示例2: main
# 需要导入模块: from Biskit import PDBModel [as 别名]
# 或者: from Biskit.PDBModel import profile [as 别名]
def main(options):
##################
## files and names
receptorName = absfile(options['r'])
receptorCode = stripFilename(receptorName)[0:4]
ligandName = absfile(options['l'])
ligandCode = stripFilename(ligandName)[0:4]
complexName = absfile(options['c'])
rm = options['rm']
lm = options['lm']
if rm or lm:
rn = rm or '1'
ln = lm or '1'
baseName = receptorCode + '_' + rn + '-' + ligandCode + '_' + ln
else:
baseName = receptorCode + '-' + ligandCode
## hex macro name
macName = baseName + '_hex.mac'
## hex rotation matrix output name
outName_all = baseName + '_hex.out'
outName_clust = baseName + '_hex_cluster.out'
## load model dictionaries, if they exist in the same directory
## as the corresponding pdb-file and start with the same pdb-code
## and ends with '_model.dic'
try:
rec_dic = stripFilename(options['r'])[:4] + '_model.dic'
rec_path = options['r'][:options['r'].rfind('/')]
lig_dic = stripFilename(options['l'])[:4] + '_model.dic'
lig_path = options['l'][:options['l'].rfind('/')]
rec = load( absfile(rec_path + '/' + rec_dic) )
lig = load( absfile(lig_path + '/' + lig_dic) )
print 'Loading dictionaries'
if type(rec) is dict:
rec = rec[1]
if type(lig) is dict:
lig = lig[1]
## could not load dictionaty, will load pdb-file insted
except:
print 'Loading pdb files'
rec = PDBModel(receptorName)
lig = PDBModel(ligandName)
#############################
## get structural information
## add surface profiles if not there
if not rec.atoms.has_key('relASA'):
flushPrint('\nCalculating receptor surface profile')
rec_asa = PDBDope( rec )
rec_asa.addASA()
if not lig.atoms.has_key('relASA'):
flushPrint('\nCalculating ligand surface profile')
lig_asa = PDBDope( lig )
lig_asa.addASA()
## surface masks, > 95% exposed
rec_surf_mask = greater( rec.profile('relASA'), 95 )
lig_surf_mask = greater( lig.profile('relASA'), 95 )
## maximun and medisn distance from centre of mass to any surface atom
recMax, recMin = centerSurfDist( rec, rec_surf_mask )
ligMax, ligMin = centerSurfDist( lig, lig_surf_mask )
## approxinate max and min center to centre distance
maxDist = recMax + ligMax
minDist = recMin + ligMin
print '\n\nReceptor and ligand max radius are %i and %i A, respectively.'\
%( recMax, ligMax )
print 'Receptor and ligand min radius are %i and %i A, respectively.'\
%( recMin, ligMin )
## molecular separation and search range to be used in the docking
molSep = ( maxDist + minDist ) / 2
molRange = 2 * ( maxDist - molSep )
print 'A molecular separation of %i A and a search range of +-%i will be used.'\
%( molSep, molRange )
## determine docking mode to use
macroDocking = 0
if recMax > 30 and ligMax > 30:
print '\nWARNING! Both the receptor and ligand radius is greater than 30 A.\n'
if recMax > 30:
print '\nReceptor has a radius that exceeds 30 A -> Macro docking will be used'
macroDocking = 1
#.........这里部分代码省略.........