Simple RDKit molecule editor GUI using PySide
LGPL-3.0 License
Simple RDKit molecule editor GUI using PySide6
RDKit, NumPy, PySide6 and pyqtdarktheme should be automatically installed when installed via pip.
pip install rdeditor
A launch script will also be added so that it can be started from the command line via the rdEditor
command.
Can be started from the command line with rdEditor
or rdEditor your_molecule.mol
to start edit an existing molecule.
Interactions with the molecule are done via clicking and dragging on the canvas, atoms or bonds. A choice of tools is available.
To edit a molecule, select the pen tool, and an atom, bond or template type and click on the canvas to add it.
Clicking:
Dragging:
Templates:
Other actions:
From left to right
Open: Open a molfile
Save: Save current molecule
Save As: Save current molecule with a new name
Arrow: Select tool. Click on an atom to select it, click on the canvas to deselect. Clicking on multiple atoms one after another will select them, but only the lastly clicked one will be highlighted in red and used for operations, such as bond creation to another existing atom.
Pen: Add tool. Clicking on an existing atom will add the current selected atom type to that atom with a single bond. Clicking on the canvas will add a disconnected atom. Clicking on a bond will cycle through single, double and triple bonds.
R/S: Change the stereo chemistry of the selected atom
E/Z: Change E/Z stereo of double bonds
Increase/Decrease charge: Will increase or decrease the charge of the atom clicked
Set atommap or R-group number: Will set the atommap or R-group number of the atom clicked
clean up coordinates: recalculate coordinates disregarding existing coordinates.
clean up chemistry. Sanitize and/or Kekulize the molecule.
Delete atom/bond:
Clear Canvas
Undo.
Most commonly used bond types, and atom types can be selected. Templates and R-group (dummy atoms) are also accessible. A Periodic table is accessible for exotic atom types.
Access to all standard operations as well as less used atom types and bond-types.
Themes can be selected from the ones available on your platform (Mac/Linux/Windows).
The debug level can be selected
Cleanup settings can be selected if the molecule should be sanitized or kekulized during cleanup.
Instructions to set it up in editable modes and instructions for eventual contributions can be found in the DEVELOPER.md file. Please reach out first, there may be a relevant development branch.
I wrote a blog post with an overview of the structure of the code. https://www.wildcardconsulting.dk/rdeditor-an-open-source-molecular-editor-based-using-python-pyside2-and-rdkit/
We also published a preprint on ChemRxiv: https://chemrxiv.org/engage/chemrxiv/article-details/65e6dcfa9138d23161b2979c
Please report issues at GitHub, it's tough getting all corners of a GUI tested.