**Fatal Error: SCF::DF: Disk based algorithm requires

Hi everyone,
In the last few days, I’m trying to run a sapt2 calculation to determine inter-molecular interactions for the protein-ligand system. And each time the calculation ends up in the following error.

==> Integral Setup <==
Traceback (most recent call last):
File “/home/rinsha/psi4conda/bin/psi4”, line 287, in
exec(content)
File “”, line 625, in
File “/home/rinsha/psi4conda/lib//python3.7/site-packages/psi4/driver/driver.py”, line 556, in energy
wfn = procedures[‘energy’][lowername](lowername, molecule=molecule, **kwargs)
File “/home/rinsha/psi4conda/lib//python3.7/site-packages/psi4/driver/procrouting/proc.py”, line 3309, in run_sapt
dimer_wfn = scf_helper(‘RHF’, molecule=sapt_dimer, **kwargs)
File “/home/rinsha/psi4conda/lib//python3.7/site-packages/psi4/driver/procrouting/proc.py”, line 1363, in scf_helper
e_scf = scf_wfn.compute_energy()
File “/home/rinsha/psi4conda/lib//python3.7/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 84, in scf_compute_energy
self.initialize()
File “/home/rinsha/psi4conda/lib//python3.7/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 198, in scf_initialize
self.initialize_jk(self.memory_jk_, jk=jk)
File “/home/rinsha/psi4conda/lib//python3.7/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 125, in initialize_jk
jk.initialize()
RuntimeError:
Fatal Error: SCF::DF: Disk based algorithm requires 2 (A|B) fitting metrics and an (A|mn) chunk on core.
This is 2Q^2 + QNP doubles, where Q is the auxiliary basis size, N is the
primary basis size, and P is the maximum number of functions in a primary shell.
For this problem, that is 14017849608 bytes before taxes,20025499440 bytes after taxes.
Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1555110430845/work/psi4/src/psi4/libfock/DiskDFJK.cc on line: 734
The most recent 5 function calls were:
psi::DiskDFJK::preiterations()
Printing out the relevant lines from the Psithon → Python processed input file:
“”“)
core.IO.set_default_namespace(”")
core.set_global_option(“BASIS”, “jun-cc-pVDZ”)
core.set_global_option(“SCF_TYPE”, “DF”)
core.set_global_option(“FREEZE_CORE”, “True”)
→ energy(‘sapt2’)
Psi4 stopped on: Monday, 06 May 2019 11:19PM
Psi4 wall time for execution: 1:06:42.76
*** Psi4 encountered an error. Buy a developer more coffee!

when I tried the same with smaller basis set and on a small portion of the protein with ligand it shows,

RuntimeError:
Fatal Error: Not enough memory
Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1555110430845/work/psi4/src/psi4/libsapt_solver/sapt2.cc on line: 224
The most recent 5 function calls were:

so, how can I solve this? is there a limit to the number of atoms for sapt calculation in psi4?

Hi @rinsha,
It looks like your computation is failing in the stage where the molecular orbitals for the dimer (full protein–ligand complex) are being constructed. Psi4 is complaining with the following error message:

which means that even though Psi4 has correctly identified the DISK_DF algorithm for performing this part of the job, it’s not finding enough memory to store necessary intermediate quantities that it needs to work with to generate the orbitals. This line in the error message

indicates that for your system, you’ll need just over 20 GB of memory on the machine you’re running on — which Psi4 isn’t finding, so it’s given up. In order to address this, you’ll likely need to significantly
truncate your protein–ligand system so that there are fewer atoms. Any reduction in the overall system size will reduce this memory requirement, making the construction of the dimer MOs more tractable.

Furthermore, I’d suggest abandoning SAPT2 in favor of SAPT0 — especially if you have a large system — for three main reasons:

  1. Even if you get the dimer Hartree–Fock to finish, the SAPT2 computation will likely still fail (or at least take a long time to finish), since there are three different O(N^5) components to SAPT2, where N is the number of atoms. For example, an O(N^5) computation on 195 atoms takes ~4 days to finish on the Sherrill group’s beefy workstation computers, which is nearly a best-case scenario.
  2. SAPT0 still provides a physically meaningful breakdown of interaction energy components, albeit at the expense of neglecting intramolecular electron correlation. For most systems this is an acceptable tradeoff, as SAPT0/jun-cc-pVDZ still compares favorably to CCSD(T) interaction energies to within about 1 kcal/mol.
  3. If you are okay with SAPT0, you can leverage the functional-group partition scheme (F-SAPT0) to probe particular functional group interactions (i.e., how much does residue X like or dislike my ligand?), which has previously been applied successfully to study peptide bond contacts in factor Xa systems (see more here).

Exactly how large is your system, i.e., how many atoms are in each of your “monomers” (the protein & ligand)?

Hope that helps!
~ Dom

1 Like

Thanks a lot for your response, Dom.
Initially, I used the whole protein (6288 atoms) with ligand (101) but that one terminated with previously mentioned error so I tried with truncated protein (324 atoms) keeping ligand as such at that time also it shows the same error. That’s why I asked about it.

I got the same error:

Fatal Error: SCF::DF: Disk based algorithm requires 2 (A|B) fitting metrics and an (A|mn) chunk on core.
This is 2Q^2 + QNP doubles, where Q is the auxiliary basis size, N is the
primary basis size, and P is the maximum number of functions in a primary shell.
For this problem, that is 466603200 bytes before taxes,666576000 bytes after taxes.

and I changed the memory size in the input file (memory 182 GB). Then psi4 used 64 GB RAM first, and it dropped to 20 GB slowly.
note: my computer has 192 GB RAM, so change it according to yours.
here is my input file, may be somebody else got this error can fix with it.

memory 182 GB
set basis 6-311++G(2d,2p)
set optking { opt_coordinates = cartesian }
molecule {
0 1
B 2.0559 1.6133 -1.3873
C 0.9947 0.7200 -0.7122
C 0.2277 1.3013 0.3031
H 0.3882 2.2134 0.5152
C 0.7539 -0.6292 -1.0217
C 3.3673 3.3627 -1.7205
C 3.6298 2.4391 -2.7005
C 4.5860 2.6493 -3.6643
H 4.7648 2.0072 -4.3415
C 5.2746 3.8496 -3.5949
H 5.9416 4.0412 -4.2432
C 5.0116 4.7736 -2.6034
H 5.5070 5.5838 -2.5841
C 4.0443 4.5514 -1.6330
H 3.8626 5.1852 -0.9486
C 1.4941 -1.3883 -2.0987
H 2.3696 -0.9525 -2.2504
H 1.6687 -2.3081 -1.7768
C 0.7478 -1.4675 -3.4290
H 0.6671 -0.5574 -3.8111
H -0.1657 -1.8129 -3.2696
C 1.4580 -2.3705 -4.4299
H 1.7580 -3.1890 -3.9607
H 2.2650 -1.9031 -4.7611
C 0.6150 -2.7762 -5.6167
H -0.2204 -3.1948 -5.2887
H 0.3662 -1.9652 -6.1252
C 1.3185 -3.7494 -6.5534
H 1.6668 -4.5116 -6.0255
H 2.0910 -3.2926 -6.9713
C 0.4120 -4.2790 -7.6413
H 0.0803 -3.5324 -8.1831
H 0.9130 -4.8988 -8.2122
H -0.3459 -4.7498 -7.2345
O 2.3779 2.8736 -0.8852
O 2.8165 1.3309 -2.5168
B -2.0559 -1.6133 1.3873
C -0.9947 -0.7200 0.7122
C -0.2277 -1.3013 -0.3031
H -0.3882 -2.2134 -0.5152
C -0.7539 0.6292 1.0217
C -3.3673 -3.3627 1.7205
C -3.6298 -2.4391 2.7005
C -4.5860 -2.6493 3.6643
H -4.7648 -2.0072 4.3415
C -5.2746 -3.8496 3.5949
H -5.9416 -4.0412 4.2432
C -5.0116 -4.7736 2.6034
H -5.5070 -5.5838 2.5841
C -4.0443 -4.5514 1.6330
H -3.8626 -5.1852 0.9486
C -1.4941 1.3883 2.0987
H -2.3696 0.9525 2.2504
H -1.6687 2.3081 1.7768
C -0.7478 1.4675 3.4290
H -0.6671 0.5574 3.8111
H 0.1657 1.8129 3.2696
C -1.4580 2.3705 4.4299
H -1.7580 3.1890 3.9607
H -2.2650 1.9031 4.7611
C -0.6150 2.7762 5.6167
H 0.2204 3.1948 5.2887
H -0.3662 1.9652 6.1252
C -1.3185 3.7494 6.5534
H -1.6668 4.5116 6.0255
H -2.0910 3.2926 6.9713
C -0.4120 4.2790 7.6413
H -0.0803 3.5324 8.1831
H -0.9130 4.8988 8.2122
H 0.3459 4.7498 7.2345
O -2.3779 -2.8736 0.8852
O -2.8165 -1.3309 2.5168
}
optimize(‘B3LYP-D’)

Hi @dasirianni @rinsha @peacewolfus
I am trying to perform SAPT0 calculations, but I am getting same error as mentioned by @rinsha
I increased the memory as well bu the same issue remains,
Following is my input file… any help is deeply appriciated.

Psi4 SAPT0 EDA pbe0/6-31g*

molecule dimer {
0 1
C -7.42052200 0.94542800 -1.03279800
C -6.69376700 0.44716300 0.05041900
C -7.31459600 -0.24860400 1.08787800
C -8.69899900 -0.43016600 1.04026500
C -9.43924900 0.07287600 -0.02481900
C -8.80225800 0.75167300 -1.06055300
H -5.61388500 0.57155000 0.06382600
H -10.51400700 -0.08357300 -0.05980000
C -5.06150400 -1.07661300 1.90212100
C -4.03815500 -0.28609400 2.41988000
C -2.70752000 -0.46775400 2.03125500
C -2.40704400 -1.46737100 1.10417300
C -3.42233300 -2.26281400 0.57250000
C -4.73963100 -2.07049500 0.97190400
H -4.28282500 0.51099100 3.12146400
H -3.15563300 -2.99958500 -0.17999500
C -6.50643300 -0.80317400 2.25194300
C -1.41884600 1.67763100 1.59604000
C -1.73550700 1.60780200 0.24073100
C -1.46483900 2.66371100 -0.63187800
C -0.89445200 3.82894500 -0.11839900
C -0.58531300 3.91999100 1.23750900
C -0.84059300 2.85005700 2.08905300
H -2.20299000 0.71123400 -0.15313000
H -0.13840000 4.82891900 1.63088000
C -2.90324100 1.59846400 -2.42171500
C -4.21555800 2.05251700 -2.24567000
C -5.30491000 1.20213700 -2.41040200
C -5.07014900 -0.13661400 -2.74933000
C -3.77327500 -0.60126200 -2.92194700
C -2.69088800 0.26570900 -2.76668600
H -4.38450700 3.08673200 -1.94614200
H -3.56661800 -1.64276500 -3.15048300
C -1.73673700 2.51191200 -2.12125800
C -1.63921400 0.48389900 2.51583800
C -6.71723300 1.68481400 -2.15933700
H -0.83543000 2.10091500 -2.59438600
H -0.68579600 -0.05566500 2.60492900
H -6.99233600 -1.72206000 2.60421000
H -7.32013400 1.58343200 -3.07110600
H -9.37928200 1.12238800 -1.90493400
H -5.91522300 -0.81552500 -2.84503900
H -9.19497900 -0.98205700 1.83592000
H -5.53746700 -2.66949400 0.53728100
H -1.38878100 -1.61263700 0.74622400
H -0.58102600 2.91927200 3.14315200
H -0.68573300 4.66488000 -0.78283200
H -1.68659700 -0.13664100 -2.87496400
H -6.69306800 2.75746100 -1.92621500
H -1.90215800 3.50509100 -2.55737600
H -1.88574100 0.85014400 3.52001400
H -6.54859600 -0.09349000 3.08865400

-1 1
H 0.35072500 -3.38282900 -2.47927800
H -1.19703800 -3.17542900 -1.23421800
H -1.23611000 -2.30694500 -3.05246000
C 0.18509100 -1.24017500 -1.43992800
H -0.54116800 -0.54106600 -0.99275100
H 0.90250500 -1.48863000 -0.64048200
H 0.75485100 -0.64021000 -2.17223400
B -0.51615500 -2.58549900 -2.08681500

0 1
@C 4.16553200 1.99590700 1.62267200
@C 3.83688300 0.91340800 2.44108600
@C 2.65339800 0.19701600 2.25991700
@C 1.78589500 0.58522000 1.23662300
@C 2.08615100 1.67746400 0.43074000
@C 3.27329100 2.37890100 0.61999800
@H 4.53621400 0.60299300 3.21714200
@H 1.39118100 1.95928200 -0.35564800
@C 1.94765900 -2.19959800 2.23741200
@C 2.85102000 -2.66318800 1.28172300
@C 2.49296500 -3.64122700 0.35517000
@C 1.20148900 -4.16768600 0.39653200
@C 0.29822300 -3.73258600 1.35948300
@C 0.66853000 -2.75434300 2.27940800
@H 3.83304700 -2.19545800 1.21266600
@H -0.71942500 -4.11161400 1.35126600
@C 2.33193300 -1.02117600 3.10739500
@C 4.07638400 -2.86708700 -1.43042800
@C 5.38499900 -2.45445400 -1.17046000
@C 5.91487000 -1.30106600 -1.75102800
@C 5.10881800 -0.55530700 -2.61335700
@C 3.80558800 -0.96161500 -2.88427300
@C 3.28452200 -2.11127500 -2.29697200
@H 6.00186100 -3.03813200 -0.48709100
@H 3.17792200 -0.37088800 -3.54521200
@C 7.40922600 0.53593300 -0.80977200
@C 6.44819500 0.96368000 0.11124500
@C 6.53279900 2.21507200 0.72178400
@C 7.60157400 3.05342900 0.39086400
@C 8.56222700 2.64419200 -0.52651700
@C 8.46541900 1.39053700 -1.12571200
@H 5.60449000 0.31433500 0.33430400
@H 9.38216000 3.30804200 -0.78678600
@C 7.32339700 -0.84537400 -1.43624200
@C 3.47262700 -4.06255000 -0.72621600
@C 5.50810200 2.67433300 1.75062400
@H 7.93247000 -0.85057600 -2.34942900
@H 2.94085500 -4.68734800 -1.45185700
@H 1.50741200 -0.79400700 3.79589000
@H 5.39060000 3.76132200 1.66058700
@H 3.52780700 3.21289200 -0.03055200
@H 7.67125300 4.03701400 0.85061100
@H 0.89081500 0.00545900 1.02781300
@H -0.05699000 -2.38920600 3.00461000
@H 0.87528000 -4.85986400 -0.37312600
@H 2.25381600 -2.41435700 -2.48122000
@H 5.50362900 0.35734800 -3.05512900
@H 9.21153500 1.07456700 -1.85134300
@H 5.91380100 2.49168200 2.75469600
@H 7.78806400 -1.57226400 -0.75693500
@H 4.27334700 -4.67464400 -0.29000200
@H 3.20282000 -1.26440100 3.72915000
}

set {
memory 8000000
basis 6-31g*
freeze_core True
scf_type df
}
energy(‘fisapt0’)

Thanks!

I am a new psi4 user.
The error is:

Traceback (most recent call last):
File “/home/acdsd3/psi4conda/bin/psi4”, line 338, in
exec(content)
File “”, line 143, in
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/driver.py”, line 501, in energy
wfn = procedures[‘energy’][lowername](lowername, molecule=molecule, **kwargs)
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/proc.py”, line 4714, in run_fisapt
ref_wfn = scf_helper(‘RHF’, molecule=sapt_dimer, **kwargs)
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/proc.py”, line 1670, in scf_helper
e_scf = scf_wfn.compute_energy()
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 83, in scf_compute_energy
self.initialize()
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 193, in scf_initialize
self.initialize_jk(self.memory_jk_, jk=jk)
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 128, in initialize_jk
jk.initialize()

RuntimeError:
Fatal Error: SCF::DF: Disk based algorithm requires 2 (A|B) fitting metrics and an (A|mn) chunk on core.
This is 2Q^2 + QNP doubles, where Q is the auxiliary basis size, N is the
primary basis size, and P is the maximum number of functions in a primary shell.
For this problem, that is 585301248 bytes before taxes,836144640 bytes after taxes.

Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1657298395608/work/psi4/src/psi4/libfock/DiskDFJK.cc on line: 731
The most recent 5 function calls were:

psi::DiskDFJK::preiterations()

Printing out the relevant lines from the Psithon → Python processed input file:
core.IO.set_default_namespace(“dimer”)
core.set_global_option(“MEMORY”, 8000000)
core.set_global_option(“BASIS”, “6-31g*”)
core.set_global_option(“FREEZE_CORE”, “True”)
core.set_global_option(“SCF_TYPE”, “df”)
→ energy(‘fisapt0’)

!----------------------------------------------------------------------------------!
! !
! Fatal Error: SCF::DF: Disk based algorithm requires 2 (A|B) fitting metrics and !
! an (A|mn) chunk on core. !
! This is 2Q^2 + QNP doubles, where Q is the auxiliary basis size, N is !
! the !
! primary basis size, and P is the maximum number of functions in a !
! primary shell. !
! For this problem, that is 585301248 bytes before taxes,836144640 bytes !
! after taxes. !
! Error occurred in file: /scratch/psilocaluser/conda- !
! builds/psi4-multiout_1657298395608/work/psi4/src/psi4/libfock/DiskDFJK.cc on !
! line: 731 !
! The most recent 5 function calls were: !
! psi::DiskDFJK::preiterations() !
! !
!----------------------------------------------------------------------------------!

I am a new psi4 user.
The error is:

Traceback (most recent call last):
File “/home/acdsd3/psi4conda/bin/psi4”, line 338, in
exec(content)
File “”, line 143, in
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/driver.py”, line 501, in energy
wfn = procedures[‘energy’][lowername](lowername, molecule=molecule, **kwargs)
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/proc.py”, line 4714, in run_fisapt
ref_wfn = scf_helper(‘RHF’, molecule=sapt_dimer, **kwargs)
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/proc.py”, line 1670, in scf_helper
e_scf = scf_wfn.compute_energy()
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 83, in scf_compute_energy
self.initialize()
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 193, in scf_initialize
self.initialize_jk(self.memory_jk_, jk=jk)
File “/home/acdsd3/psi4conda/lib//python3.8/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py”, line 128, in initialize_jk
jk.initialize()

RuntimeError:
Fatal Error: SCF::DF: Disk based algorithm requires 2 (A|B) fitting metrics and an (A|mn) chunk on core.
This is 2Q^2 + QNP doubles, where Q is the auxiliary basis size, N is the
primary basis size, and P is the maximum number of functions in a primary shell.
For this problem, that is 585301248 bytes before taxes,836144640 bytes after taxes.

Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1657298395608/work/psi4/src/psi4/libfock/DiskDFJK.cc on line: 731
The most recent 5 function calls were:

psi::DiskDFJK::preiterations()

Printing out the relevant lines from the Psithon → Python processed input file:
core.IO.set_default_namespace(“dimer”)
core.set_global_option(“MEMORY”, 8000000)
core.set_global_option(“BASIS”, “6-31g*”)
core.set_global_option(“FREEZE_CORE”, “True”)
core.set_global_option(“SCF_TYPE”, “df”)
→ energy(‘fisapt0’)

!----------------------------------------------------------------------------------!
! !
! Fatal Error: SCF::DF: Disk based algorithm requires 2 (A|B) fitting metrics and !
! an (A|mn) chunk on core. !
! This is 2Q^2 + QNP doubles, where Q is the auxiliary basis size, N is !
! the !
! primary basis size, and P is the maximum number of functions in a !
! primary shell. !
! For this problem, that is 585301248 bytes before taxes,836144640 bytes !
! after taxes. !
! Error occurred in file: /scratch/psilocaluser/conda- !
! builds/psi4-multiout_1657298395608/work/psi4/src/psi4/libfock/DiskDFJK.cc on !
! line: 731 !
! The most recent 5 function calls were: !
! psi::DiskDFJK::preiterations() !
! !
!----------------------------------------------------------------------------------!

This line in your input file sets your memory to 8 MB.

This error says that you need 836 MB (“836144640 bytes after taxes”) at the very minimum to run this calculation, but in practice it’s a good idea to give your job some overhead (about 20 %). I would give the job at least 1 GB, but since you can probably afford to provide more you could also give it 2 to 8 GB to ensure the failure is not a memory issue.