SAPT calculation error

I need help with the following error while performing the SAPT calculation. Many thanks in advance.
error:

   37    -370.4554755358      1.65E-05
   38    -370.4558000370      2.13E-05
   39    -370.4557369742      1.87E-05
   40    -370.4553871162      1.64E-05
   41    -370.4555817261      8.91E-06 Convergence criterion met 
 ---------------------------------------
 <S^2> = 1.8364
 SCF time:  CPU 20717.60 s  wall 579.86 s
 SCF   energy in the final basis set = -370.45558173
 Total energy in the final basis set = -370.45558173

 Q-Chem fatal error occurred in module forms1/mkShls.C, line 206:

 Not enough orbitals for all the electrons


 Please submit a crash report at q-chem.com/reporter

Input:

$comment
Re-Re complex 787
$end

$molecule
0 1
-- Rhenium complex
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     9.4856   12.5415    3.3101
C     9.5567    9.7794    0.9056
C     8.2852    6.8916    1.8458
C    10.7686   10.1718    0.3913
C     9.4526    9.4349    2.2449
C     6.3372    7.8450    3.2966
C     3.8099    4.4858    3.9897
C     7.6302    7.9283    2.6569
C     9.7845   13.1727    2.1073
C     3.4002    5.7708    4.3150
C     5.0591    4.2912    3.4547
C    10.3347   12.6671    4.4179
C    10.5526    9.5131    3.0716
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.9205   13.9517    2.0429
C    10.0234    5.2819    1.5027
C    11.4433   13.4511    4.3205
C    11.7753    9.9169    2.5490
C    11.8669   10.2590    1.2199
C     9.4750    4.9281    0.2881
C    11.7383   14.0933    3.1386
H     6.9296    6.9727    0.3190
H     5.3268    3.4713    3.2938
H    10.8231   10.4353   -0.5432
H    10.8533    4.8750    1.8125
H    11.9808   13.5723    5.1186
H     3.2635    3.7912    4.1576
H    11.0478   14.3538    1.2609
H    10.0621   12.2165    5.1909
H     2.5969    5.8489    4.6741
H     3.9828    7.6520    4.2407
H    12.5238   14.5800    3.0373
H     9.8844    4.3369   -0.2594
H     8.0177    5.3720   -0.9552
H    12.6355   10.5255    0.9259
H    12.5274    9.9994    3.1836
H     9.1667   13.1531    1.4158
H     8.8118    9.7259    0.3953
H    10.4816    9.3062    3.9516
H     9.7661    6.4374    3.0407
H     6.7166    5.1787    2.8474
--Rhenium complex
0 1
Re     9.1925    4.8003    7.5558
Cl    10.2219    4.5373    9.6616
Cl    10.9358    3.4914    6.6988
Cl     8.6347    5.3515    5.3409
O    10.3635    6.4965    7.3989
N     8.1141    6.2953    8.3612
N     7.9315    3.6680    7.7529
C    10.7661    8.7952    7.6782
C     6.7838    2.9051    7.8685
C     6.7126    5.6672   10.2731
C     7.9842    8.5550    9.3329
C     5.5007    5.2748   10.7874
C     6.8167    6.0117    8.9338
C     9.9322    7.6016    7.8820
C    12.4595   10.9608    7.1889
C     8.6392    7.5184    8.5218
C     6.4848    2.2740    9.0714
C    12.8692    9.6758    6.8636
C    11.2102   11.1554    7.7239
C     5.9346    2.7796    6.7608
C     5.7168    5.9335    8.1071
C    12.0423    8.6052    7.1110
C     8.5212    8.8967   10.5686
C     6.8292    9.1850    8.8981
C     7.9185    9.8753   11.3452
C    10.3600   10.0937    7.9663
C     5.3489    1.4950    9.1357
C     6.2459   10.1648    9.6760
C     4.8260    1.9955    6.8582
C     4.4941    5.5297    8.6296
C     4.4024    5.1876    9.9588
C     6.7943   10.5186   10.8906
C     4.5310    1.3534    8.0401
H     9.3398    8.4739   10.8597
H    10.9426   11.9754    7.8849
H     5.4463    5.0114   11.7218
H     5.4161   10.5717    9.3661
H     4.2885    1.8743    6.0600
H    13.0058   11.6554    7.0211
H     5.2216    1.0929    9.9177
H     6.2073    3.2301    5.9878
H    13.6724    9.5978    6.5046
H    12.2866    7.7946    6.9380
H     3.7455    0.8666    8.1414
H     6.3850   11.1097   11.4381
H     8.2517   10.0747   12.1339
H     3.6339    4.9211   10.2528
H     3.7420    5.4472    7.9951
H     7.1026    2.2935    9.7629
H     7.4575    5.7207   10.7834
H     5.7877    6.1405    7.2271
H     6.5033    9.0093    8.1380
H     9.5527   10.2680    8.3313
$end

