Module: Scan (scan)

The Scan module performs constrained potential energy scans in internal coordinates by systematically varying selected bond distances, bond angles, and dihedral angles around a reference geometry. For each user-defined scan coordinate, the module constructs a sequence of target values (based on atom indices, step size, and number of steps), then forms the full multidimensional grid via the Cartesian product of these sequences. At every grid point, the corresponding internal coordinates are enforced using internal-coordinate constraints, and a constrained geometry optimization is carried out to relax all remaining degrees of freedom, yielding a discrete mapping of the potential energy surface suitable for torsional profiles and reaction-path exploration. The module supports gradient-based constrained optimization with three algorithms: LBFGS as the default workhorse, CG (Conjugate Gradient) as an alternative first-order method, and RFO (Rational Function Optimization) as a Hessian-based option suitable for refining structures near stationary points.

I. Scan Module Unified Input Parameters

The Scan control line selects the geometry optimization algorithm used to relax each constrained structure along the scan path. The scan coordinates themselves (which bonds, angles, or dihedrals, and their step sizes and numbers of steps) are specified separately via the scan constraints, not in this unified control block.

method

Choose the geometry optimization algorithm for each constrained scan point:

II. Output File Contents

Output File (*.out)

When running Scan calculations, the main text output file (*.out) reports the progress of the scan over the grid of internal coordinates and the convergence information for each grid point. Compared to a single optimization, the main new feature is the "Scanning combination …" header that labels each point on the scan grid and shows which scan combination is currently being optimized.

Example:

Scanning combination 1/66: ['1.82', '62.02']

Coordinates
----------------------------------------------------------------------
Running the L-BFGS ...
0 C -0.7997 -1.1662 0.1875
1 C 1.2861 0.0939 0.0202
...
21 H 2.8768 -0.4365 -1.3650

Maximum Force: 0.006107 0.010000 Yes
RMS Force: 0.005310 0.006000 Yes
Maximum Displacement: 0.026630 0.040000 Yes
RMS Displacement: 0.012205 0.025000 Yes

Explain:

  • The line Scanning combination 1/66: ['1.82', '62.02'] shows the scan progress: 1/66 means this is the first combination out of 66 total scan grid points generated from the user-defined Scan commands in the input (e.g., S-lines specifying which bond/angle/dihedral is scanned and how many steps are used). The list in brackets (here ['1.82', '62.02']) records the actual target values of the scanned internal coordinates for this particular grid point, typically corresponding to the current bond length(s), angle(s), or dihedral(s) in their respective units (e.g., Å and degrees) as defined by the Scan setup.
  • The "Coordinates" block lists the atomic indices, element symbols, and Cartesian coordinates (in Å) for the constrained structure associated with this scan point, following the same formatting as the coordinate print-out used elsewhere in the code.
  • The line Running the L-BFGS ... indicates that the L-BFGS geometry optimizer is being applied to relax this configuration under the specified scan constraints.
  • The four lines at the bottom report the standard convergence metrics for this scan grid point: Maximum Force, RMS Force, Maximum Displacement, and RMS Displacement. Each metric is printed with its current value, the corresponding threshold, and a "Yes/No" flag indicating whether that criterion is satisfied. When all four criteria are marked "Yes", the structure at this scan point is considered converged and the program proceeds to the next scan combination.

Scan Trajectory File (*.xyz)

In addition to the text output (*.out), Scan jobs produce an XYZ-format trajectory file that collects the optimized geometries for all scan grid points into a single multi-frame structure file. This file can be visualized or used as input for subsequent calculations. The format follows the standard multi-frame XYZ convention, which is also used by the program's XYZ reader.

Example:

22
Frame 1: 1
C -0.7781 -1.0676 0.3211
C 1.3026 0.0521 -0.0283
...
H 2.9600 -0.3688 -1.3889
22

Explain:

  • The first line is the number of atoms in the system (here 22).
  • The second line is a comment line (for example Frame 1: 1), which records the frame index and may optionally encode the scan combination or other metadata.
  • The next N lines (where N is the number of atoms) give the element symbol followed by the three Cartesian coordinates (in Å) for each atom, representing the optimized geometry at that scan grid point.
  • The next frame then starts with another atom-count line (e.g. the trailing 22 in the example) and repeats the same pattern for the following scan combination.

Taken together, this multi-frame XYZ file provides a compact trajectory of all converged structures along the scan path and is suitable for visualization, analysis, or use as starting points for additional single-point, frequency, or transition-state calculations.