FISAPT0 Unable to find a basis set

I am trying fisapt0 and getting this error:
BasisSet::construct: Unable to find a basis set for atom 23 for key BASIS

Input

#! This is a shorter version if isapt1 - does not do cube plots. See isapt1 for full details

memory 10 GB

molecule mol {
0 1
--
0 2
C     9.4856   12.5415    3.3101
C     9.7845   13.1727    2.1073
C    10.3347   12.6671    4.4179
C    10.9205   13.9517    2.0429
C    11.4433   13.4511    4.3205
C    11.7383   14.0933    3.1386
H    11.9808   13.5723    5.1186
H    11.0478   14.3538    1.2609
H    10.0621   12.2165    5.1909
H    12.5238   14.5800    3.0373
H     9.1667   13.1531    1.4158
--
0 2
C     9.5567    9.7794    0.9056
C    10.7686   10.1718    0.3913
C     9.4526    9.4349    2.2449
C    10.5526    9.5131    3.0716
C    11.7753    9.9169    2.5490
C    11.8669   10.2590    1.2199
H    10.8231   10.4353   -0.5432
H    12.6355   10.5255    0.9259
H    12.5274    9.9994    3.1836
H     8.8118    9.7259    0.3953
H    10.4816    9.3062    3.9516
--
0 1
Re     7.0769   10.6464    3.6229
Cl     6.0474   10.9093    1.5171
Cl     5.3335   11.9553    4.4799
Cl     7.6346   10.0952    5.8378
O     5.9058    8.9502    3.7798
N     8.1553    9.1514    2.8175
N     8.3378   11.7787    3.4258
C     5.5033    6.6515    3.5004
C     8.2852    6.8916    1.8458
C     6.3372    7.8450    3.2966
C     3.8099    4.4858    3.9897
C     7.6302    7.9283    2.6569
C     3.4002    5.7708    4.3150
C     5.0591    4.2912    3.4547
C     4.2271    6.8414    4.0676
C     7.7482    6.5500    0.6101
C     9.4402    6.2616    2.2806
C     8.3509    5.5714   -0.1665
C     5.9093    5.3529    3.2124
C    10.0234    5.2819    1.5027
C     9.4750    4.9281    0.2881
H     6.9296    6.9727    0.3190
H     5.3268    3.4713    3.2938
H    10.8533    4.8750    1.8125
H     3.2635    3.7912    4.1576
H     2.5969    5.8489    4.6741
H     3.9828    7.6520    4.2407
H     9.8844    4.3369   -0.2594
H     8.0177    5.3720   -0.9552
H     9.7661    6.4374    3.0407
H     6.7166    5.1787    2.8474
symmetry c1
no_reorient
no_com
}

# See note at isapt1. We have fragments whose neutral multiplcity
#   is doublet. Since we want overall multiplicity singlet, which is a
#   low-spin sum, need to fully specify tot & frag multiplicity. This is
#   exactly the same system as in isapt1.

# => Standard Options <= #

basis mybas {
assign H jun-cc-pvdz
assign C jun-cc-pvdz
assign N jun-cc-pvdz
assign O jun-cc-pvdz
assign Cl jun-cc-pvdz
assign Re def2-tzvp
}

set {
scf_type df
guess sad
freeze_core true
basis mybas
}

energy('fisapt0')

Output

  Constructing Basis Sets for FISAPT...

   => Loading Basis Set <=

    Name: (MYBAS AUX)
    Role: JKFIT
    Keyword: DF_BASIS_SCF
    atoms 1-6, 12-17, 30-43  entry C          line   146 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-jkfit.gbs 
    atoms 7-11, 18-22, 44-53 entry H          line    70 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-jkfit.gbs 
    atoms 23                 entry RE         line  8018 file /home/tsingh/psi4conda/share/psi4/basis/def2-universal-jkfit.gbs 
    atoms 24-26              entry CL         line   746 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-jkfit.gbs 
    atoms 27                 entry O          line   258 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-jkfit.gbs 
    atoms 28-29              entry N          line   202 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-jkfit.gbs 

   => Loading Basis Set <=

    Name: (MYBAS AUX)
    Role: RIFIT
    Keyword: DF_BASIS_SAPT
    atoms 1-6, 12-17, 30-43  entry C          line   100 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-ri.gbs 
    atoms 7-11, 18-22, 44-53 entry H          line    30 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-ri.gbs 
    atoms 23                 entry RE         line  3896 file /home/tsingh/psi4conda/share/psi4/basis/def2-tzvp-ri.gbs 
    atoms 24-26              entry CL         line   544 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-ri.gbs 
    atoms 27                 entry O          line   188 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-ri.gbs 
    atoms 28-29              entry N          line   144 file /home/tsingh/psi4conda/share/psi4/basis/jun-cc-pvdz-ri.gbs 


