QUBEKit icon indicating copy to clipboard operation
QUBEKit copied to clipboard

Optimisation always fails even for a simple methane molecule

Open ph7klw76 opened this issue 3 years ago • 17 comments

Optimisation always fails even for a simple methane molecule which has been pre-optimized. No idea whats wronng

Warning: Unable to load toolkit 'OpenEye Toolkit'. The Open Force Field Toolkit does not require the OpenEye Toolkits, and can use RDKit/AmberTools instead. However, if you have a valid license for the OpenEye Toolkits, consider installing them for faster performance and additional file format support: https://docs.eyesopen.com/toolkits/python/quickstart-python/linuxosx.html OpenEye offers free Toolkit licenses for academics: https://www.eyesopen.com/academic-licensing Traceback (most recent call last): File "/bin/QUBEKit", line 10, in sys.exit(main()) File "/lib/python3.6/site-packages/QUBEKit/run.py", line 1038, in main ArgsAndConfigs() File "/lib/python3.6/site-packages/QUBEKit/run.py", line 129, in init Execute(self.molecule) File "/lib/python3.6/site-packages/QUBEKit/run.py", line 430, in init self.run() File "/lib/python3.6/site-packages/QUBEKit/utils/decorators.py", line 118, in wrapper return func(*args, **kwargs) File "/Q/lib/python3.6/site-packages/QUBEKit/run.py", line 602, in run next_key = self.stage_wrapper(next_key, *stage_dict[next_key]) File "/Q/lib/python3.6/site-packages/QUBEKit/run.py", line 648, in stage_wrapper mol = self.orderstart_key File "/Q/lib/python3.6/site-packages/QUBEKit/run.py", line 774, in qm_optimise raise OptimisationFailed("The optimisation did not converge") QUBEKit.utils.exceptions.OptimisationFailed: The optimisation did not converge

ph7klw76 avatar May 12 '21 10:05 ph7klw76

Hi, @ph7klw76 thanks for testing out QUBEKit sorry that it is not going well, how did you install QUBEKit was it using the conda-forge package? If so please can you update to master on github and try again? We will be doing a new release soon on conda-forge but until then master is probably the most reliable package.

To update to master please use these commands

git clone https://github.com/qubekit/QUBEKit.git
cd <install location>
python setup.py install    

jthorton avatar May 12 '21 10:05 jthorton

I will wait for the new release on conda-forge. If I clone from Github, I have a few pages of conflicts with different modules required to run the qubekit.

ph7klw76 avatar May 17 '21 12:05 ph7klw76

The step i used to install this package conda create -p ~/QUBEKit -c conda-forge -c psi4/label/dev psi4 openff-toolkit python=3.6 conda install -c omnia openmm python=3.6 conda install -c conda-forge geometric conda install -c conda-forge qcengine conda install -c rdkit rdkit conda install -c conda-forge torsiondrive conda install -c conda-forge qubekit

that results in File "/Q/lib/python3.6/site-packages/QUBEKit/run.py", line 774, in qm_optimise raise OptimisationFailed("The optimisation did not converge") QUBEKit.utils.exceptions.OptimisationFailed: The optimisation did not converge when running methane molecule

ph7klw76 avatar May 17 '21 12:05 ph7klw76

@ph7klw76 The newest version of QUBEKit (2.1.1) on conda-forge has fixed many issues we were having with complicated environments and performance, I would recommend creating a new environment to install the latest version as some packages have changed quite a lot. Please let me know if you still have the issue you mention with the newest version.

jthorton avatar Mar 09 '22 10:03 jthorton

I am also having issues with optimizing a simple methane model. Gaussian16 is accessible as g16 and I am using qubekit 2.1.1 through conda-forge. The error I get is

