Hello all
Is there a code available to extract the intermediate steps from geometry optimization out file? Since directly opening the .out file in chemcraft or Avogadro does not show the trajectory.
1 Like
You can check Example 10.13 in the manual (10.5.2 Visualizing Orbitals UsingMolDenandMacMolPlt⣠10.5 Visualizing and Plotting Volumetric Quantities ⣠Chapter 10 Molecular Properties and Analysis ⣠Q-Chem 6.2 Userâs Manual). If you set the REM variable MOLDEN_FORMAT to true, the geometry at each optimization step is printed in the MOLDEN section at the end of the Q-Chem output file. If you want these geometries in a separate file, maybe just write a shell script to retrieve the relevant lines from the MOLDEN section to a new file.
something like this will do the trick
cat qchem.out | awk -v Num=0 '/I Atom/,/Nuclear/{if (NF == 5){if ($1 == "I") printf("Geom %d\n",++Num); else printf("%2s %14.10f %14.10f %14.10f\n",$2,$3,$4,$5)}}'
1 Like