operator-make.sh¶
Once the vibronic coupling parameters have been obtained and the active vibrational modes have been selected, the next step is to assemble all of this information into an MCTDH operator file.
The operator-make.sh script automates this process by collecting data from the electronic structure calculations, vibrational analysis, and fitted coupling files, and writing them in the syntax required by the MCTDH package.
Without this script, constructing an operator file manually would require writing hundreds or even thousands of Hamiltonian terms, making the process tedious and highly susceptible to human error.
Purpose of the Script¶
The script performs the following tasks automatically:
- Reads the vibrational frequencies.
- Extracts diabatic state energies from the reference GAMESS calculation.
- Extracts interstate electronic couplings.
- Reads the fitted vibronic coupling parameters for every selected normal mode.
- Generates all Hamiltonian parameters required by MCTDH.
- Writes a complete operator (
.op) file ready for wavepacket propagation or Hamiltonian diagonalization.
Required Input Files¶
Before running the script, the following files should be available in the working directory.
| File | Description |
|---|---|
frequency.dat |
Harmonic vibrational frequencies of all normal modes. |
diabatization.log |
Reference GAMESS output containing diabatic energies and electronic couplings. |
| Mode-dependent coupling files | Fitted linear and quadratic vibronic coupling parameters for each selected mode. |
operator.f90.back |
Fortran program used to generate MCTDH coupling definitions. |
The generation of these files is discussed in the previous section.
Workflow¶
The overall workflow performed by the script is illustrated below.
frequency.dat
│
│
Reference GAMESS Log
│
│
Coupling Files
│
▼
operator-make.sh
│
├──────────────► Extract diabatic energies
│
├──────────────► Read vibrational frequencies
│
├──────────────► Read coupling parameters
│
├──────────────► Execute operator.f90
│
▼
Complete MCTDH Operator File (.op)
The Bash script acts as the main driver of the operator generation procedure, while the accompanying Fortran program formats the vibronic coupling parameters into the syntax expected by MCTDH.
Running the Script¶
Make the script executable
and execute it using
The script then interactively requests all information required to construct the operator file.
Interactive Inputs¶
During execution, the script asks for
- Number of electronic states
- Reference diabatic GAMESS log file
- Suffix of the mode-dependent coupling files
- Name of the output operator file
- Number of active vibrational modes
- Selected mode numbers
- Title of the calculation
These values determine the Hamiltonian that will be written to the operator file.
Output¶
After all inputs have been provided, the script automatically generates
- the parameter section,
- vibrational frequencies,
- diabatic energies,
- electronic couplings,
- first-order vibronic coupling terms,
- second-order vibronic coupling terms,
- Hamiltonian definition,
- individual one-dimensional Hamiltonians for diagonalization,
and finally writes a complete MCTDH operator file.
The structure of the generated operator file is explained in the next section.