I encounter a reproducible issue in PyChemShell where QM/MM calculations fail with the error, RuntimeWarning: invalid value encountered in divide, whenever the protein system has an N-terminal Glycine (Gly) or Proline (Pro) residue. In tracking this error down, it seems to originate from an issue in z-matrix construction during setup. I have tested PyChemShell across roughly 100 different QM/MM systems, and the failure has occurred every time the N-terminal residue is Gly or Pro, but never otherwise. As a workaround, I always trim or replace the N-terminal residue with one other than Gly or Pro, and regenerate the topology (prmtop) file. The QM/MM optimizations then run without issue each time.
Dear dguion,
Thank you for reporting this problem. Would you be able to provide an example input that reproduces this crash?
It would also be helpful to know the version of ChemShell that you are using.
All the best,
Tom