From 71494cf408e598c2f92af3e22e185d104756fe78 Mon Sep 17 00:00:00 2001 From: Xing Zhang Date: Wed, 25 Jan 2023 13:05:52 -0800 Subject: [PATCH] enforce incore density fitting --- pyscfad/df/df.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyscfad/df/df.py b/pyscfad/df/df.py index 3fdd6280..c86a27ca 100644 --- a/pyscfad/df/df.py +++ b/pyscfad/df/df.py @@ -29,13 +29,13 @@ def build(self): max_memory = self.max_memory - pyscf_lib.current_memory()[0] int3c = mol._add_suffix('int3c2e') int2c = mol._add_suffix('int2c2e') - if (nao_pair*naux*8/1e6 < .9*max_memory and - not isinstance(self._cderi_to_save, str)): - self._cderi = incore.cholesky_eri(mol, auxmol=auxmol, - int3c=int3c, int2c=int2c, - max_memory=max_memory, verbose=log) - else: - raise NotImplementedError('Outcore density fitting is not implemented.') + if (nao_pair*naux*8/1e6 > .9*max_memory or + isinstance(self._cderi_to_save, str)): + log.warn('Outcore density fitting is not implemented.\n' + 'Using incore density fitting instead.') + self._cderi = incore.cholesky_eri(mol, auxmol=auxmol, + int3c=int3c, int2c=int2c, + max_memory=max_memory, verbose=log) del log return self