$ grep -iA3 "maximum force" test.log
Maximum Force 0.009759 0.000450 NO
RMS Force 0.001640 0.000300 NO
Maximum Displacement 0.380695 0.001800 NO
RMS Displacement 0.042164 0.001200 NO
--
Maximum Force 0.001122 0.000450 NO
RMS Force 0.000200 0.000300 YES
Maximum Displacement 0.117795 0.001800 NO
RMS Displacement 0.034630 0.001200 NO
--
Maximum Force 0.000796 0.000450 NO
RMS Force 0.000091 0.000300 YES
Maximum Displacement 0.290041 0.001800 NO
RMS Displacement 0.065495 0.001200 NO
--
Maximum Force 0.000462 0.000450 NO
RMS Force 0.000095 0.000300 YES
Maximum Displacement 0.245764 0.001800 NO
RMS Displacement 0.018789 0.001200 NO
--
Maximum Force 0.000530 0.000450 NO
RMS Force 0.000087 0.000300 YES
Maximum Displacement 0.268022 0.001800 NO
RMS Displacement 0.026751 0.001200 NO
--
Maximum Force 0.000268 0.000450 YES
RMS Force 0.000051 0.000300 YES
Maximum Displacement 0.268678 0.001800 NO
RMS Displacement 0.020944 0.001200 NO
The above command grew tedious when I wanted to monitor more than a couple jobs, hence I made an alias in the .bashrc file in my home directory. This way I only had to type the alias and not the entire grep line.
# extracts geometry convergence criteria
alias grepmax='grep -A3 -i "maximum force"'
# extracts time stamps for each CCSD gradient calc
alias grepccsd='grep "Leave Link 106"'
# extracts the number of steps taken during a geometry opt, IRC, or PES scan
alias grepstep='grep "Step number"'
# extracts the rotational constants (in GHz)
alias greprot='grep "Rotational constants"'
# extracts the harmonic vibrational frequencies (3 columns)
alias grepfreq='grep "Frequencies"'
# extracts the G3 energy (at 0 K and at finite T, but not the enthalpy or free energy)
alias grepg3='grep "G3(0 K)"'
No comments:
Post a Comment