Python-Based Interactive RDKit Molecule Editing with rdEditor

Esben Jannik Bjerrum,Kovas Palunas,Janosch Menke
DOI: https://doi.org/10.26434/chemrxiv-2024-jfhmw
2024-03-06
Abstract:RDKit is a widely used toolkit for cheminformatics, renowned for its fast C++ backend and versatile Python API. However, in many cases, users find themselves needing to create or edit molecules in external programs, as the majority prefer not to manipulate raw SMILES strings. Unfortunately, most available tools for this purpose are either proprietary, deprecated, or not Python-based. Here we introduce rdEditor, a molecular editor entirely written in Python 3 using PySide2 graphical user interface widgets. The application is programmed in an object-oriented fashion, and the custom PySide2 widgets can be easily reused in other applications. It's important to note that this application is an editor, not a drawing program. In other words, RDKit handles the layout of the molecule entirely, and the user interacts with the molecular graph object directly, rather than drawing on a canvas with subsequent conversion to molecular format. While reusing functionality from RDKit contributes to an efficient codebase, there are some drawbacks if end-users expect to have control over the precise placement of atoms. The code is released as open-source and is available on GitHub at: https://github.com/EBjerrum/rdEditor.
Chemistry
What problem does this paper attempt to address?
The paper introduces a Python molecule editor called rdEditor that aims to address the need for creating and editing molecules in the field of chemoinformatics within a Python environment. Existing tools are either proprietary software or outdated and not suitable for Python users. rdEditor utilizes the RDKit library for handling chemical information and builds a graphical interface using PySide2, providing reusable components. Although it limits control over precise atomic positions, as an object-based editor, it simplifies interaction with molecular graph objects instead of traditional canvas drawing. The source code of rdEditor is open and suitable for developers who need to integrate molecular editing capabilities into complex workflows or small cheminformatics applications.