A couple of weeks ago I posted a solution for a common error regarding .fchk files that will display the error below when opened with GaussView5.0. As I expected, this error has to do with the use of diffuse functions in the basis set and is related to a change of format between Gaussian versions.
CConnectionGFCHK::Parse_GFCHK() Missing or bad data: Alpha Orbital Energies Line Number 1234
Although the method described in the previous post works just fine, the following update is a better approach. Due to a change of spelling between G03 and G09 (which has been corrected for G09 but not available for GV versions prior to 5.0.9) one must change “independent” for “independant”
To make the change directly from the terminal the following command is needed:
sed -i 's/independent/independant/g' file.fchk
Alternatively you can redirect the output to a new file
sed -e 's/independent/independant/g' file.fchk > newfile.fchk
if you want to keep the old version and work with a new one.
Of course this edition can be performed manually with any text editor available (for example if you work in Windows) but solutions from the terminal always seem easier and a lot more fun to me.
Thanks to Dr. Fernando Cortés for sharing his insight into this issue.
Thanks for this. It worked well enough for us in Gaussview 5.0.8 and Gaussian 09 rev C01 but we have new problems with rev D01. The formcheck file created by this process now fails in the cubegen step. I have a workaround at my web page.
http://glab.cchem.berkeley.edu/glab/faqs/cubegen_C01.html#revD01
I’d appreciate any feedback. – Kathy
Hi Kathy, thanks for sharing your solution with us; very elegant indeed and quite useful for batch processing.
I didn’t have any problems with cubegen and the revD01 version of G09 until just recently. I have no idea why 🙂 but I will try your solution and write a similar script to yours.
Thanks for your message, for reading and linking this post to your FAQs page.
Have a nice day
what if I am not using the command line…using Gaussian 09 and got a chk file error?
You can still format it with the utilities (which can be called from the Gaussian window) and then edit it with a text-editor. After that it should work with your GaussView distribution.
I hope this helps
Dear Joaquin,
It works smoothly. Thanks for this but I have one doubt whether it is ethically and technically right to modify the output file.(if someone question the result in future because it is a modified output file).
Well, this is a minor modification just so the program can read it properly. I guess you could edit the results to manipulate the outcome and conclusions but only to a small degree. It’s an interesting question but I think in this case its not a matter of ethics but coding.
Thanks for taking the time to comment.
Hello. My calculation was done in Linux system but I want to view my checkpoint file in windows. So, I tried changing file chk to fchk using $ formchk linux.chk windows.fchk but failed to convert. Do you have any solution or other alternative?
Error as follows
Read checkpoint file ____
Write formatted file ____
Missing data for FChkPn.
Error termination via Lnkle __
Segmentation fault (core dumped)