Custom Molecular Visualization Tools Can Be Built in Python Using PyMOL
PyMOL can bind key presses and mouse clicks to run external Python programs and subroutines.
External applications can run as a separate Python threads and can make asynchronous calls to the PyMOL API.
PyMOL’s built-in GUIs can be disabled so that a custom GUI can take control.