Can't run relativistic calcs with decontracted basis sets


#1

I think this bug was reported back on May 26 by acbpsi4, but was not resolved. If I try to run a relativistic calculation together with decontracting the basis set by appending the -decon keyword to the basis set name, then the job fails in qcdb/libmintsbasisset.py:

Traceback (most recent call last):
File “/home/abd/miniconda2/envs/psi4-1.2/bin/psi4”, line 269, in
exec(content)
File “”, line 33, in
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/driver.py”, line 492, in energy
wfn = procedures[‘energy’][lowername](lowername, molecule=molecule, **kwargs)
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/procrouting/proc.py”, line 2009, in run_scf
scf_wfn = scf_helper(name, post_scf=False, **kwargs)
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/procrouting/proc.py”, line 1283, in scf_helper
scf_wfn = scf_wavefunction_factory(name, base_wfn, core.get_option(‘SCF’, ‘REFERENCE’))
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/procrouting/proc.py”, line 1043, in scf_wavefunction_factory
puream=wfn.basisset().has_puream())
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/p4util/python_helpers.py”, line 77, in pybuild_basis
return_atomlist=return_atomlist)
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/qcdb/libmintsbasisset.py”, line 682, in pyconstruct
verbose=verbose)
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/qcdb/libmintsbasisset.py”, line 843, in construct
filename = cls.make_filename(basgbs)
File “/home/abd/miniconda2/envs/psi4-1.2/lib//python2.7/site-packages/psi4/driver/qcdb/libmintsbasisset.py”, line 1401, in make_filename
basisname = basisname.lower()

AttributeError: ‘NoneType’ object has no attribute ‘lower’

There is a sample test of decontraction (samples/decontract/input.dat) but it does not test in a relativistic context, nor use a basis that would typically be decontracted. I would recommend that this test be changed so that the basis set is cc-pvdz-dk-decon and the “relativistic x2c” setting added so that the test is more realistic.

As far as I can tell, the problem is that “DECON” is being passed (in proc.py and proc_util.py) to the BasisSet.build() routine when either X2C or DKH is set, but the downstream code in libmintsbasisset.py doesn’t have any provision for handling “DECON”. It only knows about “ORBITAL” and “JKFIT” and “RIFIT”. Since basis set decontraction does seem to happen when the ‘relativistic’ keyword is not used, I tried simply changing “DECON” to “ORBITAL”. That seems to work: the relativistic calc is run and the basis set is decontracted. Is this right, or should the fix be something more involved, like teaching the code in libmintsbasisset.py to explicitly handle DECON?


#2

I looked at abcpsi4’s topic in November, as part of a larger effort to make sure we had all issues from the forum on the issue tracker. My recollection is that I was able to get his input file to run without errors by changing the basis set selection formatting in his input file. I added “improvements to basis set selection parsing” to the issue tracker, but @loriab said we would hold off until MolSSI finished a basis set project of theirs.

I’m not familiar with the inner workings of the basis set parser or decontracted basis sets, so I can’t say much more.


#3

Would you be able to post a minimal input file so that we can reproduce the error?


#4

Just add ‘relativistic x2c’ to the psi4 sample file that I indicated in my previous email (samples/decontract/input.dat) and that will trigger the error. I have hacked my proc.py and proc_util.py according to what i said in my previous email, so I can get around this bug for now, though I can’t be sure that that is the right/best fix.

Another complication with decontracting is when using a mixture of basis sets, as in something like:

basis {
assign 6-31g**
assign Fe def2-tzvp-decon
}

I no longer have the input file, but I tried something like this and found that such calcs also failed, so that would be another situation to test.


#5

Okay, that is clearer.

Setting a decontracted basis set is breaking Psi’s internal machinery to use the decontracted version of the input basis set as the default for relativistic computations. At least I can get a proper issue added now.

As a workaround that doesn’t involve changing source, you can just set basis_relativistic manually. This input works just fine for me:

molecule {
0 1
CL        0.000000000000  0.000000000000  -0.035925275852
H         0.000000000000  0.000000000000   1.246511684916
symmetry c1
}

basis {


set {
  basis         cc-pvdz-decon
  basis_relativistic cc-pvdz-decon
  df_basis_scf  cc-pvdz-jkfit
  reference     rhf 
  e_convergence 1.e-10
  relativistic x2c 
}

energy('scf')