The Flare Python API enables computational chemists to automate common tasks in the GUI and access Flare science from the command line. However, it is most powerful when used to connect Flare to external systems, either to push results from Flare or to pull in external data into the application for processing using Flare’s extensive scientific methods. I discuss this use case in more detail using existing Flare Python extensions (from our GitLab repository) and a new set of extensions that enable Flare to push and pull molecules directly to and from the Torx™ small molecule discovery platform.
Highly flexible customized menus
The Python API in Flare has a relatively simple structure for the novice Python scripter, enabling those with little Python knowledge to automate simple tasks in the Flare GUI. However, it also has great depth. It gives access to many of the building blocks of the application such as modal dialog boxes, widgets and context menus that provide an opportunity for Python developers to create rich integrations for other systems. Examples that demonstrate much of this utility are provided in a Flare extension that provides a Developer menu entry (Figure 1).
Figure 1: An example Flare extension that demonstrates the wide range of GUI features that can be included through the Flare Python API.
Connecting Flare and Torx using the Flare Python API
We use the Python API ourselves to enable Flare to interact with Torx. Torx Design™ enables research chemists to dock or align molecules to proteins or other active ligands. It is a collaborative environment that promotes sharing of ideas and information across multi-site teams. The computational capabilities of Torx Design are deliberately light and accessible rather than comprehensive as in Flare. However, by connecting Torx to Flare you can use robust, advanced computational techniques and share the results with team members.
The new Torx menu is used to connect the two platforms (Figure 2). Just as in the Developer example above, this is achieved through adding a Python extension to a user location. Flare detects the extension and displays the menu. Menu entries can be customized to include specific icons, have direct actions or display complex widgets.
Figure 2: New Torx menu in Flare Python API.
For example, the Fetch Designs menu entry displays a complex widget that enables the user to retrieve molecules from Torx using multiple criteria such as date created, user, and design set (Figure 3). Meta data is then added into Flare along with the newly fetched molecules. The widget was relatively straightforward to design and code using the Qt Designer application that provides a GUI to create the widget, which is then converted into the necessary XML that is loaded into the extension through a simple Python method call. This combination of GUI designer and simple Python method call makes it possible to code almost anything within the Flare environment.
Figure 3: Fetch Designs menu accessible from the Torx menu in Flare Python API.
Request evaluation to see how you can work more efficiently
The Flare Python API enables research scientists and IT professionals to integrate Flare into existing systems, incorporate external data into Flare or create new scientific methods. By doing so, drug discovery teams will be able to create their own workflows and automate common tasks, enabling them to work more efficiently to advance your project. Request an evaluation of Flare.