$rem
Jobtype			XSAPT
GUI			        2
Method			B3LYP
ao2mo_disk 		5000000
Basis			def2-SVP
MAX_SCF_CYCLES		2000
scf_guess		autosad
unrestricted		true
SYM_IGNORE		true
$end

$sapt
algorithm		ri-mo
basis			dimer
dispersion		mbd
$end

May not be implemented with ECPs; you should try a smaller example and test this. By the way, if you are using MBD for dispersion then you don’t want to be using the MO-based SAPT algorithm, which has O(N^5) scaling. Use the AO-based algorithm with cubic scaling instead. See
https://doi.org/10.1021/acs.accounts.1c00387
or
https://doi.org/10.1021/acs.jctc.8b00058
I had thought we implemented the AO-based algorithm for use with ECPs but please check and report back.

Using AO algorithm + MBD for dispersion, and I got the same error.

$sapt
algorithm               ao
basis                   dimer
dispersion              mbd
$end

error:

 Q-Chem fatal error occurred in module forms1/mkShls.C, line 206:

 Not enough orbitals for all the electrons


 Please submit a crash report at q-chem.com/reporter

Can you please post a complete input, for something small that uses ECPs, and I will look into it.

For XSAPT+MBD, the usual options (per sample job that ships with Q-Chem) are:

$rem
jobtype      xsapt
method       lrc-wpbe
basis        def2-svp
lrc_dft      true
scf_convergence 7
$end

$xpol
embed   charges
charges cm5
dft-lrc
print   3
$end

$sapt
print   3
algorithm   ao
order   2
basis   projected
Dispersion   MBD
$end

$lrc_omega
340
340
$end

Hi
I tried with a small model with ECP. It worked for SAPT(KS) with def2-TZVP basis.
I have been trying SAPT0 with this model but getting memory issues. Any help appreciated.

Input:

$comment
Re-Re complex 787
$end

