From 789bc38a2e87e6de2d8bd00164e0183bbbd11456 Mon Sep 17 00:00:00 2001 From: James Spencer Date: Tue, 11 Oct 2022 10:11:56 +0000 Subject: [PATCH] Add unused omega argument to NeuralNumint.eval_xc to match pyscf interface PiperOrigin-RevId: 480302784 --- .../neural_numint.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/density_functional_approximation_dm21/density_functional_approximation_dm21/neural_numint.py b/density_functional_approximation_dm21/density_functional_approximation_dm21/neural_numint.py index 08dfa510..117a8a9a 100644 --- a/density_functional_approximation_dm21/density_functional_approximation_dm21/neural_numint.py +++ b/density_functional_approximation_dm21/density_functional_approximation_dm21/neural_numint.py @@ -650,6 +650,7 @@ def eval_xc( spin: int = 0, relativity: int = 0, deriv: int = 1, + omega: Optional[float] = None, verbose=None ) -> Tuple[np.ndarray, Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray], None, None]: @@ -670,8 +671,9 @@ def eval_xc( details. spin: 0 for a spin-unpolarized (restricted Kohn-Sham) calculation, and spin-polarized (unrestricted) otherwise. - relativity: unused. + relativity: Not supported. deriv: unused. The first functional derivatives are always computed. + omega: RSH parameter. Not supported. verbose: unused. Returns: @@ -685,7 +687,14 @@ def eval_xc( kxc is set to None. (The third-order functional derivatives are not computed.) """ - del xc_code, verbose, relativity, deriv # unused + del xc_code, verbose, deriv # unused + + if relativity != 0: + raise NotImplementedError('Relatistic calculations are not implemented ' + 'for DM21 functionals.') + if omega is not None: + raise NotImplementedError('User-specifed range seperation parameters are ' + 'not implemented for DM21 functionals.') # Retrieve cached state. ao = self._grid_state.ao