I am looking to write a script to be called via the Mercury scripts menu that will ask the user for some input and use this to do something with a structure loaded in Mercury. Any ideas on best way to do this? PyQT vs. Tkinter?



There is a good overview in general of the link between Mercury and the CSD Python API within the Mercury documentation that you can access online here:

Mercury documentation (CSD Python API section)

I would probably suggest looking at one of the existing scripts that comes with Mercury though. The "chemical_name_search.py" which you can find under the CSD Python API > Searches menu contains a useful illustration of this type of interaction. That chemical name searching script uses a little Tkinter user prompt to gather input from the user. You can probably just cut-and-paste a section of the Python for your application.

Hope that helps!


You must be signed in to post in this forum.