$molecule
0 1
-- Rhenium complex
0 1
Re      9.8296551144    12.6023962661     9.5718057298
Cl     10.5511832211    14.8040790424     8.9178726068
Cl     11.1485442089    12.7814312402    11.5155463066
Cl      8.8487588515    12.3319733487     7.4292397439
O       8.1490147452    13.1161822588    10.4398955920
N       9.0937684842    10.8573147935    10.1991681832
C       7.9094318558    10.8999132442    10.8385879327
C       7.4087315959    12.1747133839    10.9557909927
C       9.7769927511     9.5754647717    10.0714513718
O      11.6205079517    11.9283225661     8.6420946468
H      10.5931086565     9.5369029997    10.7977998300
H      10.2032475757     9.4877522905     9.0731937563
H       9.0896310402     8.7482927404    10.2476789434
H       7.4284536051    10.0000506016    11.1957412294
H       6.4787313127    12.4601014985    11.4301388951
P      12.7173606823    12.8143966813     8.0834658625
H      12.3872279786    13.5700618223     6.9538440262
H      13.7686133920    11.9888216245     7.6574260320
H      13.3097972223    13.7078578854     8.9808750620
-- rhenium complex
0 1
Re      5.1226859053     7.2105408320     8.0199818532
Cl      4.5809871139     4.9250308712     8.5387578108
Cl      6.4264131802     7.3125154805    10.0119731792
Cl      3.5023150077     7.2019714723     6.3194527070
O       6.6628309851     6.8536510702     6.8648945321
N       5.7227031701     9.0372460998     7.4819639513
C       6.8127623553     9.1059519523     6.6969685973
C       7.3156059323     7.8681778942     6.3706361121
C       5.0352144614    10.2688184949     7.8455781836
O       3.5057768039     7.7217410965     9.3168657627
H       5.6070466468    11.1429632434     7.5353050331
H       4.8865638575    10.2973326651     8.9251263708
H       4.0539914564    10.2810056878     7.3655486446
H       7.2282892874    10.0541819066     6.3866652340
H       8.1798957920     7.6667292359     5.7515150336
P       2.6832676253     6.7327178850    10.1191840723
H       1.8868876538     5.8476413548     9.3855913980
H       1.7713260247     7.4570373239    10.9017830253
H       3.3873517328     5.9432470887    11.0334099653
$end

$rem
Jobtype			XSAPT
GUI			2
Method			HF
Basis			gen
aux_basis		gen
ecp			gen
ECP_FIT 		TRUE
scf_guess		autosad
MAX_SCF_CYCLES		2000
Mem_total		50000
ao2mo_disk		50000
thresh			14
scf_convergence		10
unrestricted		true
SYM_IGNORE		true
$end

$sapt
algorithm		ri-mo
basis			dimer
$end

$XPOL
embed			none
$end

$basis
H 0
cc-pvdz
****
C 0
cc-pvdz
****
N 0
cc-pvdz
****
O 0
cc-pvdz
****
P 0
cc-pvdz
****
Cl 0
cc-pvdz
****
Re 0
cc-pvdz-pp
****
$end

$ecp
Re 0
lanl2dz
****
$end

$aux_basis
H 0
RIMP2-cc-pvdz
****
C 0
RIMP2-cc-pvdz
****
N 0
RIMP2-cc-pvdz
****
O 0
RIMP2-cc-pvdz
****
P 0
RIMP2-cc-pvdz
****
Cl 0
RIMP2-cc-pvdz
****
Re 0
RIMP2-def2-TZVP
****
$end

Output :


		=========================================================
		|        XPOL FINAL ENERGY   -1055.8037186916 a.u.      |
		=========================================================


 XPOL SCF time 50043.68 (cpu) 894.28 (wall) 
  ---------------------------------------------------- 
  |  SAPT                                            | 
  |  Leif D. Jacobson, Ka Un Lao, John M. Herbert    | 
  ---------------------------------------------------- 
 SAPT calculation at order 2:
	Dimer-centered SAPT basis
	Exchange computed using S^2 approximation
 Using a fitted effective core potential also for fragments
 Using a fitted effective core potential also for fragments
 Using a fitted effective core potential also for fragments
 Using a fitted effective core potential also for fragments
 Using a fitted effective core potential also for fragments
 Using a fitted effective core potential also for fragments
 Currently using 0.00 Mb of memory with 50000.00 Mb still available
 Storage of SAPT dispersion amplitudes will take 9579.7670364380 MB
 Will need at least two times this in disk regardless of algorithm
 ==============================================================
           Memory Requirements for SAPT (MEM_TOTAL)
   IN CORE 1 (fastest)                            19242.48  MB
   IN CORE 2                                      9669.39  MB
   DISK                                           90.69  MB
 ===============================================================

 Q-Chem fatal error occurred in module libsapt/doRISAPTcorrections.C, line 299:

 SAPT not ready for 2 densities yet


 Please submit a crash report at q-chem.com/reporter