本文整理汇总了Python中htmd.molecule.molecule.Molecule._checkInsertions方法的典型用法代码示例。如果您正苦于以下问题:Python Molecule._checkInsertions方法的具体用法?Python Molecule._checkInsertions怎么用?Python Molecule._checkInsertions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类htmd.molecule.molecule.Molecule
的用法示例。
在下文中一共展示了Molecule._checkInsertions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: home
# 需要导入模块: from htmd.molecule.molecule import Molecule [as 别名]
# 或者: from htmd.molecule.molecule.Molecule import _checkInsertions [as 别名]
from htmd.util import tempname, assertSameAsReferenceDir
from htmd.builder.preparation import proteinPrepare
import os
from glob import glob
import numpy as np
# Use pre-prepared files so we can tell whether the error is in prepare or in build
# Inputs are reference outputs of proteinprepare.
preparedInputDir = home(dataDir='test-proteinprepare')
pdbids = ['3PTB', '1A25', '1GZM', '1U5U']
for pdb in pdbids:
inFile = os.path.join(preparedInputDir, pdb, "{}-prepared.pdb".format(pdb))
mol = Molecule(inFile)
mol.filter('protein') # Fix for bad proteinPrepare hydrogen placing
if mol._checkInsertions():
mol.renumberResidues()
np.random.seed(1) # Needed for ions
smol = solvate(mol)
topos = ['top/top_all36_prot.rtf', 'top/top_water_ions.rtf']
params = ['par/par_all36_prot_mod.prm', 'par/par_water_ions.prm']
tmpdir = tempname()
bmol = build(smol, topo=topos, param=params, outdir=tmpdir)
compareDir = home(dataDir=os.path.join('test-charmm-build', pdb))
assertSameAsReferenceDir(compareDir, tmpdir)
shutil.rmtree(tmpdir)
from htmd.ui import *