Repository navigation
Formats and Export
From 0.7.0 FormChem opens and saves the common chemistry files, exports pictures that open again as editable drawings, and prints at real size. Every format, what it loses, the report codes and the engine routes are in docs/FORMATS.md.
File > Open (or dropping a file on Home) reads:
| Format | Extensions | Notes |
|---|---|---|
| MDL molfile |
.mol, .mdl
|
V2000 and V3000, with query features, enhanced stereo and R-group blocks |
| SD file |
.sdf, .sd
|
up to 1000 records, with their data fields; a record that fails is skipped and counted |
| RXN | .rxn |
opens as a drawn scheme; the title becomes the step name, the comment line the conditions |
| RD file |
.rdf, .rd
|
reactions and molecules with their data; every step is kept |
| SMILES, CXSMILES, reaction SMILES |
.smi, .smiles, .cxsmi, .cxsmiles, .rsmi
|
one structure (or one reaction) per line, with an optional name |
| SMARTS |
.sma, .smarts
|
opens as query structures |
| InChI | .inchi |
one per line, with an optional name |
| CML | .cml |
molecules, data and reaction schemes |
| CDXML, CDX |
.cdxml, .cdx
|
structures, arrows, plus signs and text |
| Pictures FormChem exported |
.svg, .png, .pdf, .eps
|
the drawing kept inside opens again, unchanged |
| PDB, mmCIF (0.10.0) |
.pdb, .ent, .cif, .mmcif
|
one 3D object over the file kept unchanged: the protein as cartoon, ligands as ball and stick, waters hidden, the main ligand in focus (3D) |
From 0.10.0 an SD or molfile whose records have 3D coordinates (up to 200 records) keeps them: each structure is laid out in 2D for the page and carries the file's geometry as its conformer, ready for the 3D View. Flat files read as before.
A file from another program opens as a new, unsaved drawing at your drawing's bond length. When anything was lost or changed on the way in, a short note appears ("opened with notes", or how many things changed) with Details: a panel that lists each item with its count, such as text whose fonts were approximated, a record that could not be read, or stereocentres of unknown configuration. Nothing in the file on disk changes; save the drawing to keep it as a .fchem file.
File > Import... brings one or more files into the drawing you have open instead of opening each as a drawing of its own: chemistry files, .fchem drawings and pictures that carry a drawing. Each file lands in free space to the right of or below what is already there, at your drawing's bond length, selected, and is one undo step. An SD file brings at most 50 structures, laid out in a table, and the note ("imported with notes") says how many were left out; File > Open reads the whole file. Only the first page of a drawing with several pages comes in. A PDB or mmCIF file comes in as a 3D object over the file.
3D exports (the 3D View as PNG or glTF, and Export 3D Structure as MOL, SD, PDB or XYZ) are on the 3D page.
File > Export has Export as PNG..., SVG..., PDF... and EPS..., and Export Picture... opens the dialog:
| Choice | What it does |
|---|---|
| Format | PNG, SVG, PDF or EPS |
| Scope | Whole page (cropped to the drawing), Selection, or Each structure (one file per structure, named after it) |
| Resolution | PNG only: 72, 150, 300 (default) or 600 dpi |
| Background | Transparent or White |
| Scale | a percent of real size: at 100 percent one point of the drawing is one point in the file |
| Margin | space around the drawing, in points |
| Keep the editable drawing inside the file | on by default (see below) |
The dialog remembers your choices. SVG keeps the labels as text and embeds small subsets of the label fonts (Arimo and Tinos), so it looks the same everywhere and stays editable in a vector program; PDF and EPS draw the labels as outlines, and PDF adds a hidden text layer so labels can be searched and copied. PNG files carry their resolution, so they place at the right size in documents.
Exports are drawn from the drawing itself, never from the screen: the dark page, the grid, the selection and valence warnings never show in them, and line widths are the true ones.
With "Keep the editable drawing inside the file" on, the picture carries a copy of the drawing: in SVG as metadata, in PNG as a text chunk, in PDF as an attached file (drawing.fchem.json) and in EPS as comment lines. Open the picture with File > Open, or paste it, and you get the drawing back with the same structures, wedges, arrows and reaction steps, ready to edit. Pictures placed inside the drawing are drawn into the export but not carried in the copy.
File > Export also has Export as CDXML..., Export as Molfile... and Export as SMILES...; agents and the engine routes reach every format of the table above (and InChIKey). Each format keeps what it can and the export says what it left out: a warning toast for real losses (such as enhanced stereo groups in SMILES, or text in a molfile), with the full report from the engine. A few rules worth knowing:
- A molfile is written as V3000 by itself when the drawing needs it (more than 999 atoms or bonds, AND or OR groups, query features, R-groups). Several structures on a page become one molfile; use an SD file to keep them apart.
- RXN holds one reaction step; an RD file or CML keeps a whole scheme.
- Plain SMILES cannot hold query structures; use SMARTS or a V3000 molfile.
- CDXML and CDX keep structures, arrows, plus signs and text, but not colours, fonts, the bond length, line breaks or curved arrows.
- Abbreviations are written as their full structures in every format but
.fchem.
In the desktop app each export shows the system's save dialog (Each structure asks for a folder) and remembers the last folder; in a browser the file downloads.
File > Print... (Ctrl+P, Cmd+P on macOS) prints the page at real size on paper the size of the page, or with a selection only the selection, in its place on the page. The dark page never prints.
export-png, export-svg, export-pdf, export-eps, export-picture, export-cdxml, export-mol, export-smiles and print run through run_command like any other command; see Agents. Large conversions without the window are on Command Line.
FormChem
- Home
- Manual
- Getting Started
- Drawing
- Grid and Page
- Annotations
- Reactions
- Templates
- Printing and pages
- Keyboard Shortcuts
- Stereo and Queries
- Analysis
- Names
- Spectra and NMR
- 3D
- Databases
- Lab Notebook
- Biopolymers
- Live Structures
- Accessibility
- Formats and Export
- Clipboard
- Command Line
- Agents
- Agent Activity
- Terminal
- Extensions
- Project Format
- Architecture
- Desktop
- Troubleshooting
- Development
- Releasing
Documents