Relativistic with mixed basis

I am just try to run the following code but line
relativistic dkh is giving me error

basis mybas {
[MixedBasis]

spherical

 K  0
 S 15 1.00
    5.233468E+05     3.330000E-04
    6.784769E+04     1.292000E-03
    1.410076E+04     4.645000E-03
    3.747880E+03     1.639700E-02
    1.165997E+03     5.453600E-02
    4.054650E+02     1.539560E-01
    1.532749E+02     3.262890E-01
    6.201310E+01     4.001200E-01
    2.634656E+01     1.872570E-01
    8.550189E+00     1.347800E-02
    3.440320E+00    -1.735000E-03
    8.312492E-01     5.100000E-04
    3.257631E-01    -2.670000E-04
    3.636779E-02     7.400000E-05
    1.731738E-02    -4.400000E-05
 S 15 1.00
    5.233468E+05    -9.700000E-05
    6.784769E+04    -3.760000E-04
    1.410076E+04    -1.347000E-03
    3.747880E+03    -4.850000E-03
    1.165997E+03    -1.624200E-02
    4.054650E+02    -4.971000E-02
    1.532749E+02    -1.174430E-01
    6.201310E+01    -2.103680E-01
    2.634656E+01    -9.520100E-02
    8.550189E+00     5.211930E-01
    3.440320E+00     5.932400E-01
    8.312492E-01     4.900000E-02
    3.257631E-01    -1.089500E-02
    3.636779E-02     2.888000E-03
    1.731738E-02    -1.691000E-03
 S 15 1.00
    5.233468E+05     3.200000E-05
    6.784769E+04     1.240000E-04
    1.410076E+04     4.460000E-04
    3.747880E+03     1.594000E-03
    1.165997E+03     5.405000E-03
    4.054650E+02     1.641500E-02
    1.532749E+02     4.015400E-02
    6.201310E+01     7.214600E-02
    2.634656E+01     3.885900E-02
    8.550189E+00    -2.548100E-01
    3.440320E+00    -4.390080E-01
    8.312492E-01     6.086290E-01
    3.257631E-01     6.078390E-01
    3.636779E-02     2.250900E-02
    1.731738E-02    -1.041000E-02
 S 15 1.00
    5.233468E+05    -6.000000E-06
    6.784769E+04    -2.400000E-05
    1.410076E+04    -8.700000E-05
    3.747880E+03    -3.080000E-04
    1.165997E+03    -1.060000E-03
    4.054650E+02    -3.162000E-03
    1.532749E+02    -7.947000E-03
    6.201310E+01    -1.376700E-02
    2.634656E+01    -8.437000E-03
    8.550189E+00     5.391100E-02
    3.440320E+00     8.830100E-02
    8.312492E-01    -1.367490E-01
    3.257631E-01    -3.060590E-01
    3.636779E-02     6.679980E-01
    1.731738E-02     4.370320E-01
 S 1 1.00
    1.731738E-02     1.000000E+00
 S 1 1.00
    8.250000E-03     1.000000E+00
 P 11 1.00
    1.036177E+03     2.079000E-03
    2.341423E+02     1.628800E-02
    7.317656E+01     7.770700E-02
    2.674509E+01     2.365740E-01
    1.053356E+01     4.307490E-01
    4.296808E+00     3.701380E-01
    1.626117E+00     7.293000E-02
    6.527073E-01    -4.288000E-03
    2.483930E-01     1.779000E-03
    4.411967E-02    -4.270000E-04
    1.585962E-02     1.900000E-04
 P 11 1.00
    1.036177E+03    -6.370000E-04
    2.341423E+02    -4.992000E-03
    7.317656E+01    -2.447400E-02
    2.674509E+01    -7.654000E-02
    1.053356E+01    -1.494450E-01
    4.296808E+00    -1.189610E-01
    1.626117E+00     2.391660E-01
    6.527073E-01     5.544290E-01
    2.483930E-01     3.562110E-01
    4.411967E-02     2.236700E-02
    1.585962E-02    -6.548000E-03
 P 11 1.00
    1.036177E+03     8.800000E-05
    2.341423E+02     6.880000E-04
    7.317656E+01     3.389000E-03
    2.674509E+01     1.058100E-02
    1.053356E+01     2.087800E-02
    4.296808E+00     1.614000E-02
    1.626117E+00    -3.699600E-02
    6.527073E-01    -8.822100E-02
    2.483930E-01    -7.908500E-02
    4.411967E-02     4.197630E-01
    1.585962E-02     6.691110E-01
 P 1 1.00
    1.585962E-02     1.000000E+00
 P 1 1.00
    5.700000E-03     1.000000E+00
 D 5 1.00
    1.799834E+00     1.853600E-02
    6.122067E-01     4.265800E-02
    1.366237E-01     7.573500E-02
    5.649686E-02     2.128970E-01
    1.585889E-02     8.417660E-01
 D 1 1.00
    1.585889E-02     1.000000E+00
 D 1 1.00
    6.340000E-03     1.000000E+00
 ****

assign H aug-cc-pVDZ-dk
assign K MixedBasis
}


molecule KH{ #Starting from opt at TZ
K
H 1 R

    R         =    2.48
}

set { 
basis mybas
relativistic dkh 
}
memory 8gb
energy('scf') 

I get error like this.

Traceback (most recent call last):
  File "/home/hk/miniconda3/bin/psi4", line 287, in <module>
    exec(content)
  File "<string>", line 166, in <module>
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/driver.py", line 556, in energy
    wfn = procedures['energy'][lowername](lowername, molecule=molecule, **kwargs)
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/procrouting/proc.py", line 2002, in run_scf
    scf_wfn = scf_helper(name, post_scf=False, **kwargs)
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/procrouting/proc.py", line 1281, in scf_helper
    scf_wfn = scf_wavefunction_factory(name, base_wfn, core.get_option('SCF', 'REFERENCE'), **kwargs)
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/procrouting/proc.py", line 1056, in scf_wavefunction_factory
    puream=wfn.basisset().has_puream())
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/p4util/python_helpers.py", line 80, in _pybuild_basis
    mol.to_dict(), key, resolved_target, fitrole, other, return_dict=True, return_atomlist=return_atomlist)
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/qcdb/libmintsbasisset.py", line 679, in pyconstruct
    verbose=verbose)
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/qcdb/libmintsbasisset.py", line 838, in construct
    filename = cls.make_filename(basgbs)
  File "/home/hk/miniconda3/lib//python3.7/site-packages/psi4/driver/qcdb/libmintsbasisset.py", line 1396, in make_filename
    basisname = basisname.lower()

AttributeError: 'NoneType' object has no attribute 'lower'

Printing out the relevant lines from the Psithon --> Python processed input file:
    core.IO.set_default_namespace("KH")
    core.set_global_option("BASIS", "mybas")
    core.set_global_option("RELATIVISTIC", "dkh")
    core.set_memory_bytes(8000000000)
    
--> energy('scf')

What am I doing wrong here? Thank you very much in advance!

You need to set the basis_relativistic keyword, which works exactly like basis. Iā€™m not familiar with the inner workings of relativistic methods, so the exact distinction between the relativistic and the non-relativistic basis is beyond me.

The error message could be a lot cleaner. Overhauling custom basis sets is on our to-do list, but not our top priority at the moment.

1 Like

Oh, That fixed my problem. Thank you very much for your prompt reply. :blush:

I think basis_relativistic may be referring to the RI basis set needed for the momentum integrals for DK or X2C. So I would recommend using a completely uncontracted version of your orbital basis set for that.