Traceback (most recent call last):
  File "/bsuhome/gwenwhite/miniconda3/envs/qubekit/lib/python3.9/site-packages/qubekit/workflow/workflow.py", line 335, in _run_stage
    result_mol = stage.run(
  File "/bsuhome/gwenwhite/miniconda3/envs/qubekit/lib/python3.9/site-packages/qubekit/workflow/helper_stages.py", line 144, in run
    return self._run_qm_opt(
  File "/bsuhome/gwenwhite/miniconda3/envs/qubekit/lib/python3.9/site-packages/qubekit/workflow/helper_stages.py", line 206, in _run_qm_opt
    raise GeometryOptimisationError(
qubekit.utils.exceptions.GeometryOptimisationError: No molecule conformer could be optimised to GAU TIGHT

jennyfothergill avatar Mar 11 '22 18:03 jennyfothergill

Hi, @jennyfothergill thanks for letting us know, please can you check for a json file in the optimisation/conformer folder this should have a more detailed error message from QCEngine.

jthorton avatar Mar 14 '22 12:03 jthorton

Thanks for responding so quickly :) here is the results.json file

Looks to me that it is having trouble reading the output file? ValueError: could not convert string to float: 'Nonadiabatic' Let me know if I can give more info.

jennyfothergill avatar Mar 14 '22 23:03 jennyfothergill

No problem and thanks for the json file, it looks like the format of the gaussian fchk file has changed between Gaussian09 and Gaussian16 and unfortunately we don't have access to Gaussian16 to see whats changed. Would it be possible for you to provide a fchk file from a gradient calculation (the gaussian input file should be generated in the optimization folder) which will allow us to update QUBEKit to work with Gaussian16?

jthorton avatar Mar 15 '22 11:03 jthorton

Worth mentioning too @jennyfothergill that you could instead use psi4, which is an open source package, for the quantum chemistry calculations if it includes all the functionality you need.

djcole56 avatar Mar 15 '22 19:03 djcole56

@jthorton I don't see an fchk file in the optimization/conformer_0 directory, but I do see a file called gaussian.com. Here is a google drive link to the com file and the chk file I got when I ran said com file.

I think in the meantime I will look into using psi4. Thank you for the suggestion @djcole56

jennyfothergill avatar Mar 15 '22 20:03 jennyfothergill

Please forgive me if I am missing something basic: I have installed psi4 via conda, set my config file to use psi4 (I couldn't find any example of how to do this, so I hope it is correct), and am now getting the following error. See result.json and config.json in this drive link

Thank you for your help

jennyfothergill avatar Mar 15 '22 22:03 jennyfothergill

@jennyfothergill thanks for the checkpoint file please could you format it using formchk lig.chk and post the formated version this should be called lig.fchk?

For the psi4 issue it looks like there might be a problem with the installation can you try and run the command psi4 -V and see if you get the same issue?

jthorton avatar Mar 16 '22 18:03 jthorton

Also easiest way to run with psi4, is something like this (for methanol): qubekit run -sm "CO" -n methanol -p 3b

The "-p" option refers to the set of protocols in Table 1 here: https://doi.org/10.26434/chemrxiv-2021-hsf8l (ie protocols 3b and 5e use psi4).

Apologies we haven't got around to documenting that yet.

djcole56 avatar Mar 16 '22 19:03 djcole56

I can second this issue, initially, I was using Gaussian16 and I landed on the same issue "qubekit.utils.exceptions.GeometryOptimisationError: No molecule conformer could be optimized to GAU TIGHT" but when I switched to Gaussian09 it all worked fine there was no such error. To make sure that's the case and it is not a problem with Gaussian16, I just g16 conformer_0/gaussian.com file and it also processed smoothly. Yes, it seems it could be because of the change in the format of the [chk] https://ucmerced.box.com/s/6a98cq75unyc6be7m3l90yd01oqacq43) file.

Ajaykhanna avatar Mar 17 '22 02:03 Ajaykhanna

Thanks @Ajaykhanna for the fchk file it turns out we just needed to add an extra keyword to check against and the fix is in master https://github.com/qubekit/QUBEKit/pull/302. Would it be possible for you to try and run a small molecule like methane all the way with gaussian16 to make sure the other stages still work?

jthorton avatar Mar 18 '22 11:03 jthorton

Hi, Josh, great, sure, on it, update you soon

Ajaykhanna avatar Mar 18 '22 16:03 Ajaykhanna

@jthorton I get the same error when I run qubekit run -i methane.pdb -p 3b. Psi4 is installed via conda, but it seems like there is some issue on their end... The error I get seems like it's not linking a clib correctly in the conda package?

ImportError: miniconda3/envs/qubekit/lib//python3.8/site-packages/psi4/core.cpython-38-x86_64-linux-gnu.so: undefined symbol: __svml_exp4_mask_e9

Related to this issue I think.

However, cloning the latest master and using with g16 seems to work! I am using commit 2132ccd44d762c4c183d86498090b4efa1554ece with python through miniconda with the following environment.yml and this config.json.

Thank you for your help!

jennyfothergill avatar Mar 18 '22 19:03 jennyfothergill