Hello Q-Chem Community,
I’m performing a number of BOMD simulations and have come across the need to restart many of them. In some cases, it’s as simple as wanting to continue a trajectory beyond my cluster’s job time limits, whereas in others it’s to restart a trajectory where the SCF failed to converge.
When saving and archiving the scratch directory, it’s easy to restart after the last successful time step by following the restart instructions and reading the $molecule
section, setting scf_guess
to read
and aimd_init_veloc
to restart
.
However, the restart job always begins with time step #1 and time = 0.0 fs. This complicates parsing successive output files and prevents me from doing a simple concatenation of the View.xyz
files without additional post-processing.
It would be great if the View.xyz
trajectory could be read upon restart to parse the previous step and begin the output with the “next” time step iteration and value in fs. The only potential snag I see here is if the time step size is modified between runs.
Alternatively, if it isn’t feasible to parse the View.xyz
trajectory, providing an input $rem
variable to specify the initial time step iteration and value (either in fs or a.u.) would still be helpful and may alleviate the ambiguity of step size between jobs.
Here is an example of how I envision this for a job where the SCF failed to converge, but the scratch directory was saved correctly:
Failed job output:
----------------------------------------------------------------------------
Nuclear coordinates (Angst) and velocities (a.u.)
----------------------------------------------------------------------------
x y z v_x v_y v_z
----------------------------------------------------------------------------
1 C 2.1352 -2.4926 4.9898 -6.6947e-04 1.8383e-04 3.7873e-03
2 C 6.8604 0.2634 5.9865 3.9269e-03 1.7204e-05 5.4905e-03
...
29 F -0.0701 1.1461 3.9186 1.2542e-03 -1.9999e-04 3.2820e-03
----------------------------------------------------------------------------
Time for this dynamics step: 3634.4 s (CPU) 126.1 s (wall)
TIME STEP #528 (t = 5270.000 a.u. = 127.47520 fs)
--------------------------------------
E(Total) = -1186.49450915 V(Electronic) = -1191.49652863
V(One-Electron) = 0.00000000 V(Coulomb) = 1632.61684325
...
----------------------------------------------------------------
Standard Nuclear Orientation (Angstroms)
I Atom X Y Z
----------------------------------------------------------------
1 C 2.1316085393 -2.4915686617 5.0098495263
2 C 6.8811828028 0.2635561050 6.0156085393
...
...
---------------------------------------
Cycle Energy RMS Gradient
---------------------------------------
1 -1191.4970638482 1.99e-02 Normal BFGS step
...
199 -1191.4972172393 9.04e-04 Normal BFGS step
200 -1191.4972180889 1.38e-03 Normal BFGS step
gen_scfman_exception: SCF failed to converge
Q-Chem fatal error occurred in module libgscf/gen_scfman/gen_scfman_main.C, line 244:
Error in gen_scfman
Please submit a crash report at q-chem.com/reporter
Current implementation: beginning a restart with molecular geometry, velocities, and SCF guess from the failed job will output the initial time step information following SCF convergence as:
----------------------------------------------------------------------------
Nuclear coordinates (Angst) and velocities (a.u.)
----------------------------------------------------------------------------
x y z v_x v_y v_z
----------------------------------------------------------------------------
1 C 2.1316 -2.4916 5.0098 -6.7103e-04 1.8573e-04 3.7850e-03
2 C 6.8812 0.2636 6.0156 3.9311e-03 2.2861e-05 5.4993e-03
...
29 F -0.0634 1.1450 3.9359 1.2511e-03 -1.9921e-04 3.2821e-03
----------------------------------------------------------------------------
Write nuclear velocities every 1 time steps
TIME STEP #1 (t = 0.000 a.u. = 0.00000 fs)
--------------------------------------
E(Total) = -1186.49400633 V(Electronic) = -1191.49725542
V(One-Electron) = 0.00000000 V(Coulomb) = 1631.24084692
...
Expected behavior: at the end of the initial time step after converging SCF, the Q-Chem output file labels this time step as
----------------------------------------------------------------------------
Nuclear coordinates (Angst) and velocities (a.u.)
----------------------------------------------------------------------------
x y z v_x v_y v_z
----------------------------------------------------------------------------
1 C 2.1316 -2.4916 5.0098 -6.7103e-04 1.8573e-04 3.7850e-03
2 C 6.8812 0.2636 6.0156 3.9311e-03 2.2861e-05 5.4993e-03
...
29 F -0.0634 1.1450 3.9359 1.2511e-03 -1.9921e-04 3.2821e-03
----------------------------------------------------------------------------
Write nuclear velocities every 1 time steps
TIME STEP #529 (t = 5280.000 a.u. = 127.71709 fs)
--------------------------------------
E(Total) = -1186.49400633 V(Electronic) = -1191.49725542
V(One-Electron) = 0.00000000 V(Coulomb) = 1631.24084692
...
A related feature request would be the ability to restart Fock matrix extrapolation (and Z-vector extrapolation, when applicable) for BOMD.