Flare 2.0 comes with a full-featured Python API which enables both high-level access to scientific functionality and low-level access to the graphical user interface and internal processes. In addition to Flare methods, you will have access to RDKit, NumPy, SciPy, and to virtually any other Python module that can be pip-installed. RDKit molecules are treated just as native Flare molecules, and can be loaded interchangeably to Flare’s ligand table. This means that you can generate a virtual 2D library using RDKit reaction SMARTS and then turn it into a 3D library of field-enabled Cresset molecules without ever leaving the Flare environment.
Additionally, if you realize that you often use a certain Python script as part of your Flare workflow, you may decide to associate it to a custom control in the Flare ribbon user interface, be it a button, a menu, or a complex dialog with signals and callback functions (Figure 1).
Figure 1. An example of the custom controls that can be added to the Flare ribbon.
Python commands can be loaded and executed in Flare in a number of different ways, ranging from highest automation to highest interactivity.
For example, when you need to carry out a completely automated task, such as overnight preparation of a panel of proteins followed by docking of several ligand series, the most convenient option is to write a Python script that runs outside the Flare GUI, such that it can be distributed on a cluster via a queueing system for maximum performance. This use case is covered by the pyflare binary, which is effectively a Python interpreter just as the familiar python binary, slightly modified to play well with the rest of the Flare ecosystem (Figure 2).
Figure 2. Running a Flare Python script outside Flare using the pyflare interpreter.
Figure 3. Entering simple one-liners in the Python Console widget.
Figure 4. Loading and editing a script in the Python Interpreter widget.
Figure 5. Visualizing text output and inline graphics in the Python QtConsole widget.
Figure 6. Running a Flare workflow inside a Jupyter Notebook outside the Flare GUI application.
For academic researchers, Flare is an opportunity to make their science more broadly accessible through integration into a user-friendly environment, while corporate users will appreciate the possibility to augment Flare capabilities with in-house REST services and tools. The possibility to code in Python taking advantage of the highly interactive experience provided by the Jupyter QtConsole and Notebook is a further incentive to make Flare the environment of choice for computational chemistry workflows.