Skip to content

Name to Structure

Jeremiah edited this page Oct 22, 2026 · 1 revision

Name to Structure

This page explains how the OPSIN plugin turns a typed systematic chemical name into an editable structure through one undoable insertion.

Convert a name

The official Name to Structure (OPSIN) plugin is installed separately. OPSIN is a deterministic rule-based parser of systematic chemical nomenclature: it applies naming rules to the text you supply.

  1. Install the plugin using Installing and Updating Plugins.
  2. Choose Analyze → Structure from Name….
  3. Enter the chemical name in the host's text prompt.
  4. Confirm the prompt. The host parses the name, generates a two-dimensional layout, inserts the structure, and leaves it selected.
  5. Inspect the result, including charges, stereochemistry, and any warnings, before using it in a figure or calculation.

On macOS use the app-wide menu; on Windows use the document window's menu. The plugin contributes its menu entry after installation. The host also exposes the same installed command as Structure → Convert Name to Structure…. Cancelling the prompt does nothing to the document.

The conversion is local. ChemDraft bundles OPSIN and its Java runtime in desktop builds rather than asking the plugin to bring another parser or requiring a system Java installation. If the runtime is missing from a host build, the plugin reports engine unavailability and says the name was not sent anywhere.

Which names work

Systematic names are the intended input. Trade names, abbreviations, and many common names are outside OPSIN's coverage. There is no fuzzy match or nearest-name search: a failed parse must not become a structure for a vaguely similar string.

Try a simple systematic name such as ethanol to understand the workflow. For a complex name, retain stereochemical descriptors, locants, brackets, and charge information as intended. OPSIN interprets the name as written; it cannot establish what you meant to type.

A parser refusal says that the supplied text was not interpreted. It does not establish that the compound is impossible. The failure report includes the parser's own reason, such as the fragment it could not read. Correct that fragment rather than stripping chemical information until something happens to parse.

Why insertion needs no proposal review

ChemDraft distinguishes deterministic conversion of user-authored input from inferred chemistry. Here you supplied the name, and the parser applies rules to it. The plugin therefore uses a command-scoped document patch instead of opening a proposal-review window on success.

The plugin calls documents.applyPatch only while one of its own commands is running. The host commits one labelled undo entry and selects the inserted object. The direct patch route permits insertion through addObject and addAnnotation; modifying or removing existing content requires proposal review.

This permission does not give the plugin arbitrary access to application state. The host owns the document, the layout engine, and the application of the patch. Use Undo to remove the conversion if the typed name was wrong or the result was not what you intended. See Selection and Editing.

Permissions and their purpose

Permission Why this plugin declares it
chemistry.compute Ask the host to parse a name and lay out the resulting structure
native.execute Allow the host to start the bundled Java process used by OPSIN
document.read Lay out the new structure against the active document
document.write Insert through the command-scoped patch API
ui.menu Contribute the conversion command to the menu
ui.panel Show specific failure reports

chemistry.compute alone is insufficient: a chemistry capability that starts a process also requires native.execute. The plugin does not acquire unrestricted native-process execution by supplying an arbitrary command line; it requests the typed host capability.

Understand failures

Parsing, layout, and insertion are separate stages. If the host parses a name but cannot draw the result, the plugin can still show the SMILES. A layout failure is not a failed name conversion, and neither should be confused with a missing engine.

Reports are for these failures; successful insertion does not need a report window. If a host has no prompt UI, the plugin explains that limitation rather than failing silently. Keep any output warnings with the converted structure.

Name-to-structure conversion also differs from Name from Structure: generating a name for an existing drawing additionally requires exact structure read-back before that generated name is accepted.

See also

Clone this wiki locally