本文整理匯總了Python中ParmedTools.ParmedActions.printdetails方法的典型用法代碼示例。如果您正苦於以下問題:Python ParmedActions.printdetails方法的具體用法?Python ParmedActions.printdetails怎麽用?Python ParmedActions.printdetails使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ParmedTools.ParmedActions
的用法示例。
在下文中一共展示了ParmedActions.printdetails方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: printdetails
# 需要導入模塊: from ParmedTools import ParmedActions [as 別名]
# 或者: from ParmedTools.ParmedActions import printdetails [as 別名]
def printdetails(root, amber_prmtop, messages):
""" Prints details about a given Amber mask """
title = 'Print Details'
mask = StringVar()
cmd_window = Toplevel(root)
cmd_window.title(title)
mask_entry = _guiwidgets.MaskEntry(cmd_window, amber_prmtop,
'Input an Amber Mask', mask, cmd_window)
mask_entry.config(pady=10)
mask_entry.grid(row=0, column=0, sticky=N+E+S+W)
button = Button(cmd_window, text='OK / Quit', command=cmd_window.destroy)
button.grid(row=1, column=0, sticky=N+E+S+W)
cmd_window.wait_window()
if not mask.get(): return
# Print our mask
window = Toplevel(root)
window.resizable(True, True)
window.title('Atom information for mask %s' % mask.get())
text = _guiwidgets.ExitingScrollText(window, None, spacing3=5, padx=5,
pady=5, width=100, height=20)
text.pack(fill=BOTH, expand=1)
action = ParmedActions.printdetails(amber_prmtop, mask.get())
text.write(action)
messages.write('Printed Amber Mask details on [%s]\n' % mask.get())
window.wait_window()