Traceback (most recent call last):
  File "/home/tsingh/psi4conda/bin/psi4", line 387, in <module>
    exec(content)
  File "<string>", line 102, in <module>
  File "/home/tsingh/psi4conda/lib/python3.10/site-packages/psi4/driver/driver.py", line 525, in energy
    wfn = procedures['energy'][lowername](lowername, molecule=molecule, **kwargs)
  File "/home/tsingh/psi4conda/lib/python3.10/site-packages/psi4/driver/procrouting/proc.py", line 4900, in run_fisapt
    minao = core.BasisSet.build(ref_wfn.molecule(), "BASIS", core.get_global_option("MINAO_BASIS"))
  File "/home/tsingh/psi4conda/lib/python3.10/site-packages/psi4/driver/p4util/python_helpers.py", line 157, in _pybuild_basis
    bs, basisdict = qcdb.BasisSet.pyconstruct(mol.to_dict(),
  File "/home/tsingh/psi4conda/lib/python3.10/site-packages/psi4/driver/qcdb/libmintsbasisset.py", line 722, in pyconstruct
    bs, msg, ecp = BasisSet.construct(parser, mol,
  File "/home/tsingh/psi4conda/lib/python3.10/site-packages/psi4/driver/qcdb/libmintsbasisset.py", line 967, in construct
    raise BasisSetNotFound(f'BasisSet::construct: Unable to find a basis set for atom {at + 1} for key {key} among:\n{text2}')

psi4.driver.qcdb.exceptions.BasisSetNotFound: BasisSet::construct: Unable to find a basis set for atom 23 for key BASIS among:
  Shell Entries: ['RE']
  Basis Sets: [('CC-PVTZ-MINAO', 'CC-PVTZ-MINAO', None)]
  File Path: /home/tsingh/jaydip/jay3/psi4_trial/009, /home/tsingh/jaydip/jay3/psi4_trial/009, /home/tsingh/psi4conda/share/psi4/basis
  Input Blocks: 



Printing out the relevant lines from the Psithon --> Python processed input file:
    core.set_global_option("BASIS", "mybas")
    core.set_global_option("SCF_TYPE", "df")
    core.set_global_option("GUESS", "sad")
    core.set_global_option("FREEZE_CORE", "true")
    core.set_global_option("BASIS", "mybas")
--> energy('fisapt0')

!----------------------------------------------------------------------------------!
!                                                                                  !
!  BasisSet::construct: Unable to find a basis set for atom 23 for key BASIS       !
!     among:                                                                       !
!   Shell Entries: ['RE']                                                          !
!   Basis Sets: [('CC-PVTZ-MINAO', 'CC-PVTZ-MINAO', None)]                         !
!   File Path: /home/tsingh/jaydip/jay3/psi4_trial/009,                            !
!     /home/tsingh/jaydip/jay3/psi4_trial/009,                                     !
!     /home/tsingh/psi4conda/share/psi4/basis                                      !
!   Input Blocks:                                                                  !
!                                                                                  !
!----------------------------------------------------------------------------------!

    Psi4 stopped on: Saturday, 01 June 2024 04:39PM
    Psi4 wall time for execution: 0:01:20.77

*** Psi4 encountered an error. Buy a developer more coffee!
*** Resources and help at github.com/psi4/psi4.
     Psi4: An Open-Source Ab Initio Electronic Structure Package
                           Psi4 1.9.1 release

Can someone please look into this. Any help is appreciated!!

MINAO error means it’s failing on the SAD guess. Please see if set guess core or other variations get you past the error.

Note that there’s an unmerged PR that helps SAPT with ECPs.

Thanks for the reply.
I tried using GUESS = AUTO, CORE, GWH, SAD, SADNO, SAP but got the same error every time.
Second comment “Note that there’s an unmerged PR that helps SAPT with ECPs” I could not understand.
Please see if you could suggest something. Thanks in advance.

Update:
I worked out the error given above by using “set minao_basis def2-tzvp” as given in the input but encountered another error. Please see the Output. Any help is appreciated.

Input

#! FISAPT0

memory 10 GB

molecule mol {
0 1
--
0 2
C     9.4856   12.5415    3.3101
C     9.7845   13.1727    2.1073
C    10.3347   12.6671    4.4179
C    10.9205   13.9517    2.0429
C    11.4433   13.4511    4.3205
C    11.7383   14.0933    3.1386
H    11.9808   13.5723    5.1186
H    11.0478   14.3538    1.2609
H    10.0621   12.2165    5.1909
H    12.5238   14.5800    3.0373
H     9.1667   13.1531    1.4158
--
0 2
C     9.5567    9.7794    0.9056
C    10.7686   10.1718    0.3913
C     9.4526    9.4349    2.2449
C    10.5526    9.5131    3.0716
C    11.7753    9.9169    2.5490
C    11.8669   10.2590    1.2199
H    10.8231   10.4353   -0.5432
H    12.6355   10.5255    0.9259
H    12.5274    9.9994    3.1836
H     8.8118    9.7259    0.3953
H    10.4816    9.3062    3.9516
--
0 1
Re     7.0769   10.6464    3.6229
Cl     6.0474   10.9093    1.5171
Cl     5.3335   11.9553    4.4799
Cl     7.6346   10.0952    5.8378
O     5.9058    8.9502    3.7798
N     8.1553    9.1514    2.8175
N     8.3378   11.7787    3.4258
C     5.5033    6.6515    3.5004
C     8.2852    6.8916    1.8458
C     6.3372    7.8450    3.2966
C     3.8099    4.4858    3.9897
C     7.6302    7.9283    2.6569
C     3.4002    5.7708    4.3150
C     5.0591    4.2912    3.4547
C     4.2271    6.8414    4.0676
C     7.7482    6.5500    0.6101
C     9.4402    6.2616    2.2806
C     8.3509    5.5714   -0.1665
C     5.9093    5.3529    3.2124
C    10.0234    5.2819    1.5027
C     9.4750    4.9281    0.2881
H     6.9296    6.9727    0.3190
H     5.3268    3.4713    3.2938
H    10.8533    4.8750    1.8125
H     3.2635    3.7912    4.1576
H     2.5969    5.8489    4.6741
H     3.9828    7.6520    4.2407
H     9.8844    4.3369   -0.2594
H     8.0177    5.3720   -0.9552
H     9.7661    6.4374    3.0407
H     6.7166    5.1787    2.8474
symmetry c1
no_reorient
no_com
}

basis mybas {
assign H jun-cc-pvdz
assign C jun-cc-pvdz
assign N jun-cc-pvdz
assign O jun-cc-pvdz
assign Cl jun-cc-pvdz
assign Re def2-tzvp
}

set minao_basis def2-tzvp

set {
scf_type df
guess sad
freeze_core true
basis mybas
}

energy('fisapt0')

Output:

RuntimeError: 
Fatal Error: Monomer A: A Matrix is not SPD
Error occurred in file: /home/conda/feedstock_root/build_artifacts/psi4_1709839878909/work/psi4/src/psi4/fisapt/fisapt.cc on line: 7933
The most recent 5 function calls were:

psi::PsiException::PsiException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*, int)



Printing out the relevant lines from the Psithon --> Python processed input file:
    core.set_global_option("MINAO_BASIS", "def2-tzvp")
    core.set_global_option("SCF_TYPE", "df")
    core.set_global_option("GUESS", "sad")
    core.set_global_option("FREEZE_CORE", "true")
    core.set_global_option("BASIS", "mybas")
--> energy('fisapt0')

!----------------------------------------------------------------------------------!
!                                                                                  !
! Fatal Error: Monomer A: A Matrix is not SPD                                      !
! Error occurred in file: /home/conda/feedstock_root/build_artifacts/psi4_17098398 !
!     78909/work/psi4/src/psi4/fisapt/fisapt.cc on line: 7933                      !
! The most recent 5 function calls were:                                           !
! psi::PsiException::PsiException(std::__cxx11::basic_string<char,                 !
!     std::char_traits<char>, std::allocator<char> >, char const*, int)            !
!                                                                                  !
!----------------------------------------------------------------------------------!

    Psi4 stopped on: Wednesday, 05 June 2024 03:01PM
    Psi4 wall time for execution: 0:16:34.39

*** Psi4 encountered an error. Buy a developer more coffee!
*** Resources and help at github.com/psi4/psi4.

Update:
I tried following the other scheme for FISAPT0 as shown in the input below and tried changing the scscf_max_iter in a range of 20-40. Also I tried damping_percentage in a range of 20-30. I tried maxiter = 300 also. Nothing worked so far. Could @loriab please look into this? I am using Psi4 1.9.1 release.

Input:

mol = psi4.core.Molecule.from_arrays(
    elez=[6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 75, 17, 17, 17, 8, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
    fragment_separators=[11, 22],
    fix_com=True,
    fix_orientation=True,
    fix_symmetry='c1',
    fragment_multiplicities=[2, 2, 1],
    molecular_charge=0,
    molecular_multiplicity=1,
    geom= [
    9.4856   ,  12.5415  ,    3.3101,
    9.7845   ,  13.1727  ,    2.1073,
   10.3347   ,  12.6671  ,    4.4179,
   10.9205   ,  13.9517  ,    2.0429,
   11.4433   ,  13.4511  ,    4.3205,
   11.7383   ,  14.0933  ,    3.1386,
   11.9808   ,  13.5723  ,    5.1186,
   11.0478   ,  14.3538  ,    1.2609,
   10.0621   ,  12.2165  ,    5.1909,
   12.5238   ,  14.5800  ,    3.0373,
    9.1667   ,  13.1531  ,    1.4158,

    9.5567   ,   9.7794  ,    0.9056,
   10.7686   ,  10.1718  ,    0.3913,
    9.4526   ,   9.4349  ,    2.2449,
   10.5526   ,   9.5131  ,    3.0716,
   11.7753   ,   9.9169  ,    2.5490,
   11.8669   ,  10.2590  ,    1.2199,
   10.8231   ,  10.4353  ,   -0.5432,
   12.6355   ,  10.5255  ,    0.9259,
   12.5274   ,   9.9994  ,    3.1836,
    8.8118   ,   9.7259  ,    0.3953,
   10.4816   ,   9.3062  ,    3.9516,

     7.0769  ,   10.6464 ,     3.6229,
     6.0474  ,   10.9093 ,     1.5171,
     5.3335  ,   11.9553 ,     4.4799,
     7.6346  ,   10.0952 ,     5.8378,
    5.9058   ,   8.9502  ,    3.7798,
    8.1553   ,   9.1514  ,    2.8175,
    8.3378   ,  11.7787  ,    3.4258,
    5.5033   ,   6.6515  ,    3.5004,
    8.2852   ,   6.8916  ,    1.8458,
    6.3372   ,   7.8450  ,    3.2966,
    3.8099   ,   4.4858  ,    3.9897,
    7.6302   ,   7.9283  ,    2.6569,
    3.4002   ,   5.7708  ,    4.3150,
    5.0591   ,   4.2912  ,    3.4547,
    4.2271   ,   6.8414  ,    4.0676,
    7.7482   ,   6.5500  ,    0.6101,
    9.4402   ,   6.2616  ,    2.2806,
    8.3509   ,   5.5714  ,   -0.1665,
    5.9093   ,   5.3529  ,    3.2124,
   10.0234   ,   5.2819  ,    1.5027,
    9.4750   ,   4.9281  ,    0.2881,
    6.9296   ,   6.9727  ,    0.3190,
    5.3268   ,   3.4713  ,    3.2938,
   10.8533   ,   4.8750  ,    1.8125,
    3.2635   ,   3.7912  ,    4.1576,
    2.5969   ,   5.8489  ,    4.6741,
    3.9828   ,   7.6520  ,    4.2407,
    9.8844   ,   4.3369  ,   -0.2594,
    8.0177   ,   5.3720  ,   -0.9552,
    9.7661   ,   6.4374  ,    3.0407,
    6.7166   ,   5.1787  ,    2.8474])
activate(mol)

basis mybas {
assign H jun-cc-pvdz
assign C jun-cc-pvdz
assign N jun-cc-pvdz
assign O jun-cc-pvdz
assign Cl jun-cc-pvdz
assign Re def2-tzvp
}

set minao_basis def2-tzvp

set {
scf_type df
guess sad
soscf true
soscf_max_iter 30
freeze_core true
basis mybas
fisapt_do_plot true
}

energy('fisapt0')

Output:

!----------------------------------------------------------------------------------!
!                                                                                  !
! Fatal Error: Monomer A: A Matrix is not SPD                                      !
! Error occurred in file: /home/conda/feedstock_root/build_artifacts/psi4_17098398 !
!     78909/work/psi4/src/psi4/fisapt/fisapt.cc on line: 7933                      !
! The most recent 5 function calls were:                                           !
! psi::PsiException::PsiException(std::__cxx11::basic_string<char,                 !
!     std::char_traits<char>, std::allocator<char> >, char const*, int)            !
!                                                                                  !
!----------------------------------------------------------------------------------!

    Psi4 stopped on: Tuesday, 11 June 2024 06:46PM
    Psi4 wall time for execution: 1:26:05.21

*** Psi4 encountered an error. Buy a developer more coffee!
*** Resources and help at github.com/psi4/psi4.
    Iter  96:  -2.9730766454656413E+02  -7.293E-11   1.134E-02 DIIS
    Iter  97:  -2.9730766454647375E+02   9.038E-11   1.134E-02 DIIS
    Iter  98:  -2.9730766454650319E+02  -2.944E-11   1.134E-02 DIIS
    Iter  99:  -2.9730766454641889E+02   8.430E-11   1.134E-02 DIIS
    Iter 100:  -2.9730766454643407E+02  -1.518E-11   1.134E-02 DIIS

    FISAPTSCF Failed.

    Final SCF Energy:  -2.9730766454643407E+02 [Eh]