本文整理匯總了Python中ParmedTools.ParmedActions.printinfo方法的典型用法代碼示例。如果您正苦於以下問題:Python ParmedActions.printinfo方法的具體用法?Python ParmedActions.printinfo怎麽用?Python ParmedActions.printinfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ParmedTools.ParmedActions
的用法示例。
在下文中一共展示了ParmedActions.printinfo方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: printinfo
# 需要導入模塊: from ParmedTools import ParmedActions [as 別名]
# 或者: from ParmedTools.ParmedActions import printinfo [as 別名]
def printinfo(root, amber_prmtop, messages):
""" Prints all of the info in a given FLAG """
# Set up the window
# variables we need for printInfo
widget_list = [('Entry', '%FLAG you want info from')]
# Variable list -- we need a single string
var_list = [StringVar()]
# description
description = ' '.join(ParmedActions.printinfo.__doc__.split())
cmd_window = _guiwidgets.ActionWindow('printInfo', amber_prmtop,
widget_list, var_list, description)
cmd_window.wait_window()
# Make sure we didn't cancel (or just press OK with no input), or just leave
var = var_list[0].get()
if not var: return
# Now that we did something, do it
action = ParmedActions.printinfo(amber_prmtop, ArgumentList(var))
if not action.found:
showerror('Not Found!', '%%FLAG %s not found!' % var.upper())
return
window = Toplevel(root)
window.resizable(True, True)
window.title('%%FLAG %s Info in %s' % (var.upper(), amber_prmtop))
text = _guiwidgets.ExitingScrollText(window, None, spacing3=5, padx=5,
pady=5, width=82, height=20)
text.write(action)
text.pack(fill=BOTH, expand=1)
window.wait_window()
messages.write('Wrote info for flag %s\n' % var.upper())