JLmol features a comprehensive editing suite for both 2D and 3D molecular structures, designed for chemists, educators, and researchers who need precise control and rapid prototyping. The editing tools are tightly integrated with the visualization engine for real-time feedback and seamless workflow.
JSME 2D Editor:
- Draw and edit molecules using a modern, touch-friendly interface.
- Standard tools: atom/bond placement, ring templates, eraser, clean-up, and undo/redo.
- Automatic conversion of 2D sketches to 3D coordinates for immediate visualization.
- Supports copy/paste of SMILES and other formats for rapid structure entry.
ModelKit 3D Editor:
- Directly manipulate atoms and bonds in 3D space with drag-and-drop.
- Automatic geometry optimization after each move for realistic structures.
- Add/delete atoms, change element types, modify bond orders, and create rings.
- Context menu (right-click) for advanced editing: atom properties, bond types, and more.
Enhanced XYZ Editor:
- Edit atomic coordinates in a spreadsheet-like interface.
- Live preview of changes in the 3D viewer as you type.
- Atom selection, drag-to-reorder, and batch editing supported.
- Save/export edited structures in multiple formats.
Two-Way Atom Selection:
- Click an atom in the 3D structure to select or deselect it (toggle); selected atoms are marked with halos.
- Click a row in the XYZ editor to do the same — the selection is mirrored between the 3D viewer and the XYZ editor in both directions.
- A live selection count and a Clear Selection button keep the current selection easy to manage.
- In the ElemCo.jl panel, Insert Selected Atoms inserts the selection as a 1-based index list (e.g.
[1, 3, 5]) at the cursor — handy for dummy atoms or active regions.
- The same selection drives constrained xtb optimization, where unselected atoms are frozen.
- Selection is cleared automatically when a new structure is loaded, and atom-clicking is disabled while the ModelKit 3D editor is active.
Technical Details:
- 2D/3D editors are synchronized: changes in one are reflected in the other.
- Geometry optimization uses built-in force fields for rapid minimization.
- Supports standard valence rules and error checking for chemical validity.
Best Practices & Troubleshooting:
- Use the 2D editor for quick sketches and the 3D editor for detailed conformational work.
- Optimize geometry after major edits to avoid unrealistic structures.
- If a structure fails to optimize, check for valence errors or overlapping atoms.
- Use the XYZ editor for precise coordinate adjustments or to import data from other sources.
References: