MolForma

“4 Input preview”

Shows, read-only, the NWChem input generated from the current molecule, coordinates, calculation settings and advanced settings. It shares the existing input generation and validation, and follows edits, confirming or discarding candidates, Undo/Redo, and loading and saving projects. The input blocks are on the left, the input in the center, and the input summary, checks and path handling on the right. You can also come here with “Check in “4 Input preview”” in “2 Calculation” and with “Show in input” in the advanced settings.

The “4 Input preview” tab: the input blocks on the left (start, geometry, basis, dft …), the NWChem input in the middle, and the summary and check result on the right. The dft block is chosen, and the upper right shows where it is set: “2 Calculation › Basic settings” and “2 Calculation › Advanced settings (DFT)”

Figure 1 The input for ethanol with the dft block chosen in “Input blocks” on the left. The line from the advanced settings (line 31) has a purple mark, and the upper right shows where the block is set.

Display mode Contents
Input for export (default) The same complete input as in “2 Calculation”. Relative paths are written as set
Input at run time The same generation as the complete input saved by “3 Run settings”. Relative input movecs paths are converted to absolute paths from the reference directory

If the reference directory is blank, the input at run time uses the directory of the saved project, or the app’s working directory for an unsaved project. Relative scratch and permanent paths are relative to the job folder, and output movecs relative to permanent. Output movecs starting with ./ are relative to the job folder. The preview creates no job folder and does not start NWChem. If you export the input at run time on its own and run it elsewhere, create the output subdirectories. “Save as job” creates them.

Checking input generation and checking the run environment are separate. The input for export is not affected by problems in the executable or MPI settings. The run-time mode also checks the types, values and path restrictions of the run settings, but whether the executable, input movecs and basis library exist and whether the job folder is writable are checked in “3 Run settings”. A status saying the input can be generated is not an NWChem syntax check and does not guarantee convergence.

The preview always shows the project being edited. It does not show the frozen copies of running or past calculations; check input.nw in the job folder for those. Loading or directly editing arbitrary NWChem input, importing external edits into the project, and adding arbitrary keywords are not supported.

The input structure, task order and file specifications follow NWChem Getting Started.

Input preview verification

The Qt Test input_preview checks that copying and saving the full text match the generator, that run-time paths match the saved job, that previewing creates no files, preservation of unknown fields and edit history, output control for candidates and errors, Undo/Redo, pending settings, validation links, display of HTML characters, search and block navigation, input blocks and where lines are set (detecting lines from the advanced settings and the additional input, moving to the source tab and advanced settings), committing the focused setting, and the save dialog. Regular CTest needs no NWChem, MPI or network.

On 2026-10-23 the existing 6 suites and the input preview tests passed. 9 input preview tests (including initialization and cleanup), among them output control when a cleanup starts and is cancelled, were also verified with AddressSanitizer, and the screenshots were checked.

The following optional command saves screenshots and test inputs.

QT_QPA_PLATFORM=offscreen MOLFORMA_PREVIEW_ARTIFACTS=/tmp/molforma-preview \
  ./build/test_input_preview focusedSettingAndSaveDialog

See also: “2 Calculation”, Advanced settings and CUBE/MOLDEN output, the list of pages in “Features”.