本文整理匯總了Python中atom.Atom.tag方法的典型用法代碼示例。如果您正苦於以下問題:Python Atom.tag方法的具體用法?Python Atom.tag怎麽用?Python Atom.tag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類atom.Atom
的用法示例。
在下文中一共展示了Atom.tag方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: open
# 需要導入模塊: from atom import Atom [as 別名]
# 或者: from atom.Atom import tag [as 別名]
#Read .pdb file and create Atom objects with corresponding data from file
with open(pdbFilename) as pdbFile:
pdbLines = pdbFile.readlines()
for line in pdbLines:
words = str.split(line)
if len(words) < 1:
pass
elif words[0] == "ATOM":
newAtom = Atom()
newAtom.resID = words[1]
newAtom.atomName = words[2]
newAtom.resName = words[3]
newAtom.coordinates = [words[5], words[6], words[7]]
newAtom.bFactor = words[9]
newAtom.tag = words[10]
atoms.append(newAtom)
#Read .out file add corresponding mode data from file to existing Atom objects
##This asssumes a very regular formatting after the first VIBRATION keyword.
##It will produce incorrect output if lines are malformed, or if
##the VIBRATION keyword's first appearance is not directly before mode data.
with open(modeFilename) as modeFile:
modeLines = modeFile.readlines()
currentModeNumber = 0
currentModeFrequency = 0.0
for line in modeLines:
words = str.split(line)
if len(words) < 1: