Import XYZ
The XYZ importer takes the Cartesian coordinates produced by a computational chemistry job (or any .xyz file) and builds a clean 2D structure from them. It works out which atoms are bonded, what the bond orders are, and how to lay the molecule out flat, so you get an editable drawing rather than a flattened 3D projection.
Opening the importer
Two ways open the same dialog:
- Choose
File>Import XYZ...from the menu bar. - Click the XYZ button in the action bar, just left of the Templates button.
There is no keyboard shortcut, but you can also reach it from the command palette (Ctrl+K) by searching for “Import XYZ”.
The dialog
The dialog is titled Import XYZ coordinates and you can drag it by its title bar. Paste your coordinates into the text box. There is no file picker; copy the contents of your .xyz file and paste them in.
Press Ctrl+Enter (or Cmd+Enter) to import, or click Import. Cancel or Escape closes the dialog. If nothing in the box parses as coordinates, the box border turns red and prompts you for El x y z lines; the import does nothing until the text is valid.
Options
Three checkboxes control what the imported structure shows:
- Show explicit hydrogens (off by default). Left off, you get a skeletal, bond-line drawing with hydrogens folded into their heavy atoms. Turned on, every hydrogen in the file is drawn as its own atom.
- Show stereochemistry (on by default). Adds wedge and dash bonds at stereocenters so the flat drawing conveys the 3D chirality of the original geometry. It applies to the skeletal depiction, so it is unavailable, and greyed out, when explicit hydrogens are shown.
- Show lone pairs (off by default). Places lone pairs at idealized VSEPR positions, such as the two on water’s oxygen or the one on ammonia’s nitrogen.
What the importer works out
The geometry alone does not say which atoms are bonded or how, so the importer perceives the chemistry from the atom positions:
- Bonds come from interatomic distances, using tabulated covalent radii. Two atoms are bonded when they sit closer than a fixed multiple of the sum of their radii.
- Bond orders (single, double, triple) are assigned by satisfying each atom’s expected valence. Benzene, for example, comes in as a Kekule ring of alternating double bonds.
- 2D layout is drawn fresh from the perceived connectivity rather than projected from the 3D coordinates, so the result reads like a hand-drawn structure. Chains run as a horizontal zig-zag, and linear centers such as alkynes, nitriles, and carbon dioxide are drawn straight at 180 degrees. Fused, bridged, and spiro ring systems are routed through OpenChemLib’s layout for a clean, non-overlapping depiction.
- Stereochemistry is read from the 3D coordinates. Tetrahedral centers get wedge and dash bonds, and double bonds are drawn with the correct E or Z (cis or trans) geometry.
Hydrogens are never invented
The importer shows exactly the hydrogens present in the file and never adds its own. A carbon written with three hydrogens stays a three-hydrogen carbon; it is not filled out to a methyl group. A heavy-atom-only file imports with no hydrogens at all. Deuterium and tritium (written D or T) are kept as labeled hydrogen isotopes.
Accepted format
Standard .xyz is expected: a count on the first line, a comment or name on the second, then one element x y z line per atom. A bare list of element x y z lines without the header also works. Elements may be written as symbols (case-insensitive) or atomic numbers, and a Gaussian-style extra column between the symbol and the coordinates is ignored. Non-chemical entries that calculation outputs sometimes carry, such as ghost atoms, point charges, and translation vectors, are dropped automatically, so you do not have to clean the file first.
Things to keep in mind
Bond-order perception is a heuristic tuned for neutral, closed-shell organic molecules. Aromatic rings arrive in a single Kekule form, and charged, radical, hypervalent, or organometallic species may need a quick edit after import. The bonding distance threshold is fixed and not adjustable, so an unusually long polar bond can occasionally be missed. After importing, treat the structure as a normal drawing and adjust anything the perception got wrong.