qsimulate-open / bagel

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

assert fails in quartmatrix's constructor #57

Closed shiozaki closed 9 years ago

shiozaki commented 9 years ago

In order to run this example, I had to loosen the threshold to 1.0e-6. Should be investigated. The change is included in ddac3b1e3a171cc8d7e7d5ad3638604c551605e0

{ "bagel" : [ 

{
  "title" : "molecule",
  "symmetry" : "C1",
  "basis" : "tzvpp",
  "df_basis" : "tzvpp-jkfit",
  "angstrom" : false,
  "geometry" : [ 
    { "atom" : "F",  "xyz" : [   -0.000000,     -0.000000,      3.720616]},
    { "atom" : "H",  "xyz"  : [   -0.000000,     -0.000000,      0.305956]}
  ]
},

{
  "title"  : "zcasscf",
  "algorithm" : "superci",
  "state" : [1],
  "thresh" : 5.0e-7,
  "thresh_micro" : 1.0e-8,
  "thresh_fci" : 1.0e-9,
  "nact_cas"   : 2,
  "nclosed"  : 4,
  "maxiter"  : 1,
  "maxiter_scf"  : 100,
  "maxiter_fci"  : 100,
  "maxiter_micro" : 20, 
  "diis_start"   : 5 
}

]}
RDReynolds commented 9 years ago

This comes down to the symmetry of the initial guess orbitals.

When the job above is submitted, it runs a DHF calculation to get an initial guess, pulling parameters from the ZCASSCF instructions (thresh = 5.0e-7, diis_start = 5, Hcore guess for DHF). And this fails the symmetry check by a small margin (1.5e-8 > 1.0e-8). There are at least two ways around this: to tighten the convergence threshold for the DHF calculation (thresh = 5.0e-9 is sufficient in this case) or to use a nonrel RHF wave function as the initial guess for the DHF method. The latter option passes the check by a very wide margin (7.1e-12 << 1.0e-8).

Given that the RHF initial guess also accelerates DHF convergence and should therefore improve efficiency (a little), I will fix this by modifying ZCASSCF so that if no guess orbitals are supplied, it runs RHF --> DHF --> ZCASSCF rather than Hcore --> DHF --> ZCASSCF. We can of course still run jobs with an Hcore guess if we explicitly include the DHF calculation in the input file.

shiozaki commented 9 years ago

No this should be fixed as initially suggested. Either symmetrize a matrix or get rid of the check in this context, as it is not necessary.

On Apr 28, 2015, at 4:52 PM, Ryan D. Reynolds notifications@github.com<mailto:notifications@github.com> wrote:

This comes down to the symmetry of the initial guess orbitals.

When the job above is submitted, it runs a DHF calculation to get an initial guess, pulling parameters from the ZCASSCF instructions (thresh = 5.0e-7, diis_start = 5, Hcore guess for DHF). And this fails the symmetry check by a small margin (1.5e-8 > 1.0e-8). There are at least two ways around this: to tighten the convergence threshold for the DHF calculation (thresh = 5.0e-9 is sufficient in this case) or to use a nonrel RHF wave function as the initial guess for the DHF method. The latter option passes the check by a very wide margin (7.1e-12 << 1.0e-8).

Given that the RHF initial guess also accelerates DHF convergence and should therefore improve efficiency (a little), I will fix this by modifying ZCASSCF so that if no guess orbitals are supplied, it runs RHF --> DHF --> ZCASSCF rather than Hcore --> DHF --> ZCASSCF. We can of course still run jobs with an Hcore guess if we explicitly include the DHF calculation in the input file.

Reply to this email directly or view it on GitHubhttps://github.com/nubakery/bagel/issues/57#issuecomment-97203745.