本文整理汇总了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())