qsimulate-open / bagel

Brilliantly Advanced General Electronic-structure Library
GNU General Public License v3.0
97 stars 43 forks source link

Max size reached in AugHess #83

Closed jevandezande closed 7 years ago

jevandezande commented 7 years ago

When I attempt to run a ZCASSCF calculation on H2O + F, after a few iterations, I get the error.

         3   0       -175.51133581     2.87e-06     14.11
         3   1       -175.51133581     0.00e+00     14.11
         3   2       -175.16510034     0.00e+00     14.11
         3   3       -175.16510034     0.00e+00     14.11
         3   4       -175.09321538     0.00e+00     14.11
         3   5       -175.09321538     0.00e+00     14.11

         res : 2.90e-04   lamb: 1.00e+00   eps : -9.10e-08   step: 5.88e-04    0.68
         res : 1.07e-04   lamb: 1.00e+00   eps : -1.14e-07   step: 8.27e-04    0.68
         res : 4.24e-05   lamb: 1.00e+00   eps : -1.23e-07   step: 9.94e-04    0.68
         res : 2.25e-05   lamb: 1.00e+00   eps : -1.24e-07   step: 9.92e-04    0.68
         res : 1.39e-05   lamb: 1.00e+00   eps : -1.25e-07   step: 9.86e-04    0.68
         res : 2.22e-05   lamb: 1.00e+00   eps : -1.25e-07   step: 9.82e-04    0.69
         res : 2.53e-05   lamb: 1.00e+00   eps : -1.25e-07   step: 9.89e-04    0.68
         res : 8.91e-06   lamb: 1.00e+00   eps : -1.25e-07   step: 9.99e-04    0.69
         res : 4.22e-06   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
         res : 2.96e-06   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
         res : 1.65e-06   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.68
         res : 1.14e-06   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.68
         res : 9.68e-07   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
         res : 4.74e-07   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.68
         res : 3.78e-07   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
         res : 5.09e-07   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
         res : 2.99e-07   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
         res : 2.64e-07   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
         res : 1.48e-07   lamb: 1.00e+00   eps : -1.25e-07   step: 1.00e-03    0.69
  ERROR ON RANK 0: EXCEPTION RAISED:max size reached in AugHess
terminate called after throwing an instance of 'std::runtime_error'
  what():  max size reached in AugHess
[n020:14245] *** Process received signal ***
[n020:14245] Signal: Aborted (6)
[n020:14245] Signal code:  (-6)
[n020:14245] [ 0] /lib64/libpthread.so.0(+0xf100)[0x2b6935b13100]
[n020:14245] [ 1] /lib64/libc.so.6(gsignal+0x37)[0x2b6936f0b5f7]
[n020:14245] [ 2] /lib64/libc.so.6(abort+0x148)[0x2b6936f0cce8]
[n020:14245] [ 3] /lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x165)[0x2b6936a179d5]
[n020:14245] [ 4] /lib64/libstdc++.so.6(+0x5e946)[0x2b6936a15946]
[n020:14245] [ 5] /lib64/libstdc++.so.6(+0x5e973)[0x2b6936a15973]
[n020:14245] [ 6] /lib64/libstdc++.so.6(__cxa_rethrow+0x49)[0x2b6936a15be9]
[n020:14245] [ 7] BAGEL[0x52ad3a]
[n020:14245] [ 8] /lib64/libc.so.6(__libc_start_main+0xf5)[0x2b6936ef7b15]
[n020:14245] [ 9] BAGEL[0x529669]
[n020:14245] *** End of error message ***

This error appears seemingly at random, with some similar geometries working fine and others that are only slightly displaced (0.05 Angstrom) having the same error. As I am attempting to optimize this complex using single points and an external optimizer, I need this to work for a region around the optimal structure.

Input File:

{ "bagel" : [
    {
        "title": "molecule", 
        "basis": "cc-pVTZ",
        "df_basis": "cc-pvtz-jkfit",
        "symmetry": "C1", 
        "angstrom": true, 
        "geometry": [
            { "atom": "F", "xyz": [   0.031,    1.021,    0.000] }, 
            { "atom": "O", "xyz": [   0.031,   -1.081,    0.000] }, 
            { "atom": "H", "xyz": [  -0.549,   -1.014,    0.762] }, 
            { "atom": "H", "xyz": [  -0.549,   -1.014,   -0.762] }
        ]
    }, 

    {
        "title": "zcasscf", 
        "state": [ 0, 3 ], 
        "nact_cas": 3, 
        "nclosed": 9, 
        "only_electrons": false, 
        "finite_nucleus": false
    }
]}
shiozaki commented 7 years ago

This happens when you specify a wrong set of states. Are you sure that there is no quartet state below the third doublet states? Note that in relativistic calculations you cannot only compute doublets because spin is not a good quantum number.

shiozaki commented 7 years ago

PS: Can you give me casscf.log if you think it is the case?

RDReynolds commented 7 years ago

It looks like it's just not converging fast enough; the default setting is to stop after 20 microiterations. The input file you provided works for me if I add the following line to the ZCASSCF input:

"maxiter_micro" : 50,

jevandezande commented 7 years ago

Increasing maxiter_micro fixes it.

Thanks