grimme-lab / CENSO

CENSO - Commandline ENergetic SOrting of Conformer Rotamer Ensembles
https://xtb-docs.readthedocs.io/en/latest/CENSO_docs/censo.html
GNU Lesser General Public License v3.0
22 stars 9 forks source link

CENSO optimization crash #28

Closed froze-jameel closed 1 year ago

froze-jameel commented 2 years ago

I am currently running calculations using CENSO 1.2.0. However some calculations are crashing in part 2 due to following error

COSMO: inconsitent segment number in iso_amat_derivative rdgrad ended abnormally

This, i understand might stem from TURBOMOLE and DCOSMORS used for geometry optimization in part 2. Is there a possibility not to use an implicit solvation only during optimization in part 2?

fabothch commented 2 years ago

Hi, you are correct, this is an error stemming from DCOSMO-RS in TURBOMOLE. You can use COSMO as an implicit solvation model during geometry optimization that takes electrostatics into account. You can set this by the command line -sm2 cosmo. There is no option to optimize in the gas phase but use a solvation model for the free energy evaluation.

fabothch commented 2 years ago

If you also have ORCA available you could choose to optimize with ORCA and SMD using -prog2opt orca -sm2 smd and for the remaining investigation use your Turbomole setup.

froze-jameel commented 2 years ago

Thanks for your reply. I have tried COSMO as well and got the same error.

fabothch commented 2 years ago

I believe this error stems from an inconsistent number of expected and created surface segments in the COSMO procedure, which is the reason why only some of the calculations crash. I tested a number of settings and found these to be the most stable, but they can only be changed in the code https://github.com/grimme-lab/CENSO/blob/ed326c93943a98931ac83b7f2c2554723e960abb/censo_qm/tm_job.py#L314-L318

If you should not want to change the code and you want to optimize your compounds without any solvation model, then run part0 and part1 as you have done before. Then create a new folder and start from the sorted ensemble file _enso_ensemblepart1.xyz directly with the optimization (part2) setting the solvent to gas.

froze-jameel commented 2 years ago

When i run part 2 by selecting solvent to gas than CENSO will not calculate "smgsolv" in the implicit solvent as well. Is there any way to just run single point energy calculation to calculate the free energy of solvation on the optimized structures when part 2 in gas is done. My idea would be to run part 3 with the same density functional: r2scan-3c from with for example COSMO-RS and calculate the solvent effects. Than comes the question can i change the part3: which is meta hybrid functional to part4? My final question than relates to the COSMO-RS parameterization. The input for COSMO-RS needs to generated using BP86/def2-TZVPD, as it is parametrized for this functional and basis sets. However CENSO calculate the Gibbs free energy of solvation using r2scan-3c for part 2 and meta hybrid pw6b95 functional. So is there a possibility in CENSO to generate COSMO-RS input with BP86-TZVPD while calculating the single point energy with r2scan-3c or pw6b95?

fabothch commented 2 years ago

When i run part 2 by selecting solvent to gas than CENSO will not calculate "smgsolv" in the implicit solvent as well. Is there any way to just run single point energy calculation to calculate the free energy of solvation on the optimized structures when part 2 in gas is done.

CENSO is designed to either calculate the free energy in the gas phase or in solution. A mixture of both is not implemented. If you want to get solvation free energies from any geometry (optimized in gas phase or solution) then:

  1. create a new folder
  2. copy the ensemble file (coordinates) to this folder
  3. setup a new CENSO calculation using either part1 or part3 and choose the appropriate basis set, density functional and solvent
  4. make sure that you have turned part2 off in order not to perform a geometry optimization.

Than comes the question can i change the part3: which is meta hybrid functional to part4?

I do not understand the question. Part3 is concerned with refining free energies, by using higher level density functional methods (but in principle, any available functional can be chosen). Which functionals are available can be checked with censo -tutorial. Part4 is solely concerned with computing NMR properties like shielding and spin-spin coupling constants. So part3 and part4 are not inter-changeable.

So is there a possibility in CENSO to generate COSMO-RS input with BP86-TZVPD while calculating the single point energy with r2scan-3c or pw6b95?

No there is not. CENSO is designed to handle several hundred conformers from an ensemble. To speed up the evaluations the energy and density of the corresponding functional/basis set of the respective part are used in the COSMO-RS evaluation. I agree that COSMO-RS is parameterized based on bp86 data, but concerning the conformer evaluations, we are usually interested in energy differences.